Definite Integrals Of Symmetric Functions

If the graph of a function is symmetric, its definite integral over a symmetric interval [ a , a ] can be simplified, and in the odd case it can be written down with no computation at all.

FormulaNameTest
a a f ( x ) d x = 0 Odd Function Rule f ( x ) = f ( x )
a a f ( x ) d x = 2 0 a f ( x ) d x Even Function Rule f ( x ) = f ( x )
x ,   x 3 ,   x 5 ,   sin x ,   tan x Standard Odd FunctionsSymmetric about the origin
1 ,   x 2 ,   x 4 ,   cos x ,   | x | Standard Even FunctionsSymmetric about the y -axis
(odd) × (even) is odd; (odd) × (odd) is evenProductsSame sign rules as multiplication

The Symmetry Theorem


Suppose that f is continuous on the symmetric interval [ a , a ] .

  1. If f is an odd function, then a a f ( x ) d x = 0 .
  2. If f is an even function, then a a f ( x ) d x = 2 0 a f ( x ) d x .

Both statements are visually obvious. For an odd function, the piece of the region to the left of the y -axis is the mirror image of the piece on the right, rotated 180 degrees about the origin; whatever net area one contributes, the other contributes with the opposite sign, so they cancel. For an even function, the two halves are reflections in the y -axis and contribute equally, so the whole is twice either half.

Graph of an odd function on a symmetric interval, with equal areas above and below the x-axis cancelling
For an odd function, the integral from a to a is zero.
Graph of an even function on a symmetric interval, with two mirror-image regions of equal area
For an even function, the integral from a to a is twice the integral from 0 to a .


Proof of the Symmetry Theorem.

Proof

We can write

\int_{-a}^{a}f(x)\,dx=\int_{-a}^{0}f(x)\,dx+\int_{0}^{a}f(x)\,dx. \tag{i}

For the first integral on the right-hand side, let u = x . Then d u = d x ; we have u = a when x = a , and u = 0 when x = 0 . Therefore

\int_{-a}^{0}f(x)\,dx=-\int_{a}^{0}f(-u)\,du. \tag{ii}

(a) The odd case. If f is an odd function, then f ( u ) = f ( u ) and the right-hand side of Equation (ii) can be written as

\begin{aligned} -\int_{a}^{0}f(-u)\,du &=\int_{a}^{0}f(u)\,du\\ &=-\int_{0}^{a}f(u)\,du. \end{aligned}

For the last equation, we used the fact that a b f ( x ) d x = b a f ( x ) d x . Because the variable of integration in a definite integral is a dummy variable, we can write x instead of u :

0 a f ( u ) d u = 0 a f ( x ) d x .

So we have shown

\int_{-a}^{0}f(x)\,dx=-\int_{0}^{a}f(x)\,dx. \tag{iii}

Substituting (iii) into (i) gives

\begin{aligned} \int_{-a}^{a}f(x)\,dx &=-\int_{0}^{a}f(x)\,dx+\int_{0}^{a}f(x)\,dx\\ &=0. \end{aligned}

(b) The even case. If f is even, then

\begin{aligned} \int_{-a}^{a}f(x)\,dx &=\int_{-a}^{0}f(x)\,dx+\int_{0}^{a}f(x)\,dx &&{\small(\text{Eq. (i)})}\\ &=-\int_{a}^{0}f(-u)\,du+\int_{0}^{a}f(x)\,dx &&{\small(\text{let }u=-x)}\\ &=-\int_{a}^{0}f(u)\,du+\int_{0}^{a}f(x)\,dx &&{\small(f\text{ is even})}\\ &=\int_{0}^{a}f(u)\,du+\int_{0}^{a}f(x)\,dx &&{\small\left(\int_{0}^{a}f=-\int_{a}^{0}f\right)}\\ &=\int_{0}^{a}f(x)\,dx+\int_{0}^{a}f(x)\,dx &&{\small(u\text{ is a dummy variable})}\\ &=2\int_{0}^{a}f(x)\,dx. \end{aligned}

Applying the Rules

For example, because f ( x ) = sin ( x 3 ) is an odd function,

f ( x ) = sin ( ( x ) 3 ) = sin ( x 3 ) = sin ( x 3 ) = f ( x ) ,

we know immediately that

π π sin ( x 3 ) d x = 0.

This is worth appreciating: the function sin ( x 3 ) has no elementary antiderivative, so no amount of algebra would evaluate this integral. Symmetry answers it in one line.

Evaluate 2 2 ( x 5 3 x 3 + x ) d x .

Solution

Every term has an odd power of x , so the whole integrand is odd:

f ( x ) = ( x ) 5 3 ( x ) 3 + ( x ) = x 5 + 3 x 3 x = f ( x ) .

The interval [ 2 , 2 ] is symmetric about the origin, so

2 2 ( x 5 3 x 3 + x ) d x = 0.

Evaluate 1 1 ( x 4 + 3 x 2 + 2 ) d x .

Solution

All powers are even and the constant is even, so the integrand is even. By the Even Function Rule,

\begin{aligned} \int_{-1}^{1}\left(x^{4}+3x^{2}+2\right)dx &=2\int_{0}^{1}\left(x^{4}+3x^{2}+2\right)dx\\ &=2\left[\frac{x^{5}}{5}+x^{3}+2x\right]_{0}^{1}\\ &=2\left(\frac{1}{5}+1+2\right)=\frac{32}{5}. \end{aligned}

The saving here is modest, but the rule also removes a common source of sign errors: substituting a negative lower limit into odd powers.

A warning. Both rules require the interval to be symmetric about the origin. Nothing at all follows about 1 3 of an odd function, and nothing follows for 2 3 either.

Exercises


Classify each function as even, odd, or neither:

(a) f ( x ) = x 3 cos x

(b) f ( x ) = x 2 sin x

(c) f ( x ) = x 1 + x 2

(d) f ( x ) = e x

Answer

(a) odd   (b) odd   (c) odd   (d) neither

Solution

(a) x 3 is odd and cos x is even; odd times even is odd.

(b) x 2 is even and sin x is odd; even times odd is odd.

(c) The numerator is odd and the denominator is even, so the quotient is odd: f ( x ) = x 1 + x 2 = f ( x ) .

(d) e x equals neither e x nor e x , so e x is neither. (It does split into an even part cosh x and an odd part sinh x .)


Evaluate without antidifferentiating:

(a) 3 3 x 1 + x 4 d x

(b) π / 2 π / 2 x 2 sin x d x

(c) 5 5 x 7 cos ( x 2 ) d x

Answer

All three equal 0 .

Solution

Each integrand is odd and each interval is symmetric about the origin.

(a) Odd numerator over even denominator.

(b) Even times odd.

(c) x 7 is odd and cos ( x 2 ) is even, since cos ( ( x ) 2 ) = cos ( x 2 ) .

None of these has an antiderivative that is pleasant to find, which is exactly why the symmetry rule is worth checking first.


Evaluate 2 2 ( 3 x 2 + 1 ) d x using the Even Function Rule.

Answer

20

Solution

The integrand is even, so

2 2 ( 3 x 2 + 1 ) d x = 2 0 2 ( 3 x 2 + 1 ) d x = 2 [ x 3 + x ] 0 2 = 2 ( 8 + 2 ) = 20.


Evaluate a a ( x 3 + 2 x 2 5 x + 4 ) d x in terms of a .

Answer

4 a 3 3 + 8 a

Solution

Split the integrand into its odd part x 3 5 x and its even part 2 x 2 + 4 . The odd part contributes 0, so

\begin{aligned} \int_{-a}^{a}\left(x^{3}+2x^{2}-5x+4\right)dx &= 2\int_{0}^{a}\left(2x^{2}+4\right)dx\\ &= 2\left[\frac{2x^{3}}{3}+4x\right]_{0}^{a} = \frac{4a^{3}}{3}+8a. \end{aligned}

This split-into-parts technique works for any polynomial: keep the even-degree terms, discard the odd-degree ones.


Evaluate 1 1 | x | 3 d x .

Answer

1 2

Solution

Since | x | = | x | , the function | x | 3 is even (in contrast to x 3 , which is odd). Therefore

1 1 | x | 3 d x = 2 0 1 x 3 d x = 2 1 4 = 1 2 .

On [ 0 , 1 ] we could replace | x | by x because x 0 there. Note how the absolute value converts an odd function into an even one, changing the answer from 0 to 1 2 .


Suppose f is even and 0 4 f ( x ) d x = 9 . Find 4 4 f ( x ) d x and 4 0 f ( x ) d x .

Answer

18 and 9 respectively.

Solution

By the Even Function Rule, 4 4 f = 2 0 4 f = 18 . Then additivity gives

4 0 f = 4 4 f 0 4 f = 18 9 = 9 ,

which is just the statement that the two halves contribute equally.

If instead f were odd with 0 4 f = 9 , the answers would be 0 and 9 .


Prove that if f is odd and continuous, then F ( x ) = 0 x f ( t ) d t is an even function.

Answer

Substituting t = u in F ( x ) produces F ( x ) .

Solution

Compute F ( x ) and substitute t = u , so d t = d u ; when t = 0 , u = 0 , and when t = x , u = x :

\begin{aligned} F(-x) &= \int_{0}^{-x}f(t)\,dt = \int_{0}^{x}f(-u)(-du)\\ &= \int_{0}^{x}\left[-f(u)\right](-du) = \int_{0}^{x}f(u)\,du = F(x), \end{aligned}

where the third equality used oddness, f ( u ) = f ( u ) , and the two minus signs cancelled.

An alternative one-line argument: F'(x)=f(x) is odd, and the antiderivative of an odd function is even provided it vanishes at 0, which F does.


Evaluate π π ( sin 3 x + cos 2 x ) d x .

Answer

π

Solution

The term sin 3 x is odd, since an odd power of an odd function is odd, so it contributes 0. The term cos 2 x is even, so

\begin{aligned} \int_{-\pi}^{\pi}\left(\sin^{3}x+\cos^{2}x\right)dx &= 0+2\int_{0}^{\pi}\cos^{2}x\,dx\\ &= 2\int_{0}^{\pi}\frac{1+\cos2x}{2}\,dx\\ &= \left[x+\frac{\sin2x}{2}\right]_{0}^{\pi}=\pi. \end{aligned}


A student claims that 2 2 d x x 3 = 0 because the integrand is odd. Is the claim correct?

Answer

No. The integrand is odd, but it is not continuous on [ 2 , 2 ] , so the theorem does not apply and the integral does not exist.

Solution

The function 1 / x 3 is indeed odd, but it has a vertical asymptote at x = 0 , which lies inside the interval of integration. The symmetry theorem assumes f is continuous on [ a , a ] , and that hypothesis fails.

Splitting at the origin gives 2 0 d x x 3 and 0 2 d x x 3 , neither of which is a finite number, so the proposed "cancellation" is a cancellation of infinities and carries no meaning.

This is the same trap as the invalid evaluation of 1 1 d x x in Section 7.3: symmetry never rescues an integrand with an interior asymptote.


Show that every function f defined on [ a , a ] can be written as the sum of an even function and an odd function, and use the decomposition to explain why only the even part matters for a a f .

Answer

f ( x ) = f ( x ) + f ( x ) 2 even + f ( x ) f ( x ) 2 odd ; the odd part integrates to zero.

Solution

Define

E ( x ) = f ( x ) + f ( x ) 2 , O ( x ) = f ( x ) f ( x ) 2 .

Then E ( x ) = E ( x ) , so E is even, and O ( x ) = O ( x ) , so O is odd, and clearly E ( x ) + O ( x ) = f ( x ) .

Now integrate over the symmetric interval. By the Odd Function Rule the second piece vanishes, so

a a f ( x ) d x = a a E ( x ) d x = 2 0 a E ( x ) d x = 0 a [ f ( x ) + f ( x ) ] d x .

In words: on a symmetric interval, an integral can only "see" the even part of the integrand. For f ( x ) = e x , for example, the even part is cosh x , and indeed a a e x d x = 2 0 a cosh x d x = 2 sinh a .