Recognize a useful trig identity
A squared tangent
The chalk curve is \(\tan^2 x\), and the teal region lies under it from \(x = 0\) to \(x = \tfrac{\pi}{4}\). No basic antiderivative rule fits \(\tan^2 x\). The orange line stands from the x-axis up to the curve. Drag it to read the height.
An identity is an equation that is true for every \(x\) where both sides have a value. Start from \(\sin^2 x + \cos^2 x = 1\) and divide every term by \(\cos^2 x\). The result is \(\tan^2 x + 1 = \sec^2 x\).
This gives \(\tan^2 x = \sec^2 x - 1\). Press the button. The orange dashed curve is \(\sec^2 x - 1\), and it lies on the chalk curve, as the readouts show.
An antiderivative of \(\sec^2 x\) is \(\tan x\), because the slope of \(\tan x\) is \(\sec^2 x\). An antiderivative of 1 is \(x\).
Then the region splits. The teal region under \(\sec^2 x\) has area \(\tan\tfrac{\pi}{4} - \tan 0 = 1\). The red strip is what the term \(-1\) takes away, with height 1 and width \(\tfrac{\pi}{4}\). The area under \(\tan^2 x\) is the difference, \(1 - \tfrac{\pi}{4}\), about 0.215.
Any square of sine or cosine
The integrand is the square of a trigonometric function. Choose an identity that rewrites it as terms that each have a known antiderivative.
Move the slider from sine squared to cosine squared. The dashed orange curve is the rewritten form. It stays on the chalk curve the whole way, because an identity does not change the values.
Each square becomes one half plus a wave, so the teal region lies under a flat line at height one half. The wave is green where it adds area and red where it takes area away, with the opposite sign for cosine squared.
Notation
The Pythagorean identity relates the squares of sine and cosine. Divide every term by \(\cos^2 x\) to find the second identity.
\[\begin{aligned} \sin^2 x + \cos^2 x &= 1 \\ 1 + \tan^2 x &= \sec^2 x \end{aligned}\]Solve the double-angle identity \(\cos 2x = 1 - 2\sin^2 x = 2\cos^2 x - 1\) for the square. Each formula replaces a square by \(\cos 2x\), which has a known antiderivative.
\[\begin{aligned} \sin^2 x &= \dfrac{1 - \cos 2x}{2} \\ \cos^2 x &= \dfrac{1 + \cos 2x}{2} \end{aligned}\]Choose the identity whose terms you can integrate. For \(\tan^2 x\) that is \(\sec^2 x - 1\), because \(\sec^2 x\) has the antiderivative \(\tan x\). The teal region and the red strip show the two terms.
\[\begin{aligned} \int \tan^2 x\,dx &= \int \left(\cb{\sec^2 x} \cr{- 1}\right)dx \\ &= \tan x - x + C \end{aligned}\]An identity holds only where both sides have a value. The functions \(\tan x\) and \(\sec x\) have no value at \(x = \tfrac{\pi}{2} + k\pi\), for every integer \(k\).
When it fails
The curve \(\tan^2 x\) has no value at \(x = \tfrac{\pi}{2}\), and near that point it rises without end.
The antiderivative \(\tan x - x\) has no value there either, so the rule cannot find the area of a region that crosses \(\tfrac{\pi}{2}\). Keep the interval inside one stretch where \(\tan x\) has a value.
Example 1: a square of cosine
Evaluate \(\displaystyle\int_0^{\pi/4} \cos^2 x\,dx\).
The square of the cosine is not in the table of basic antiderivatives. Use the double-angle identity.
\[\cos^2 x = \dfrac{1}{2} + \dfrac{1}{2}\cos 2x\]Integrate each term. The slope of \(\sin 2x\) is \(2\cos 2x\), so an antiderivative of \(\tfrac12\cos 2x\) is \(\tfrac14\sin 2x\).
\[\int \cos^2 x\,dx = \dfrac{x}{2} + \dfrac{\sin 2x}{4} + C\]Evaluate from 0 to \(\tfrac{\pi}{4}\), where \(\sin\tfrac{\pi}{2} = 1\) and \(\sin 0 = 0\). The teal rectangle, from the term \(\tfrac12\), has area \(\tfrac{\pi}{8}\), and the green region, from the term \(\tfrac12\cos 2x\), has area \(\tfrac14\).
\[\left[\dfrac{x}{2} + \dfrac{\sin 2x}{4}\right]_0^{\pi/4} = \cb{\dfrac{\pi}{8} + \dfrac{1}{4}}\]
Example 2: a cubed sine
Evaluate \(\displaystyle\int_0^{\pi/2} \sin^3 x\,dx\).
The power 3 is odd, so split off one factor \(\sin x\) and leave a square.
\[\sin^3 x = \sin x\cdot\sin^2 x\]A tempting wrong move: Replace \(\sin^2 x\) by \(\cos^2 x - 1\).
\[\sin x\left(\cr{\cos^2 x - 1}\right)\]The square \(\sin^2 x\) is never negative, but \(\cos^2 x - 1\) is 0 or negative. The red curve is the mirror image of the chalk curve below the x-axis, so it gives the area \(-\tfrac23\) instead of \(\tfrac23\).
Solve the Pythagorean identity for the square: \(\sin^2 x = 1 - \cos^2 x\). The orange dashed curve lies on the chalk curve.
\[\sin^3 x = \sin x\left(1 - \cos^2 x\right)\]The slope of \(\cos x\) is \(-\sin x\), so let \(u = \cos x\). Then \(du = -\sin x\,dx\), and the factor \(\sin x\,dx\) becomes \(-du\).
\[-\int (1 - u^2)\,du = -u + \dfrac{u^3}{3}\]Replace \(u\) by \(\cos x\) and evaluate from 0 to \(\tfrac{\pi}{2}\), where \(\cos\tfrac{\pi}{2} = 0\) and \(\cos 0 = 1\).
\[\begin{aligned} &\left[-\cos x + \dfrac{\cos^3 x}{3}\right]_0^{\pi/2} \\ &\quad = 0 - \left(-\dfrac{2}{3}\right) = \cb{\dfrac{2}{3}} \end{aligned}\]
Practice
Evaluate \(\displaystyle\int_0^{\pi/4} \sin^2(2x)\,dx\).
Use the double-angle formula for \(\sin^2\). The angle inside the square is \(2x\).
Solution
Write the square with the double-angle formula. The angle is \(2x\), so the formula has \(\cos 4x\).
\[\sin^2(2x) = \dfrac{1 - \cos 4x}{2}\]Integrate each term. The slope of \(\sin 4x\) is \(4\cos 4x\), so an antiderivative of \(\tfrac12\cos 4x\) is \(\tfrac18\sin 4x\).
\[\int \sin^2(2x)\,dx = \dfrac{x}{2} - \dfrac{\sin 4x}{8} + C\]Evaluate from 0 to \(\tfrac{\pi}{4}\), where \(\sin\pi = 0\). The red and green pieces of the wave cancel, so the area is the teal rectangle, \(\tfrac{\pi}{8}\).
\[\left[\dfrac{x}{2} - \dfrac{\sin 4x}{8}\right]_0^{\pi/4} = \dfrac{\pi}{8}\]
Questions
The chalk curve is \(\sin^2 x\). The dashed rectangle runs from \(x = 0\) to \(x = \pi\) and has height 1. The orange dot marks \(x = \tfrac{\pi}{6}\), where \(\sin^2 x = \tfrac14\).
At \(x = \tfrac{\pi}{6}\) the height of \(\sin^2 x\) is \(\tfrac14\). What is the height of \(\cos^2 x\) there?
- \(\tfrac34\)
- \(\tfrac14\)
- 1
Answer
\(\tfrac34\)
The teal region and the green region have equal areas, and together they fill the dashed rectangle. What is \(\displaystyle\int_0^{\pi} \sin^2 x\,dx\)?
- \(\tfrac{\pi}{2}\)
- \(\pi\)
- \(\tfrac{\pi}{4}\)
Answer
\(\tfrac{\pi}{2}\)
Evaluate \(\displaystyle\int_0^{\pi/2} 6\cos^2 x\,dx\).
- \(\tfrac{3\pi}{2}\)
- \(3\pi\)
- \(\tfrac{3\pi}{4}\)
Answer
\(\tfrac{3\pi}{2}\)
Summary
You rewrite a square of a trigonometric function with an identity, so that every term has a known antiderivative.
This works because an identity keeps the value of the integrand at every x where both sides have a value.
You use the Pythagorean form to remove tan squared or an odd power, and the double-angle form to remove sin squared or cos squared.
This is one of four skills in topic 6.10 of Which & Why: AP Calculus.