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
2
votes
1 answer

Prove function property

Given function $f\colon\mathbb{Z}^+\to\mathbb{Z}^+$ satisfy for every $x$, $y$ that are positive integers, one and only one among these numbers $$f(x+1), f(x+2),\ldots,f(x+f(y))$$ is divisible by $y$. Prove that there are infinite many $n$ so that…
2
votes
3 answers

Solving $x=\frac{2^{1+y}}{\left(y+1\right)\left(y+2\right)}$ for $y$

Do you know how to solve the following equation to make $y$ the subject: $$x=\frac{2^{1+y}}{\left(y+1\right)\left(y+2\right)}$$ My attempts: I multiplied both sides by $\ln(2)(y+1)^2$ to…
2
votes
2 answers

Does the table define a function $f:A \to B$?

I am struggeling with this exercise: $A= \{ 1,2,3,4,5 \}, B= \{ 2,3,4,5,6,7 \}$ with $x \in A $ and $y \in B$ Does the table values define a function $f$ from A to B? $$\begin{array}{c|rrrrrr} x & 1 & 2 & 3 & 4 & 5 & 4 \\ \hline y & 5 & 4 & 3 & 2 &…
2
votes
1 answer

Function for "active users" over time, given a constant "new users per day", and an exponential decay of new users who keep the app after "x" days

Forgive me if this is basic, it has been a while since I have used maths like this. Given: $install\ rate= 1\ new\ user\ per\ day$ $retention\ rate = 0.85^x$ The "retention rate" is percentage of new users who keep the app after "x" days. In my…
Blue7
  • 291
2
votes
1 answer

Find all the solutions for $f\left(x\right) =2f\left(\frac{1}{x}\right)-\frac{2x^{2}-1}{x^{2}+1}$

The function is $f:\left(0,\infty\right)\rightarrow\mathbb{R}$, I tried to do it like that, first I saw that: $$f\left(x\right) =2f\left(\frac{1}{x}\right)-\frac{2x^{2}-1}{x^{2}+1}$$ and then decided to try to put…
Abzikro
  • 121
2
votes
1 answer

Range of a function with a restricted domain.

Consider a function, $$ f(x)=2x-4\sin x, $$ having a given domain of $[0,2\pi]$. Is it incorrect to say that its range is, $$ \{f\in [-1.37,13.93]\}. $$ Please also comment on the notation. I am trying to improve my precision in writing mathematical…
rayank97
  • 71
  • 6
2
votes
2 answers

Doubt regarding notation of functions and relations

In the notation $f : A \rightarrow B$, $A$ is the domain of $f$ and $B$ is the codomain. What actually is the codomain? Defining it as the set into which all outputs of the function are constrained to doesn't seem very solid to me. Is it wrong to…
AVS
  • 245
2
votes
4 answers

Find the range of $f(x)=\frac1{1-2\sin x}$

Question: Find the range for $f(x)= 1/(1-2\sin x)$ Answer : $ 1-2\sin x \ne 0 $ $ \sin x \ne 1/2 $ My approach: For range : $ -1 ≤ \sin x ≤ 1 $ $ -1 ≤ \sin x < 1/2$ and $1/2<\sin x≤1 $ , because $\sin x≠1/2$ $ -2 ≤ 2\sin x <1 $ and $…
happy
  • 23
2
votes
3 answers

Find the Domain of $f(x)=\sqrt{\log(1/|\sin x|) }$

textbook solution of above question is given by for $$\sqrt{\log\frac1{|\sin x|} }$$ to be defined $\log\left(\frac 1{|\sin x|}\right)$ has to be > or = 0, for that $1/|\sin x| >$ or $= 1$ and $\sin x \neq 0$, thus domain is $\Bbb R - \{n\pi, n \in…
Manu Sm
  • 169
2
votes
5 answers

Show that the function $f(x)=x+\sqrt{x}$ is one-to-one

Show that the function $f(x)=x+\sqrt{x}$ is one-to-one. I know that for showing that a function is one-to-one I have to prove that if $f(a)=f(b)$ then $a=b$. Then I'm trying that in here but I get…
bdvg2302
  • 1,149
2
votes
1 answer

Solving the equation $f(x) = \int_0 ^x \sqrt{4-2f(t)} dt$

A continuous function $f(x)$ satisfies the following. For all reals $x \le b$, $f(x)=a(x-b)^2+c$. For all reals, $f(x) = \int_0 ^x \sqrt{4-2f(t)} dt$. If $\int_0^6 f(x) dx = \frac{q}{p}$, where $p,q$ are relatively prime positive integers, find…
2
votes
1 answer

Equivalence of additivity and homogeneity for $\mathbb{R} \rightarrow \mathbb{R}$ strictly increasing functions

In my (sort of) intro to proofs course, we were given the following theorem without proof (which was then used in other proofs): If $f : \mathbb{R} \rightarrow \mathbb{R}$ is a strictly increasing function, the following statements are…
delta_phi
  • 227
2
votes
0 answers

If $f(1)=c$ and $f(x+1) = f(x) + f(1)$, then is $f(x + y) = f(x) + f(y)$?

Suppose that $f: \mathbb{R} \to \mathbb{R}$ and let $c \in \mathbb{R} \backslash \{0\}$ be fixed such that: $f(1) = c$ $f(x+1) = f(x) + f(1)$, for all $x \in \mathbb{R}$ I proved the following properties: For any $m \in \mathbb{Z}$ and any $x \in…
2
votes
0 answers

Is it possible for a function and its inverse to have intersections that are not on $y=x$?

Define a function $y=f(x)$ on $\mathbb{R^{2}}$. Can the graph of this function and that of $y=f^{-1}(x)$ have intersection(s) that cannot be represented in the form $(k,k)$, where $k$ is a real number? How about other domains?
2
votes
1 answer

Find the function $f(x)$ when $f(f(x))=1-x$, for $x\in [0,1]$

The function f(x) is continuous and $f(f(x))=1-x$, for $x\in [0,1]$ then, (A) $f(\frac{1}{8})+f(\frac{7}{8})=3$ (B) $f(\frac{2}{3})+f(\frac{1}{3})=2$ (C) $f(\frac{5}{6})+f(\frac{1}{6})=1$ (D) None of These My approach is as follow $f\left(…