Questions tagged [functions]

For elementary questions about functions, notation, properties, and operations such as function composition. Consider also using the (graphing-functions) tag.

A function $f$ defined on a set $X$ is an assignment of an element in some set $Y$ to each element of $X$. The set $X$ is called the domain of the function and $Y$ is called the codomain. The elements of $X$ are the inputs to the function and the elements of $Y$ are the potential outputs. For some input $x \in X$, its corresponding output in $Y$ is denoted $f(x)$. Not every element of $Y$ needs to be the output corresponding to some input though: the subset of $Y$ containing the elements that are an output of the function is called the range of $f$. When a function $f$ has domain $X$ and codomain $Y$, this is signified by writing $f \colon X \to Y$, and the assignments of inputs to outputs is signified by writing $f\colon x \mapsto f(x)$.

If you have a function whose codomain is the domain of another function, you can compose those two functions. In symbols if you have a function $f\colon X \to Y$ and a function $g \colon Y \to Z$, their composite is a function $g\circ f\colon X\to Z$ defined by the assignment $g\circ f\colon x \mapsto g(f(x))$.

For many examples of functions, the domain and range of the function are topological spaces, meaning that they are equipped with some notion of geometry. In this case we like to think of the function $f\colon X\to Y$ geometrically as the subset of the points $(x,f(x))$ in the topological space $X \times Y$. This subset of all the input-output pairs is called the graph of $f$.

Often mathematics textbooks will define a function slightly more rigorously than this though. They'll say that a function $f \colon X \to Y$ is a relation $R$ on the set $X \times Y$ such that

  1. For each $x \in X$ there is some $y \in Y$ such that $xRy$. Each input needs an output.
  2. If $xRy$ and $xRz$, then $y=z$. Each input needs exactly one output.

Here are a bunch of examples of functions:

  • Many examples of functions covered in elementary and high school have as their domain and codomain the real numbers $\mathbf{R}$. A basic example is the function $f \colon \mathbf{R} \to \mathbf{R}$ defined by the rule $f(x) = x^2$. Thinking geometrically, the graph of $f$ is the set of all points $(x,x^2)$ in the plane $\mathbf{R}^2$, and this forms a parabola. Note that while the codomain of this function is $\mathbf{R}$, the range consists of only the non-negative real numbers.

  • Here's a silly example. For any set $X$ we can define an identity function $\mathbf{1}_X$ with domain and codomain $X$ such that $\mathbf{1}_X \colon x \mapsto x$.

  • Let $W$ denote the set of all strings of letters of the alphabet, so like $\text{npr}$ or $\text{asdfasdf}$ or $\text{butt}$ for example. And let $\mathbf{N}$ denote the set of natural numbers. We can define a function $\ell\colon W \to \mathbf{N}$ such that $\ell$ assigns to each word it's length. So $\ell(\text{defenestration}) = 14$. Also $\ell(\text{butt})=4$.

  • Using the same set $W$ in the last example, let's define another function $\tau\colon W \to W$ such that $\tau$ "reverses" a word. So $\tau(\text{defenestration}) = \text{noitartsenefed}$, and $\tau(\text{butt}) = \text{ttub}$. A few neat properties of $\tau$ that deserve to be pointed out, $\tau \circ \tau = \mathbf{1}_W$, and also $\ell\circ\tau = \ell$.

33723 questions
1
vote
1 answer

Function that gives -1 and +1 with change in x.

I need a function $f(x)$ that gives either $-1$ or $1$ based on $x$. eg. when $x = 26$ it should give me $1$, when $x = 27$ it should give me $-1$, when $x = 28$ it should give me $1$, and so on. I know it had something to do with…
1
vote
1 answer

A function $f: [0,1) \rightarrow [0,1)$ that satisfies $\forall x \in [0,1)~ f(x) \neq x$?

I was wondering whether there was a (pretty) function $f$ in $[0,1)^{[0,1)}$ that satisfies $\forall x \in [0,1)~ f(x) \neq x$. Actually, I think I did find such function, namely $ \forall x \in [0,1) ~ f(x)= \left\{ \begin{array}{ll} \frac{x}{2} &…
tcb93
  • 326
  • 1
  • 10
1
vote
1 answer

For which functions $f$ can $f(x)f(y)$ be expressed in terms of $x^2+y^2$?

The basic example of such a function is $f(x) = e^{ax^2}$ for any constant $a$. Are these the only functions with this property, or are there others?
Mu Prime
  • 124
1
vote
1 answer

how to express a given function as a composite involving other functions

Given $f(x)= x-3$, $ h(x) = x^3$ , $j(x) = 2x$ . Express $y=2x-3$, $y=x^{3/2}$ as a composite involving $f, g, h, j$ How do I combine for example $y=2x-3$ into $f(x)=x-3$ Is it $f(x)= (2x-3)-3$ ? how do I present it as a composite function?
user307640
  • 2,632
  • 2
  • 17
  • 27
1
vote
0 answers

How can I identify what type of parabolic function this LED is pulsing at?

I have a hardware device with a LED that fades between bright and dark once about every 2.4 seconds. I want to figure out what function is used to create its pattern. I have taken a video of the LED pulsing and then use linux tools ffmpeg and…
spuder
  • 131
1
vote
3 answers

find the inverse function

This question was on one of our tests.I couldn't solve it but I'm curious to know the answer: Find the inverse function of: $$f(x)=(\ln(x))^2-\ln(x).$$ I found they domain of definition and studied the characteristics of this function but couldn't…
Mark
  • 129
1
vote
1 answer

Does a function $f(x)$ exist such that $f(x+1)-f(x)=\frac{1}{x}$. And if so what is it.

I have done a fair bit of thinking on this. Lets say that $z(f(x))=f(x+1)-f(x)$. I figured out that $z\left(\frac{x^2-x}{2}\right)=x$. But one over that does not equal $\frac{1}{x}$.
ggbg
  • 21
1
vote
0 answers

What is the inverse of $g$?

Define $A := \{(a,b) \in \mathbb{N}^2 \, \mid \, \gcd(a,b) = 1 \text{ and } 1 \le a < b\}$. Does a bijection exist between $A$ and $\mathbb{N}$? I tried the following map: Let $g: \mathbb{N} \to A$ such that $$\begin{equation*} g(n) =\left\{ …
1
vote
1 answer

What is meant by a function on a set.

This question was probably asked many times, but i couldn't find by searching. And i figure that i'll get an answer faster then by searching. We we say : functions on M Does that mean that the function maps from $M$ to $M$, that it's image lies in…
Pastudent
  • 868
1
vote
1 answer

Proving that a function $f(x)$ with a variable has only a local maximum

$f_n(x)=nx^n+n\ln(|x|)$. So this is what we have, I do understand the steps but I got stuck at one step, as follows. Firstly we need to find the derivatives of the function, the first and the second, which…
1
vote
1 answer

$y=\{x\}$ represents greatest integer less than $x$ then solve $x^2-7\{x\}+5=0$.

$y=\{x\}$ represents greatest integer less than $x$, e.g. $\{1.1\}=1$ $\{2\}=1$ $\{5\}=4$ $\{3.7\}=3$ Then what are the solutions of $$x^2-7\{x\}+5=0?$$ Note that this is not same as greatest integer function. So its more difficult to solve.
maths lover
  • 3,344
1
vote
2 answers

Graphing Functions Algebra

Suppose $f(x),g(x),h(x)$ are all linear functions, and $j(x)$ and $k(x)$ are defined by $$j(x) = \max\{f(x),g(x),h(x)\},$$ $$k(x) = \min\{f(x),g(x),h(x)\}.$$ This means that, for each $x$, we define $j(x)$ to be equal to either $f(x),$ $g(x),$ or…
user1043968
1
vote
1 answer

A question on finding the components of a composite function

I want to know how to find the components of a non linear composite function. I know how to find the components of some linear composite functions but when it comes to non linear composite functions i cant wrap my head around it. For example if i…
1
vote
1 answer

Positioning item on non linear slider

I am trying to place a current position on a real line where each steps are non linear. Here is a screenshot of what I am trying to achieve (the current slider should be slightly below). Given: the total length of the slider (end of the slider…
1
vote
0 answers

Solving multiple of integer square

$ks^2 = hw : k, s, h, w \in \mathbb{Z}^+ $ Suppose I want to maximize $k$ and minimize $s$ for a given $h, w$. In that case, the solution is trivial: $s=1, k=hw$, But, I want to find $k, s$ given a value of $h, w$ such that $k$ has the least…
tachyon
  • 121
  • 4