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
4
votes
2 answers

how do you get values out of this function: $y = f(x)$?

How can I plug in a value for $x$ in $y = f(x)$ and get a result for $y$? What does the $f$ do in the equation? I know it stands for a function, but does it actually represent a value that I should plug in?
4
votes
2 answers

Continuous function satisfying $f\left( {2{x^2} - 1} \right) = \left( {{x^3} + x} \right)f\left( x \right)$

If $f\colon\left[ { - 1,1} \right] \to \mathbb R$ be continuous function satisfying $f\left( {2{x^2} - 1} \right) = \left( {{x^3} + x} \right)f\left( x \right)$, then $\mathop {\lim }\limits_{x \to 0} \frac{{f\left( {\cos x} \right)}}{{\sin x}}$ is…
4
votes
1 answer

If $f(f(x)) = 2x+1$, what is $f(13)$? [SOLVED by @DonThousand]

I found this problem in an old textbook of mine and am unsure how to solve it. This was in a chapter about functions. Any help will be appreciated. The Problem: If $f: \mathbb{N} \to \mathbb{N}$ is a strictly increasing function such that $f(f(x)) =…
user687894
  • 89
  • 5
4
votes
1 answer

How many times does a term appear in this sum?

Let $F(a, b) = x^{a + b} + F(a, a + b) + F(b, a + b), x \in (0,\infty) -\{ 1 \}$ and $a, b \in \mathbb{N}$. So $F(1, 2) = x^3 + F(1, 3) + F(2, 3) = x^3 + x^4 + x^5 + F(1, 4) + F(3, 4) + F(2, 5) + F(3, 5)$. And the recursion continues infinitely. How…
Marc Grec
  • 667
4
votes
1 answer

What is the precise formula for this curve?

Here's about what I think the curve looks like: In working through a theory of mine, I have come across a curve I cannot identify. Along with $x$ and $y$, this curve needs an additional input to complete the curve. Things I know about this…
4
votes
4 answers

Discontinuous function $f:\mathbb{R}\to \mathbb{R}$ that takes each of its values twice?

I know it is impossible to create a continuous $f:\mathbb{R}\to \mathbb{R}$ that takes all of its values twice. I also know it is possible to create a continuous $f:\mathbb{R}\to \mathbb{R}$ that takes all of its values three times, but can someone…
GuyHero
  • 51
4
votes
1 answer

how do I write the function obtained from these two graphs?

I would like to design a function that has the maximums of the first image as maximums and the minimums of the second. in the first image f(x) is $$ \cos ^ {- 1} (\cos (x)) + x / 3 $$ while the second is $$ \cos ^ {- 1} (\cos (x)) + x / 6 $$ the…
4
votes
3 answers

What is this function called?

What is this function called? Here is a graph: _______ / / _______/ Sort of like: $f(x, a, b) = 0$, if $x < a; \quad \quad \displaystyle \frac {(x - a)} {(b - a)}$ if $a < x < b; \quad \quad$ and $1$ if $ x > b$. Closest…
Andrey
  • 245
4
votes
1 answer

Does the floor function commute with any other functions?

Basically what I'm asking is if there are any functions $f: \mathbb{R}\rightarrow \mathbb{R}$ such that \begin{align}\text{floor}(f(x)) = f(\text{floor}(x)),\text{ or } f \circ \text{floor} = \text{floor} \circ f. \end{align} I am, of course, aware…
Baylee V
  • 564
4
votes
1 answer

How can I write a function that outputs the number of digits in the input?

I would like to construct a function thats output is equal to the number of digits used to represent the number given as an input. For example: $f(5) = 1$ $f(9) = 1$ $f(13) = 2$ $f(99) = 2$ $f(682) = 3$ $f(999) = 3$ $f(9999)= 4$ etc. Is it…
logicbird
  • 255
4
votes
5 answers

What is the domain of $f^2$ if $f(x)=\sqrt{x+2}$

Now, $f(x)$ is defined for all values of $x$ for which $x+2 \geq 0$ $x+2 \geq 0 \implies x \geq -2$ So, $\mathrm{Domain}(f)=[-2,\infty)$ which means $f : [-2,\infty) \longrightarrow \Bbb R$ $f^2(x) = \Big (f(x) \Big )^2=(\sqrt{x+2})^2=x+2$ So,…
4
votes
1 answer

Is there any way to compute $f(f(...f(x))$ where $f(x)=x^2+x+1$?

I am simply curious if starting with $f(x)=x^2+x+1$ you can compute $f(...f(f(x)))$ where $f$ appears $n$ times. I think this can be done by induction, but I tried computing $f(f(x))$, $f(f(f(x))$ and they don't look alike so I could't establish the…
furfur
  • 598
4
votes
2 answers

Typo: in the definition of inverse image $E$ should be replaced by $H$

I'm reading Bartle and Sherbert: Introduction to Real Analysis. The author introduces the definitions of direct and inverse images: Let $f:A\rightarrow B$ be a function with domain $D(f)=A$ and range $R(f) \subseteq B$. 1.1.7 Definition If $E$ is…
Red Banana
  • 23,956
  • 20
  • 91
  • 192
4
votes
1 answer

$\left\lfloor x\right\rfloor$ and $[x]$ are the same concept?

The function $f(x)$ integer part of $x$ is defined as the largest integer less than or equal to $x$. Generally I have always use this symbol to indicate the integer part of $x$ $$f(x)=[x]$$ instead of $$f(x)=\left\lfloor x\right\rfloor.$$ Are there…
Sebastiano
  • 7,649
4
votes
5 answers

Find $h\colon\Bbb R\setminus\{0\}\to \Bbb R$ with $h(x - \frac{1}{x})= x^2 - \frac{1}{x^2}$ for all $x\ne0$.

Find $h\colon\Bbb R\setminus\{0\}\to \Bbb R$ with $h(x - \frac{1}{x})= x^2 - \frac{1}{x^2}$ for all $x\ne0$. I saw instantly that $$h(x - \frac{1}{x})= x^2 - \frac{1}{x^2} = \left( x -\frac{1}{x} \right)\left( x + \frac{1}{x} \right),$$ but I…
Trobeli
  • 3,242