Real functions of a real variable¶
Part 3 · Functions · Chapter 3 · Lecture notes, volume 3 (PDF) · Exercises, volume 3 (PDF) · Exercises: Domains of functions · Slides (PDF)
Prerequisites
-
From this module, «Functions»: functions, domain and image.
-
From this module, «Number sets and intervals»: intervals.
Objectives
At the end of this chapter you will be able to:
-
find the natural domain of a real function and study its sign;
-
decide whether a function is bounded, even or odd;
-
recognize monotonic and periodic functions.
1. Real function of a real variable¶
Definition 1: real function of a real variable
A function whose domain \(D\) is a subset of \(\mathbb{R}\) and whose codomain is \(\mathbb{R}\):
is called a real function of a real variable.
-
These are functions in which the “input” variable \(x\) and the “output” variable \(f(x)\) are real numbers.
-
The most common real functions of a real variable have as domain \(D\) and as image \(f(D)\) an interval (possibly the whole of \(\mathbb{R}\)) or the union of a finite number of intervals.
The dependence of the output \(f(x)\) on the input \(x\) is effectively visualized by drawing the graph of \(f\), that is, the set of points of the plane with coordinates \((x,y)\) such that \(y = f(x)\) and \(x\) in the domain \(D\).
Example of the graph of a real function of a real variable with domain \(D = [a, b]\) (a closed and bounded interval):
Every line parallel to the \(y\)-axis that intersects the \(x\)-axis at a point \(x_0\) of the domain \(D\) intersects the graph of \(f\) at one and only one point. 1 Therefore, not all curves are graphs of functions.
Note, instead, that nothing prevents a line parallel to the \(x\)-axis from intersecting the graph of \(f\) at several points or at no point at all.
Example 1: curve that does not correspond to the graph of a function
Consider, for example, the curve made of the points of the circle of radius \(r\):
It is not possible to associate a unique output with the input \(x_0 \in (-r,r)\), hence this curve does not correspond to the graph of a function!
2. Sign of a function¶
- The properties of a function are almost always studied not only on the whole domain, but also on a part of it: one says for instance that \(x \mapsto x^2\) is “positive for \(x>0\)” or that \(x \mapsto x^2\) is “decreasing in \((-\infty,0]\)”. It is therefore convenient to state the definitions directly on a subset \(I\) of the domain, and then recover the “global” property as the particular case \(I=D\).
Definition 2: sign of a function in a subset of the domain
Given a function \(f: D \subseteq \mathbb{R} \rightarrow \mathbb{R}\) and a subset \(I \subseteq D\), the function is said to be
When the subset is not specified, the whole domain is understood: a function \(f: D \subseteq \mathbb{R} \rightarrow \mathbb{R}\) is called nonnegative (positive, nonpositive, negative) if it is nonnegative (positive, nonpositive, negative) in \(I=D\).
-
Graphically: \(f\) is nonnegative in \(I\) if no point of the graph with abscissa in \(I\) lies below the \(x\)-axis; it is positive in \(I\) if all these points lie strictly above the \(x\)-axis.
-
If \(f\) is positive in \(I\) then it is also nonnegative in \(I\); the converse is false, because \(f\) may vanish at some point of \(I\).
Example 2: sign of a function
-
The function \(f: \mathbb{R} \rightarrow \mathbb{R},~ f: x \mapsto x^2\) is nonnegative in \(\mathbb{R}\), since \(x^2 \ge 0\) for every \(x \in \mathbb{R}\). It is not, however, positive in \(\mathbb{R}\), because \(f(0)=0\): it is positive in \(I=(0,+\infty)\) and in \(I=(-\infty,0)\).
-
The function \(f: \mathbb{R} \rightarrow \mathbb{R},~ f: x \mapsto x^3\) is positive in \((0,+\infty)\) and negative in \((-\infty,0)\), since
\[ x^3 > 0 ~~\Longleftrightarrow~~ x > 0 \qquad {\rm ~~and~~} \qquad x^3 < 0 ~~\Longleftrightarrow~~ x < 0. \] -
The function \(f: \mathbb{R} \setminus \{0\} \rightarrow \mathbb{R},~ f: x \mapsto \frac{1}{x}\) is positive in \((0,+\infty)\) and negative in \((-\infty,0)\): the sign of \(\frac{1}{x}\) is the same as the sign of \(x\).
3. Bounded functions¶
Definition 3: bounded functions in a subset of the domain
Given a function \(f: D \subseteq \mathbb{R} \rightarrow \mathbb{R}\) and a subset \(I \subseteq D\), the function is said to be
- A number \(M \in \R\) such that \(f(x) \le M\) for every \(x \in I\) is called an upper bound for the values of \(f\) in \(I\); a number \(m \in \R\) such that \(f(x) \ge m\) for every \(x \in I\) is called a lower bound for the values of \(f\) in \(I\). Hence \(f\) is bounded above in \(I\) if its values in \(I\) admit an upper bound, and bounded below in \(I\) if they admit a lower bound.
When the subset is not specified, the whole domain is understood: a function \(f: D \subseteq \mathbb{R} \rightarrow \mathbb{R}\) is called bounded above (bounded below, bounded) if it is so in \(I=D\).
-
A function is bounded in \(I\) if and only if it is bounded both above and below in \(I\). Indeed:
-
if \(|f(x)| \le M\) for every \(x \in I\), then \(-M \le f(x) \le M\) for every \(x \in I\), hence \(M\) is an upper bound and \(-M\) a lower bound;
-
conversely, if \(m \le f(x) \le M\) for every \(x \in I\), setting \(K = \max\{|m|,|M|\} \ge 0\) we have \(-K \le m \le f(x) \le M \le K\), that is, \(|f(x)| \le K\) for every \(x \in I\).
-
-
Graphically, we have:
-
a function is bounded above if its graph is contained in the lower half-plane bounded by a line parallel to the \(x\)-axis
-
a function is bounded below if its graph is contained in the upper half-plane bounded by a line parallel to the \(x\)-axis
-
a function is bounded if its graph is contained in a horizontal strip
-
Example 3: bounded function
Consider the function:
we have
Example 4: Unbounded function
The function
is bounded neither above nor below.
Example 5: Function bounded below
The function
is bounded below; indeed, \(x^2 \ge 0, \forall x \in \mathbb{R}\)
Example 6: boundedness in a subset of the domain
A function may fail to be bounded on its domain and still be bounded on a subset of it.
-
The function \(f: \mathbb{R} \rightarrow \mathbb{R},~ f: x \mapsto x^3\) is not bounded in \(\mathbb{R}\), but it is bounded in \(I=[-2,2]\): indeed for \(-2 \le x \le 2\) we have
\[ |x^3|=|x|^3 \le 2^3 = 8. \] -
The function \(f: \mathbb{R} \setminus \{0\} \rightarrow \mathbb{R},~ f: x \mapsto \frac{1}{x}\) is not bounded above in \(I=(0,+\infty)\): given any \(M \in \R\) with \(M>0\), choosing \(x\) with \(0 < x < \frac{1}{M}\) we obtain
\[ f(x) = \frac{1}{x} > M, \]hence no real number is an upper bound for the values of \(f\) in \((0,+\infty)\). The same function is instead bounded in \(I=[1,+\infty)\), where \(0 < \frac{1}{x} \le 1\).
- Equivalently, we can say that a function is bounded above (bounded below, bounded) if, respectively, its image is a subset of \(\mathbb{R}\) that is bounded above (bounded below, bounded).
4. Symmetric functions¶
Definition 4: even function
Functions whose graph is symmetric with respect to the \(y\)-axis are called even.
-
They are characterized by the relation
\[ f(-x) = f(x) \]which expresses the equality of the ordinates corresponding to the points \(x\) and \(-x\), which are symmetric with respect to \(x = 0\).
Definition 5: Odd function
Functions whose graph is symmetric with respect to the origin are called odd.
-
They are characterized by the relation
\[ f(-x) = - f(x) \]which expresses the fact that the ordinates corresponding to the points \(x\) and \(-x\), which are symmetric with respect to \(x = 0\), are the opposite of each other.
Example 7: Even and odd functions
For example, the function \(x \mapsto x^2\) is even, while \(x \mapsto x^3\) is odd. More generally, powers with integer exponent are even functions if the exponent is even and odd functions if the exponent is odd.
-
Example of the graph of an even function:
-
Example of the graph of an odd function:
A function cannot have a graph that is symmetric with respect to the \(x\)-axis, since the correspondence would no longer be single-valued.
5. Monotonic functions¶
Definition 6: Non-decreasing function in a subset of the domain
Given a function \(f: D \subseteq \mathbb{R} \rightarrow \mathbb{R}\) and a subset \(I \subseteq D\), the function is called non-decreasing in \(I\) if for every pair of points \(x_1\), \(x_2 \in I\) we have:
Definition 7: Increasing function in a subset of the domain
Given a function \(f: D \subseteq \mathbb{R} \rightarrow \mathbb{R}\) and a subset \(I \subseteq D\), the function is called increasing in \(I\) if for every pair of points \(x_1\), \(x_2 \in I\) we have:
Definition 8: Non-increasing function in a subset of the domain
Given a function \(f: D \subseteq \mathbb{R} \rightarrow \mathbb{R}\) and a subset \(I \subseteq D\), the function is called non-increasing in \(I\) if for every pair of points \(x_1\), \(x_2 \in I\) we have:
Definition 9: Decreasing function in a subset of the domain
Given a function \(f: D \subseteq \mathbb{R} \rightarrow \mathbb{R}\) and a subset \(I \subseteq D\), the function is called decreasing in \(I\) if for every pair of points \(x_1\), \(x_2 \in I\) we have:
-
A function \(f\) is non-decreasing in \(I\) if, as \(x\) increases in \(I\), the corresponding ordinate on the graph of the function does not decrease (hence it either stays the same or increases); it is increasing in \(I\) if it always increases;
-
A function \(f\) is non-increasing in \(I\) if, as \(x\) increases in \(I\), the corresponding ordinate on the graph of the function does not increase (hence it either stays the same or decreases); it is decreasing in \(I\) if it always decreases.
-
A function is called monotonic in \(I\) if it is non-decreasing in \(I\) or non-increasing in \(I\).
-
A function is called strictly monotonic in \(I\) if it is increasing in \(I\) or decreasing in \(I\).
When the subset is not specified, the whole domain is understood: a function \(f: D \subseteq \mathbb{R} \rightarrow \mathbb{R}\) is called non-decreasing (increasing, non-increasing, decreasing, monotonic, strictly monotonic) if it is so in \(I=D\).
- A function increasing in \(I\) is in particular non-decreasing in \(I\) (because \(f(x_1)<f(x_2)\) implies \(f(x_1) \le f(x_2)\)), and a function decreasing in \(I\) is in particular non-increasing in \(I\). Hence every function that is strictly monotonic in \(I\) is also monotonic in \(I\); the converse is false, as the constant function shows.
Example 8: Monotonic functions
-
The function \(x \mapsto x^3\) is increasing in \(\mathbb{R}\) (hence strictly monotonic in \(\mathbb{R}\)).
-
The constant function \(x \mapsto k\) (whose graph is the line with equation \(y = k\)) is both non-decreasing and non-increasing in \(\mathbb{R}\): it is therefore monotonic, but it is neither increasing nor decreasing, and hence it is not strictly monotonic.
-
The function \(x \mapsto x^2\) is decreasing in \((-\infty,0]\) and increasing in \([0,+\infty)\), but it is not monotonic in \(\mathbb{R}\): indeed \(f(-1)=1 > f(0)=0\) (hence it is not non-decreasing in \(\mathbb{R}\)) and \(f(0)=0 < f(1)=1\) (hence it is not non-increasing in \(\mathbb{R}\)). It is the typical example of a property that holds locally but not on the whole domain.
-
Example of the graph of a non-decreasing function (horizontal segment):
-
Example of the graph of an increasing function:
6. Periodic functions¶
Definition 10: Periodic function
A (non-constant) function \(f:D \rightarrow \mathbb{R}\) is periodic with period \(T\) , \(T > 0\), if \(T\) is the smallest positive real number such that
- Every interval of length \(T\) contained in \(D\) is called a periodicity interval.
Example 9: Periodic functions
Typical examples of periodic functions are the trigonometric functions \(x \mapsto \sin(x)\) (\(T=2\:\pi\)), \(x \mapsto \cos(x)\) (\(T=2\:\pi\)) and \(x \mapsto \tan(x)\) (\(T=\pi\)).
Example 10: Graph of periodic functions
Graph of a periodic function with period \(T=2\):
-
Lines parallel to the \(x\)-axis have equation
\[ y = k \qquad k \in \mathbb{R} \]
7. In summary¶
In summary
-
A real function of a real variable has domain and codomain in \(\R\), and is drawn by its graph.
-
Even functions have a graph symmetric with respect to the \(y\)-axis, odd functions with respect to the origin.
-
Monotonic functions preserve or reverse the order; periodic functions repeat their values with period \(T\).
Exercises on this chapter: Domains of functions
-
If the line did not intersect the graph, this would mean that no output corresponds to the input \(x\). If the line intersected the graph at more than one point, this would mean that several distinct outputs correspond to the input \(x\), and hence the function would no longer be single-valued. ↩