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
3
votes
3 answers

$\sin x + x\cos x=0$ solution?

Any idea of solving this equation? $$\sin x + x\cos x=0$$ I have also tried by setting a function $g(x)=\sin x+x\cos x$ and searching for solutions using the derivative but my atempts w
3
votes
1 answer

Show $\phi(x) = (x - x_1)(x - x_2) \cdots (x - x_m)$ is odd for $m$ odd.

Given the function $$ \phi(x) = (x - x_1) (x - x_2) \cdots (x - x_m) $$ where $m$ is odd, and the points $x_1, x_2, \cdots, x_m$ are symmetric wrt the midpoint of its domain, show that the function is odd wrt the midpoint of its domain. We…
jamesh625
  • 1,153
  • 1
  • 12
  • 23
3
votes
1 answer

Solving a "logistic-like" function with two unknowns, two data points

I am stuck in trying to solve the following: Given two points $(x_{1}; y_{1})$ and $(x_{2}; y_{2})$, to determine the parameters $a$ and $b$ in the equation: $$y=\frac{e^{a+bx} - e^{a}}{1+e^{a+bx}}.$$ In other words, I have two unknowns and two set…
Mino
  • 155
3
votes
2 answers

How to measure how erratic is a function between a and b

I need to compare the outputs of some functions and to rate their "erratness". Given a function, the less erratic function between a and b would be a straight line and the more erratic function would probably be a triangular or sine wave, the…
3
votes
2 answers

period of $\cos(x) + x - \lfloor x \rfloor$?

What is the period of $\cos(x) + x - \lfloor x \rfloor$? This is what I have done: $x = \lfloor x \rfloor + \{x\}$ $\cos(x)$ has period $2\pi$ $\{x\}$ has period $1$ so $\cos(x) + \{x\}$ should be periodic with the period of LCM of $2\pi$ and $1$…
sudo_dudo
  • 182
3
votes
3 answers

Find the Range of the function $f(x) = |x-6|+x^2-1$

find the Range of $f(x) = |x-6|+x^2-1$ $$ f(x) = |x-6|+x^2-1 =\left\{ \begin{array}{c} x^2+x-7,& x>0 .....(b) \\ 5,& x=0 .....(a) \\ x^2-x+5,& x<0 ......(c) \end{array} \right. $$ from eq (b) i got $$f(x)= \left(x+\frac12\right)^2-\frac{29}4…
anni
  • 349
3
votes
1 answer

Completely monotonic function intersect

Is there any proof that two "completely monotonic" functions ($f,g: (0, \infty) \rightarrow \mathbb{R}$) would intersect at most at one point? Completely monotonic means: The $n$'th derivative of each function satisfies $(−1)^ n f^{(n)}(x) \geq 0$,…
3
votes
3 answers

Is the function max{x,y} defined if x and y take equal values?

If x and y take the same values, will the function return a result? I am asking this as maximum means greatest of two values. So if both the values are equal, the existance of the function confuses me.
3
votes
4 answers

Number of functions for $(f(x))^2=x^2$

If $f\colon\mathbb{R}\to\mathbb{R}$ is a function such that $$(f(x))^2=x^2$$ for all $x$ , then 1) The number of such functions are? 2) How many of them are continuous? I can see 4 functions: $y=x$ $y=-x$ $y=|x|$ $y=-|x|$ and they are…
3
votes
5 answers

How to rewrite a piecewise function in terms of the Heaviside function

Let's say I have a piecewise function: $$f(x) = \begin{cases}x ,& 0 \leq x \leq 1 \\1 ,& 1 \leq x\end{cases}$$ How can I rewrite this in terms of the Heaviside function $u(x-a)$?
nopcorn
  • 489
3
votes
4 answers

show that $f(x)=-3x+4$ is bijective

Determine whether each of these functions is a bijection from $\mathbb{R}$ to $\mathbb{R}$ a) $f(x)=-3x+4$ So I know that a function is bijective if it is both injective (one-to-one) and surjective (onto). A function is one-to-one if every $x$ has…
Alim Teacher
  • 1,261
3
votes
1 answer

Does monotonicity of a function imply invertibility? What about vice verse?

A monotone function never has saddle points, same is true for an invertible function. Can we conclude that monotonic function is also invertible and vice-versa?
kaka
  • 1,896
3
votes
0 answers

How is $\cos^3{x}$ an odd function while $\sin^3{x}$ an even function?

We know that for odd function $f(-x) = -f(x)$ and for even function $f(-x) = f(x)$. Therefore, $\cos^3(-x) = \cos(-x)\cos(-x)\cos(-x) = \cos{x}\cos{x}\cos{x} = \cos^3{x}$ (i.e. $\cos^3{x}$ must be even function). And similarly, since $\sin(-x) = -…
Ritu
  • 1,663
3
votes
3 answers

Is it possible to simplify these iterated functions?

I'll apologise in advance, as I'm a programmer and my math is a bit rusty, so please bear with me. Let's say I have a linear function: $$f(x) = mx + c$$ But the result of the function is clamped between $0$ and $1$. I'm not sure of the mathematical…
3
votes
2 answers

When does function composition commute?

I've read that function composition "generally does not commute." Not counting compositions involving the identity function, and compositions of a function and its inverse, are there examples of functions on the reals (for example) $f, g$ where $fg…