This collection presents 20 practice examples on even functions and odd functions. Each example is solved step by step, with particular attention to the symmetry of the domain, the computation of \(f(-x)\), and the comparison with \(f(x)\) and \(-f(x)\).
Indeed, to decide whether a function is even or odd it is not enough to look at its analytic expression alone: one must first check that the domain is symmetric about the origin. Only after this check is it meaningful to verify whether, for every \(x\) in the domain, one of the two conditions
\[ f(-x)=f(x) \]
or
\[ f(-x)=-f(x) \]
holds.
The examples that follow illustrate the main cases: even functions, odd functions, functions that are neither even nor odd, non-symmetric domains, operations on even and odd functions, integrals over symmetric intervals, and the decomposition into even and odd parts.
Exercise 1 — level ★☆☆☆☆
Determine which of the following sets are symmetric about the origin:
\[ A=\mathbb R,\qquad B=[-3,3],\qquad C=[0,+\infty),\qquad D=\mathbb R\setminus\{0\}. \]
Answer
The sets \(A\), \(B\), and \(D\) are symmetric about the origin. The set \(C\) is not symmetric about the origin.
Solution
A set \(X\subseteq\mathbb R\) is symmetric about the origin if, for every \(x\in X\), its negative \(-x\) also belongs to \(X\). In symbols:
\[ x\in X\implies -x\in X. \]
Consider the first set:
\[ A=\mathbb R. \]
Every real number belongs to \(\mathbb R\), and so does its negative. Hence \(A\) is symmetric about the origin.
Now consider
\[ B=[-3,3]. \]
If \(x\in[-3,3]\), then \(-x\in[-3,3]\) as well, since the interval always contains, together with any number, its negative. Hence \(B\) is symmetric about the origin.
Consider
\[ C=[0,+\infty). \]
This set is not symmetric about the origin. Indeed,
\[ 1\in[0,+\infty), \]
but
\[ -1\notin[0,+\infty). \]
Thus \(C\) does not contain the negative of each of its elements.
Finally, consider
\[ D=\mathbb R\setminus\{0\}. \]
If \(x\in D\), then \(x\ne 0\). Consequently \(-x\ne 0\) as well, so \(-x\in D\). Therefore \(D\) too is symmetric about the origin.
Exercise 2 — level ★☆☆☆☆
Determine whether the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=x^2+5 \]
is even, odd, or neither.
Answer
The function is even.
Solution
The domain of the function is \(\mathbb R\), which is therefore symmetric about the origin.
We may thus compare \(f(x)\) with \(f(-x)\). Computing \(f(-x)\):
\[ f(-x)=(-x)^2+5. \]
Since
\[ (-x)^2=x^2, \]
we obtain
\[ f(-x)=x^2+5. \]
But
\[ f(x)=x^2+5. \]
Hence, for every \(x\in\mathbb R\),
\[ f(-x)=f(x). \]
By definition, \(f\) is even.
Exercise 3 — level ★☆☆☆☆
Determine whether the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=x^3-4x \]
is even, odd, or neither.
Answer
The function is odd.
Solution
The domain of the function is \(\mathbb R\), which is therefore symmetric about the origin.
Compute \(f(-x)\):
\[ f(-x)=(-x)^3-4(-x). \]
Simplifying both terms, we obtain
\[ f(-x)=-x^3+4x. \]
Now compute \(-f(x)\). Since
\[ f(x)=x^3-4x, \]
we have
\[ -f(x)=-(x^3-4x). \]
Distributing the minus sign:
\[ -f(x)=-x^3+4x. \]
We have thus obtained
\[ f(-x)=-x^3+4x \]
and
\[ -f(x)=-x^3+4x. \]
Therefore, for every \(x\in\mathbb R\),
\[ f(-x)=-f(x). \]
By definition, \(f\) is odd.
Exercise 4 — level ★★☆☆☆
Determine whether the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=x^2+x \]
is even, odd, or neither.
Answer
The function is neither even nor odd.
Solution
The domain of the function is \(\mathbb R\), which is therefore symmetric about the origin.
Compute \(f(-x)\):
\[ f(-x)=(-x)^2+(-x). \]
Since \((-x)^2=x^2\), we obtain
\[ f(-x)=x^2-x. \]
We now compare \(f(-x)\) with \(f(x)\). We have
\[ f(x)=x^2+x. \]
In general,
\[ x^2-x\ne x^2+x. \]
For instance, taking \(x=1\) gives
\[ f(-1)=(-1)^2+(-1)=1-1=0, \]
whereas
\[ f(1)=1^2+1=2. \]
Hence \(f(-1)\ne f(1)\), so the function is not even.
We now check whether the function is odd. This would require
\[ f(-x)=-f(x) \]
for every \(x\in\mathbb R\). We compute:
\[ -f(x)=-(x^2+x)=-x^2-x. \]
But in general
\[ x^2-x\ne -x^2-x. \]
For instance, for \(x=1\) we already found \(f(-1)=0\), whereas
\[ -f(1)=-2. \]
Hence \(f(-1)\ne -f(1)\), so the function is not odd.
Therefore \(f\) is neither even nor odd.
Exercise 5 — level ★★☆☆☆
Determine whether the function
\[ f:[0,+\infty)\to\mathbb R,\qquad f(x)=x^2 \]
is even.
Answer
The function is not considered even, because its domain is not symmetric about the origin.
Solution
The function is given by the rule
\[ f(x)=x^2. \]
Considered on all of \(\mathbb R\), this expression describes an even function. In this exercise, however, the function is defined not on \(\mathbb R\) but on
\[ [0,+\infty). \]
Before testing for parity, we must therefore examine the domain.
The domain
\[ X=[0,+\infty) \]
is not symmetric about the origin. Indeed,
\[ 1\in X, \]
but
\[ -1\notin X. \]
This means that, for \(x=1\), the value \(f(1)\) is defined, whereas \(f(-1)\) is not.
Consequently, the condition
\[ f(-x)=f(x) \]
cannot be tested for every \(x\) in the domain.
For this reason the function
\[ f:[0,+\infty)\to\mathbb R,\qquad f(x)=x^2 \]
is not considered an even function.
Exercise 6 — level ★★☆☆☆
Determine whether the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=3x^4-5x^2+7 \]
is even, odd, or neither.
Answer
The function is even.
Solution
The domain of the function is \(\mathbb R\), which is therefore symmetric about the origin.
We may thus compute \(f(-x)\) and compare it with \(f(x)\). We have
\[ f(-x)=3(-x)^4-5(-x)^2+7. \]
Recall that a power with an even exponent does not change sign when \(x\) is replaced by \(-x\). Indeed,
\[ (-x)^4=x^4,\qquad (-x)^2=x^2. \]
Hence
\[ f(-x)=3x^4-5x^2+7. \]
But this is precisely the expression for \(f(x)\):
\[ f(x)=3x^4-5x^2+7. \]
Therefore, for every \(x\in\mathbb R\),
\[ f(-x)=f(x). \]
By definition, the function is even.
Exercise 7 — level ★★☆☆☆
Determine whether the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=2x^5-3x^3+x \]
is even, odd, or neither.
Answer
The function is odd.
Solution
The domain of the function is \(\mathbb R\), which is therefore symmetric about the origin.
Compute \(f(-x)\):
\[ f(-x)=2(-x)^5-3(-x)^3+(-x). \]
Powers with an odd exponent change sign when \(x\) is replaced by \(-x\). Indeed,
\[ (-x)^5=-x^5,\qquad (-x)^3=-x^3. \]
Hence
\[ f(-x)=2(-x^5)-3(-x^3)-x. \]
Simplifying:
\[ f(-x)=-2x^5+3x^3-x. \]
Now compute \(-f(x)\). Since
\[ f(x)=2x^5-3x^3+x, \]
we have
\[ -f(x)=-(2x^5-3x^3+x). \]
Distributing the minus sign:
\[ -f(x)=-2x^5+3x^3-x. \]
Thus \(f(-x)\) and \(-f(x)\) coincide:
\[ f(-x)=-f(x). \]
Since this equality holds for every \(x\in\mathbb R\), the function is odd.
Exercise 8 — level ★★☆☆☆
Determine whether the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=x^2+\cos x \]
is even, odd, or neither.
Answer
The function is even.
Solution
The domain of the function is \(\mathbb R\), which is therefore symmetric about the origin.
Compute \(f(-x)\):
\[ f(-x)=(-x)^2+\cos(-x). \]
We now use two familiar properties:
\[ (-x)^2=x^2 \]
and
\[ \cos(-x)=\cos x. \]
The first equality holds because the power has an even exponent; the second expresses the fact that the cosine is an even function.
Substituting these identities, we obtain
\[ f(-x)=x^2+\cos x. \]
But
\[ f(x)=x^2+\cos x. \]
Hence, for every \(x\in\mathbb R\),
\[ f(-x)=f(x). \]
By definition, \(f\) is even.
This result is also consistent with the general rule: the sum of two even functions is again even.
Exercise 9 — level ★★☆☆☆
Determine whether the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=x^3+x^2 \]
is even, odd, or neither.
Answer
The function is neither even nor odd.
Solution
The domain of the function is \(\mathbb R\), which is therefore symmetric about the origin.
Compute \(f(-x)\):
\[ f(-x)=(-x)^3+(-x)^2. \]
Since
\[ (-x)^3=-x^3,\qquad (-x)^2=x^2, \]
we obtain
\[ f(-x)=-x^3+x^2. \]
We first compare \(f(-x)\) with \(f(x)\). Since
\[ f(x)=x^3+x^2, \]
evenness would require
\[ -x^3+x^2=x^3+x^2 \]
for every \(x\in\mathbb R\). This equality does not hold in general. For instance, for \(x=1\) we have
\[ f(-1)=(-1)^3+(-1)^2=-1+1=0, \]
whereas
\[ f(1)=1^3+1^2=2. \]
Hence the function is not even.
We now check whether it is odd. Compute \(-f(x)\):
\[ -f(x)=-(x^3+x^2)=-x^3-x^2. \]
Oddness would require
\[ f(-x)=-f(x). \]
But we have
\[ f(-x)=-x^3+x^2 \]
and
\[ -f(x)=-x^3-x^2. \]
These two expressions do not coincide in general. For instance, for \(x=1\) we have \(f(-1)=0\), whereas \(-f(1)=-2\).
Hence the function is not odd.
Therefore \(f\) is neither even nor odd.
Exercise 10 — level ★★☆☆☆
Determine whether the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=0 \]
is even, odd, or both.
Answer
The function is both even and odd.
Solution
The domain of the function is \(\mathbb R\), which is therefore symmetric about the origin.
The function is identically zero, that is,
\[ f(x)=0 \]
for every \(x\in\mathbb R\).
Compute \(f(-x)\). Since \(-x\) is also a real number, we have
\[ f(-x)=0. \]
Compare \(f(-x)\) with \(f(x)\). Since \(f(x)=0\), we obtain
\[ f(-x)=0=f(x). \]
Hence the function is even.
Now compare \(f(-x)\) with \(-f(x)\). Since \(f(x)=0\), we have
\[ -f(x)=-0=0. \]
Hence
\[ f(-x)=0=-f(x). \]
Thus the function is also odd.
Therefore the zero function is both even and odd. More generally, on a symmetric domain, a real-valued function that is both even and odd must be identically zero.
Exercise 11 — level ★★★☆☆
Determine whether the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=(x^2+1)\sin x \]
is even, odd, or neither.
Answer
The function is odd.
Solution
The domain of the function is \(\mathbb R\), which is therefore symmetric about the origin.
Compute \(f(-x)\):
\[ f(-x)=((-x)^2+1)\sin(-x). \]
We examine the two factors separately.
For the first factor we have
\[ (-x)^2+1=x^2+1. \]
For the second factor, using the oddness of the sine, we have
\[ \sin(-x)=-\sin x. \]
Substituting these two identities, we obtain
\[ f(-x)=(x^2+1)(-\sin x). \]
Hence
\[ f(-x)=-(x^2+1)\sin x. \]
But
\[ f(x)=(x^2+1)\sin x. \]
Therefore
\[ f(-x)=-f(x). \]
By definition, the function is odd.
The result is consistent with the general rule: the product of an even function and an odd function is odd.
Exercise 12 — level ★★★☆☆
Determine whether the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=x\sin x \]
is even, odd, or neither.
Answer
The function is even.
Solution
The domain of the function is \(\mathbb R\), which is therefore symmetric about the origin.
Compute \(f(-x)\):
\[ f(-x)=(-x)\sin(-x). \]
We use the relation
\[ \sin(-x)=-\sin x. \]
Substituting, we obtain
\[ f(-x)=(-x)(-\sin x). \]
The product of two negative factors is positive, so
\[ f(-x)=x\sin x. \]
But
\[ f(x)=x\sin x. \]
Hence
\[ f(-x)=f(x). \]
By definition, the function is even.
This result, too, is consistent with the general rule: the product of two odd functions is even. Indeed, \(x\mapsto x\) is odd and \(x\mapsto\sin x\) is odd.
Exercise 13 — level ★★★☆☆
Determine whether the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=\frac{x^2+1}{x^4+1} \]
is even, odd, or neither.
Answer
The function is even.
Solution
First we examine the domain. The denominator is
\[ x^4+1. \]
Since \(x^4\ge 0\) for every \(x\in\mathbb R\), we have
\[ x^4+1>0 \]
for every \(x\in\mathbb R\). The denominator therefore never vanishes, and the domain is \(\mathbb R\).
The domain is thus symmetric about the origin.
Compute \(f(-x)\):
\[ f(-x)=\frac{(-x)^2+1}{(-x)^4+1}. \]
Since
\[ (-x)^2=x^2,\qquad (-x)^4=x^4, \]
we obtain
\[ f(-x)=\frac{x^2+1}{x^4+1}. \]
But
\[ f(x)=\frac{x^2+1}{x^4+1}. \]
Hence
\[ f(-x)=f(x). \]
By definition, the function is even.
Exercise 14 — level ★★★☆☆
Determine whether the function
\[ f:X\to\mathbb R,\qquad f(x)=\tan x, \]
where
\[ X=\mathbb R\setminus\left\{\frac{\pi}{2}+k\pi\mid k\in\mathbb Z\right\}, \]
is even, odd, or neither.
Answer
The function is odd.
Solution
Before checking the condition \(f(-x)=f(x)\) or \(f(-x)=-f(x)\), we must verify that the domain is symmetric about the origin.
The tangent function is undefined at the points
\[ \frac{\pi}{2}+k\pi,\qquad k\in\mathbb Z. \]
Hence the domain is
\[ X=\mathbb R\setminus\left\{\frac{\pi}{2}+k\pi\mid k\in\mathbb Z\right\}. \]
We check that \(X\) is symmetric about the origin. The negative of an excluded point is
\[ -\left(\frac{\pi}{2}+k\pi\right). \]
Simplifying:
\[ -\left(\frac{\pi}{2}+k\pi\right)=-\frac{\pi}{2}-k\pi. \]
We rewrite this quantity in the form \(\displaystyle\frac{\pi}{2}+m\pi\), with \(m\in\mathbb Z\):
\[ -\frac{\pi}{2}-k\pi=\frac{\pi}{2}+(-k-1)\pi. \]
Since \(-k-1\in\mathbb Z\), the negative of an excluded point is again an excluded point.
Consequently, if \(x\in X\) then \(-x\in X\) as well. The domain is therefore symmetric about the origin.
Now compute \(f(-x)\):
\[ f(-x)=\tan(-x). \]
Since the tangent is an odd function, we have
\[ \tan(-x)=-\tan x. \]
Hence
\[ f(-x)=-\tan x. \]
But \(f(x)=\tan x\), so
\[ f(-x)=-f(x). \]
By definition, \(f\) is odd.
Exercise 15 — level ★★★☆☆
Evaluate the integral
\[ \int_{-2}^{2}(x^4+3x^2)\,dx \]
using the evenness of the integrand.
Answer
\[ \int_{-2}^{2}(x^4+3x^2)\,dx=\frac{144}{5}. \]
Solution
Consider the integrand
\[ f(x)=x^4+3x^2. \]
We verify that it is even:
\[ f(-x)=(-x)^4+3(-x)^2. \]
Since
\[ (-x)^4=x^4,\qquad (-x)^2=x^2, \]
we obtain
\[ f(-x)=x^4+3x^2=f(x). \]
Hence \(f\) is even.
The interval of integration is
\[ [-2,2], \]
which is symmetric about the origin. For an even function integrable on \([-a,a]\), we have
\[ \int_{-a}^{a}f(x)\,dx=2\int_0^a f(x)\,dx. \]
In our case \(a=2\). Thus
\[ \int_{-2}^{2}(x^4+3x^2)\,dx = 2\int_0^2(x^4+3x^2)\,dx. \]
We compute the integral:
\[ 2\int_0^2(x^4+3x^2)\,dx = 2\left[\frac{x^5}{5}+x^3\right]_0^2. \]
Evaluating at the endpoints:
\[ 2\left[\frac{x^5}{5}+x^3\right]_0^2 = 2\left(\frac{2^5}{5}+2^3-\frac{0^5}{5}-0^3\right). \]
Hence
\[ 2\left(\frac{2^5}{5}+2^3\right) = 2\left(\frac{32}{5}+8\right). \]
Bringing everything to a common denominator:
\[ 8=\frac{40}{5}. \]
Therefore
\[ 2\left(\frac{32}{5}+\frac{40}{5}\right) = 2\cdot\frac{72}{5} = \frac{144}{5}. \]
We conclude that
\[ \int_{-2}^{2}(x^4+3x^2)\,dx=\frac{144}{5}. \]
Exercise 16 — level ★★★☆☆
Evaluate the integral
\[ \int_{-3}^{3}(x^5-4x)\,dx \]
using the oddness of the integrand.
Answer
\[ \int_{-3}^{3}(x^5-4x)\,dx=0. \]
Solution
Consider the integrand
\[ f(x)=x^5-4x. \]
We check whether \(f\) is odd. Compute \(f(-x)\):
\[ f(-x)=(-x)^5-4(-x). \]
Since
\[ (-x)^5=-x^5 \]
and
\[ -4(-x)=4x, \]
we obtain
\[ f(-x)=-x^5+4x. \]
Now compute \(-f(x)\):
\[ -f(x)=-(x^5-4x). \]
Distributing the minus sign:
\[ -f(x)=-x^5+4x. \]
We therefore have
\[ f(-x)=-f(x). \]
The function \(f\) is odd.
The interval of integration is
\[ [-3,3], \]
which is symmetric about the origin.
Since the integral of an odd function over an interval symmetric about the origin vanishes, we obtain directly
\[ \int_{-3}^{3}(x^5-4x)\,dx=0. \]
Geometrically, the signed areas over the two halves of the interval cancel: the contribution on \([-3,0]\) is the negative of the contribution on \([0,3]\).
Exercise 17 — level ★★★★☆
Evaluate the integral
\[ \int_{-1}^{1}(x^4+x^3+2)\,dx \]
by exploiting the even and odd parity of the terms of the integrand.
Answer
\[ \int_{-1}^{1}(x^4+x^3+2)\,dx=\frac{22}{5}. \]
Solution
Consider the integrand
\[ f(x)=x^4+x^3+2. \]
As a whole this function is neither even nor odd: it contains a nonzero even part and a nonzero odd part. Nevertheless, we can split it into two parts:
\[ f(x)=(x^4+2)+x^3. \]
The function
\[ x\mapsto x^4+2 \]
is even, since it contains only even powers of \(x\) together with a constant term.
The function
\[ x\mapsto x^3 \]
is odd, because
\[ (-x)^3=-x^3. \]
We may therefore write
\[ \int_{-1}^{1}(x^4+x^3+2)\,dx = \int_{-1}^{1}(x^4+2)\,dx+\int_{-1}^{1}x^3\,dx. \]
The interval \([-1,1]\) is symmetric about the origin. Since \(x^3\) is odd, its integral over \([-1,1]\) vanishes:
\[ \int_{-1}^{1}x^3\,dx=0. \]
There remains
\[ \int_{-1}^{1}(x^4+x^3+2)\,dx = \int_{-1}^{1}(x^4+2)\,dx. \]
Since \(x^4+2\) is even, we can halve the interval and double the integral:
\[ \int_{-1}^{1}(x^4+2)\,dx = 2\int_0^1(x^4+2)\,dx. \]
We compute:
\[ 2\int_0^1(x^4+2)\,dx = 2\left[\frac{x^5}{5}+2x\right]_0^1. \]
Evaluating at the endpoints:
\[ 2\left[\frac{x^5}{5}+2x\right]_0^1 = 2\left(\frac{1^5}{5}+2\cdot 1-\frac{0^5}{5}-2\cdot 0\right). \]
Hence
\[ 2\left(\frac{1}{5}+2\right) = 2\left(\frac{1}{5}+\frac{10}{5}\right) = 2\cdot\frac{11}{5} = \frac{22}{5}. \]
Therefore
\[ \int_{-1}^{1}(x^4+x^3+2)\,dx=\frac{22}{5}. \]
Exercise 18 — level ★★★★☆
Decompose the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=x^3+x^2+x+1 \]
as the sum of its even part and its odd part.
Answer
The even part is
\[ f_p(x)=x^2+1. \]
The odd part is
\[ f_d(x)=x^3+x. \]
Hence
\[ f(x)=f_p(x)+f_d(x)=(x^2+1)+(x^3+x). \]
Solution
The domain of the function is \(\mathbb R\), which is symmetric about the origin. We may therefore use the formulas for the decomposition into even and odd parts.
The even part of \(f\) is defined by
\[ f_p(x)=\frac{f(x)+f(-x)}{2}. \]
The odd part of \(f\) is defined by
\[ f_d(x)=\frac{f(x)-f(-x)}{2}. \]
We first compute \(f(-x)\). Since
\[ f(x)=x^3+x^2+x+1, \]
we obtain
\[ f(-x)=(-x)^3+(-x)^2+(-x)+1. \]
Simplifying:
\[ f(-x)=-x^3+x^2-x+1. \]
Now compute the even part:
\[ f_p(x)=\frac{f(x)+f(-x)}{2}. \]
Substituting the expressions found:
\[ f_p(x)=\frac{(x^3+x^2+x+1)+(-x^3+x^2-x+1)}{2}. \]
Collecting like terms:
\[ x^3-x^3=0,\qquad x-x=0, \]
while
\[ x^2+x^2=2x^2,\qquad 1+1=2. \]
Hence
\[ f_p(x)=\frac{2x^2+2}{2}=x^2+1. \]
Now compute the odd part:
\[ f_d(x)=\frac{f(x)-f(-x)}{2}. \]
Substituting:
\[ f_d(x)=\frac{(x^3+x^2+x+1)-(-x^3+x^2-x+1)}{2}. \]
Changing the signs inside the second parentheses:
\[ f_d(x)=\frac{x^3+x^2+x+1+x^3-x^2+x-1}{2}. \]
Collecting like terms:
\[ x^3+x^3=2x^3,\qquad x+x=2x, \]
while
\[ x^2-x^2=0,\qquad 1-1=0. \]
Hence
\[ f_d(x)=\frac{2x^3+2x}{2}=x^3+x. \]
We have thus obtained the decomposition
\[ f(x)=f_p(x)+f_d(x)=(x^2+1)+(x^3+x). \]
The first bracket is an even function, while the second is odd.
Exercise 19 — level ★★★★☆
Decompose the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=e^x \]
as the sum of its even part and its odd part.
Answer
The even part is
\[ f_p(x)=\frac{e^x+e^{-x}}{2}=\cosh x. \]
The odd part is
\[ f_d(x)=\frac{e^x-e^{-x}}{2}=\sinh x. \]
Hence
\[ e^x=\cosh x+\sinh x. \]
Solution
The domain of the function \(f(x)=e^x\) is \(\mathbb R\), which is therefore symmetric about the origin.
We may use the formulas
\[ f_p(x)=\frac{f(x)+f(-x)}{2} \]
and
\[ f_d(x)=\frac{f(x)-f(-x)}{2}. \]
Since
\[ f(x)=e^x, \]
we have
\[ f(-x)=e^{-x}. \]
Compute the even part:
\[ f_p(x)=\frac{e^x+e^{-x}}{2}. \]
This is, by definition, the hyperbolic cosine:
\[ \cosh x=\frac{e^x+e^{-x}}{2}. \]
Hence
\[ f_p(x)=\cosh x. \]
Now compute the odd part:
\[ f_d(x)=\frac{e^x-e^{-x}}{2}. \]
This is, by definition, the hyperbolic sine:
\[ \sinh x=\frac{e^x-e^{-x}}{2}. \]
Hence
\[ f_d(x)=\sinh x. \]
Therefore the decomposition of \(e^x\) as the sum of its even and odd parts is
\[ e^x=\cosh x+\sinh x. \]
Exercise 20 — level ★★★★★
Decompose the function
\[ f:\mathbb R\to\mathbb R,\qquad f(x)=\frac{x+1}{x^2+1} \]
as the sum of its even part and its odd part.
Answer
The even part is
\[ f_p(x)=\frac{1}{x^2+1}. \]
The odd part is
\[ f_d(x)=\frac{x}{x^2+1}. \]
Hence
\[ \frac{x+1}{x^2+1} = \frac{1}{x^2+1} + \frac{x}{x^2+1}. \]
Solution
The domain of the function is \(\mathbb R\), because the denominator
\[ x^2+1 \]
is always positive and therefore never vanishes.
The domain is thus symmetric about the origin.
To decompose \(f\) as the sum of its even part and its odd part, we use the formulas
\[ f_p(x)=\frac{f(x)+f(-x)}{2} \]
and
\[ f_d(x)=\frac{f(x)-f(-x)}{2}. \]
Compute \(f(-x)\):
\[ f(-x)=\frac{-x+1}{(-x)^2+1}. \]
Since
\[ (-x)^2=x^2, \]
we obtain
\[ f(-x)=\frac{1-x}{x^2+1}. \]
Now compute the even part:
\[ f_p(x)=\frac{f(x)+f(-x)}{2}. \]
Substituting the two expressions:
\[ f_p(x)=\frac{\frac{x+1}{x^2+1}+\frac{1-x}{x^2+1}}{2}. \]
The two fractions have the same denominator, so we may add the numerators:
\[ f_p(x)=\frac{\frac{x+1+1-x}{x^2+1}}{2}. \]
Simplifying the numerator:
\[ x+1+1-x=2. \]
Hence
\[ f_p(x)=\frac{\frac{2}{x^2+1}}{2}. \]
Dividing by \(2\) amounts to multiplying by \(\displaystyle\frac12\), so
\[ f_p(x)=\frac{1}{x^2+1}. \]
Now compute the odd part:
\[ f_d(x)=\frac{f(x)-f(-x)}{2}. \]
Substituting:
\[ f_d(x)=\frac{\frac{x+1}{x^2+1}-\frac{1-x}{x^2+1}}{2}. \]
Here too the two fractions share the same denominator:
\[ f_d(x)=\frac{\frac{x+1-(1-x)}{x^2+1}}{2}. \]
Simplifying the numerator:
\[ x+1-(1-x)=x+1-1+x=2x. \]
Hence
\[ f_d(x)=\frac{\frac{2x}{x^2+1}}{2}. \]
Dividing by \(2\), we obtain
\[ f_d(x)=\frac{x}{x^2+1}. \]
Therefore the function decomposes as
\[ f(x)=f_p(x)+f_d(x) = \frac{1}{x^2+1} + \frac{x}{x^2+1}. \]
The function
\[ x\mapsto \frac{1}{x^2+1} \]
is even, while the function
\[ x\mapsto \frac{x}{x^2+1} \]
is odd. The decomposition obtained is thus consistent with the general formulas.