3.2 Trigonometric Integrals

Products of powers of sine and cosine sorted by the parity of the exponents, the odd-power substitution, half-angle identities for all-even powers, secant and tangent products, product-to-sum identities, and reduction formulas.

Subject: Calculus II · 69 slides · symbolic lesson

Open the interactive version of this deck

What this lesson covers

The lesson, slide by slide

1. Trigonometric Integrals

Title

Calculus II · Section 3.2

Products and powers of sines, cosines, tangents and secants

2. What this lesson gives you

Objectives

Section 3.1 gave you integration by parts; before that you had substitution. This lesson shows that almost every product of trigonometric powers can be rearranged until one of those two tools finishes it.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, pp. 273-284 — learning objectives 3.2.1 to 3.2.3

This lesson adds no new integration rule. You already own the two tools it needs: substitution, from Calculus I, and integration by parts, from Section 3.1. What is new is a set of rearrangements that make those tools fit integrals they do not seem to fit, such as the integral of cosine to the eighth times sine to the fifth.

The rearrangements come from a handful of identities, and the choice of which one to use is made by reading the exponents. Odd or even is the whole decision for sines and cosines, and a very similar decision governs tangents and secants.

These integrals are not an end in themselves. The very next section, trigonometric substitution, turns square roots into exactly these products, and polar, cylindrical and spherical coordinates later in the course produce them constantly. Time spent getting fluent here pays back several times over.

3. Before anything new: six facts you will lean on

Warm-up

Discussion prompt

Without looking anything up, write the derivatives of sine, cosine, tangent and secant, then the Pythagorean identity and the version you get by dividing it through by cosine squared.

Write your answer before revealing. If any of the six took you more than a few seconds, spend a minute with it now, because every example in this lesson uses at least two of them and none of them will be restated each time.

The derivatives matter because a substitution needs its differential sitting in the integrand. Derivative of sine is cosine, derivative of cosine is minus sine, so each can serve as the other's differential. Derivative of tangent is secant squared and derivative of secant is secant times tangent, so those two pieces are the spare factors you will hunt for in the second half.

The identities matter because they convert. The first swaps squares of sine and cosine; the second, which you get by dividing the first through by cosine squared, swaps squares of tangent and secant. Notice that both convert squares and only squares. That single observation is why odd and even exponents behave so differently.

4. Odd powers of sine and cosine

Section

Part 1

5. Two shapes that substitution finishes

Concept

Substitution works when the integrand is a function of u times the derivative of u. Sine and cosine are each other's derivatives, up to a sign, so a power of one times a single copy of the other is already finished.

\[ \int \cos^j x\,\sin x\,dx: \quad u = \cos x, \; du = -\sin x\,dx \]

\[ \int \sin^j x\,\cos x\,dx: \quad u = \sin x, \; du = \cos x\,dx \]

The whole first half of this lesson is the art of rearranging a product of powers into one of these two shapes.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 273 — introduction to products and powers of sin x and cos x

Look at the two lines on the slide. In each one, a power of one function is multiplied by exactly one copy of the other. That lone factor is the derivative of the powered function, up to a sign, so a single substitution turns the whole thing into the integral of u to a power.

Everything in the first two parts of this lesson is a way of getting to one of those two shapes. When the integrand arrives in a different form, you will peel off a factor, convert what remains with the Pythagorean identity, and land here.

Keep the signs straight from the start. When u is cosine, du carries a minus sign; when u is sine, it does not. Most errors in this topic are not errors of strategy but of that one minus sign.

6. Example 3.8: one spare sine

Worked example

Evaluate a cosine power times a single sine.

\[ \int \cos^3 x\,\sin x\,dx \]

Let u be the function that carries the power

Why: Its derivative is the lone sine, up to a sign.

\[ u = \cos x, \quad du = -\sin x\,dx \]

Solve for the sine factor

Why: Multiply both sides by minus one.

\[ \sin x\,dx = -du \]

Substitute

Why: The minus sign comes out in front.

\[ \int \cos^3 x\,\sin x\,dx = -\int u^3\,du \]

Apply the power rule

Why: Raise the exponent to 4 and divide by 4.

\[ -\int u^3\,du = -\frac{u^4}{4} + C \]

Return to x

Why: Replace u by cos x.

\[ = -\frac14\cos^4 x + C \]

Check by differentiating

Why: Chain rule: bring down the 4, then multiply by the derivative of cosine, minus sine.

\[ \frac{d}{dx}\left(-\frac14\cos^4 x\right) = -\cos^3 x\cdot(-\sin x) = \cos^3 x\sin x \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 273 — Example 3.8

This is the simplest member of the family and it shows the entire mechanism. The powered function is cosine, so u is cosine, and the single sine together with dx is what du needs, apart from a minus sign.

Solving for sine x dx before substituting is a small habit worth keeping. It makes the minus sign appear on its own line where you can see it, instead of being tucked into the substitution where it is easy to lose.

After that the integral is the power rule, and returning to x gives minus one quarter cosine to the fourth. The check differentiates: the chain rule produces four cosine cubed times the derivative of cosine, which is minus sine, and the two minus signs cancel to give back the integrand exactly. Always run this check; it takes ten seconds and catches the sign every time.

7. Checkpoint 3.5: sine to the fourth times cosine

Prediction

\[ \int \sin^4 x\,\cos x\,dx \]

Predict first

Which antiderivative is correct?

  • sin⁵x/5 + C
  • −sin⁵x/5 + C
  • −cos⁵x/5 + C
  • sin⁵x cos²x/10 + C

Correct: sin⁵x/5 + C

Why: Let u = sin x, so du = cos x dx with no minus sign, and the integral is the integral of u to the fourth, u⁵/5. The minus sign belongs only to u = cos x. Differentiating sin⁵x/5 gives sin⁴x cos x back.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 273 — Checkpoint 3.5

Commit to an option before revealing. This is Example 3.8 with the roles swapped, and the question is designed to see whether you carry the minus sign over by habit.

Here the powered function is sine, so u is sine and du is cosine x dx, with no minus sign. The integral becomes the integral of u to the fourth, which is u to the fifth over five. The answer is sine to the fifth over five, plus C.

If you picked the negative version, you remembered that there was a minus sign somewhere without remembering where it lives. It belongs to the derivative of cosine only. The fourth option multiplies in a cosine squared that has no business being there: an antiderivative never contains extra factors of the integrand's pieces just to make the degrees look balanced.

8. An odd power can spare a factor

Concept

Only squares can be converted: the Pythagorean identity trades a sine squared for one minus cosine squared, and nothing trades a single sine.

\[ \sin^2 x = 1 - \cos^2 x \]

An odd power splits into an even power, which is a power of a square, times one spare factor:

\[ \sin^{2m+1}x = \left(\sin^2 x\right)^m\sin x = \left(1 - \cos^2 x\right)^m\sin x \]

What remains is a polynomial in cosine times the spare sine, exactly the first shape from two slides ago.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 274 — Example 3.9 and the strategy it previews

This slide is the reason parity matters, so take it slowly. The Pythagorean identity converts a square of sine into an expression in cosine. It cannot convert a single sine: the only way to write sine in terms of cosine is with a square root, and a square root ruins the substitution.

So look at what an odd power can do. Sine to an odd power is sine squared, raised to some whole number, times one extra sine. The squared part converts completely into cosines. The extra sine is left over, and a leftover sine is exactly the differential that u equal to cosine needs.

An odd power therefore splits into two useful pieces: a polynomial in the other function, and a spare differential. An even power has no spare factor to give away. Keep this picture in mind; the strategy lists in the textbook are this one idea, written out case by case.

9. Example 3.9: an odd power of sine

Worked example

\[ \int \cos^2 x\,\sin^3 x\,dx \]

Read the parity

Why: Sine carries the odd power, so a sine is the factor to peel.

\[ k = 3 \text{ is odd} \;\Rightarrow\; u = \cos x \]

Peel one sine off

Why: Leave an even power behind.

\[ \sin^3 x = \sin^2 x\,\sin x \]

Convert the square

Why: Pythagorean identity.

\[ \int \cos^2 x\left(1 - \cos^2 x\right)\sin x\,dx \]

Substitute

Why: With u equal to cos x, the spare sine and dx become minus du.

\[ = -\int u^2\left(1 - u^2\right)du \]

Expand

Why: Distribute the minus sign as well.

\[ = \int \left(u^4 - u^2\right)du \]

Integrate

Why: Power rule on each term.

\[ = \frac15 u^5 - \frac13 u^3 + C \]

Return to x

Why: Replace u by cos x.

\[ = \frac15\cos^5 x - \frac13\cos^3 x + C \]

Check by differentiating

Why: Each term brings out a factor of minus sine; then factor and use the identity backwards.

\[ \frac{d}{dx}\left[\tfrac15\cos^5 x - \tfrac13\cos^3 x\right] = -\cos^4 x\sin x + \cos^2 x\sin x \]

\[ = \cos^2 x\sin x\left(1 - \cos^2 x\right) = \cos^2 x\sin^3 x \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 274 — Example 3.9

The first move is to read the exponents: two on cosine, three on sine. Sine is the odd one, so a sine is peeled off and u will be cosine. Everything after that is forced.

The peeled sine joins dx to become minus du. The remaining sine squared converts to one minus cosine squared, and at that point the integrand is entirely cosines times the spare differential. Substituting gives a polynomial in u, which you expand and integrate term by term.

The check is worth doing in full because it runs the argument backwards. Differentiating each power of cosine brings out a minus sine; factoring out cosine squared times sine leaves one minus cosine squared, which is sine squared, and the product collapses back to cosine squared times sine cubed. Notice the identity appearing in reverse: the check is the peel-and-convert step undone.

10. The same area before and after the substitution

Picture it

Figure (svg): Two panels. Left: the curve y equals cos squared x times sin cubed x from x equals 0 to pi over 2, a single hump, shaded. Right: the curve y equals u squared times one minus u squared from u equals 0 to 1, also a single hump, shaded. Both shaded areas equal 2/15.

The substitution turns a trigonometric hump into a polynomial hump with exactly the same area. Note the direction flips: x equal to 0 is u equal to 1.

Put limits on Example 3.9. As x runs from 0 to pi over 2, u equal to cos x runs from 1 down to 0, and the minus sign in du turns the limits back round.

\[ \int_0^{\pi/2}\cos^2 x\sin^3 x\,dx = \int_0^1 u^2\left(1-u^2\right)du = \frac13 - \frac15 = \frac{2}{15} \]

The two panels show one number computed two ways. On the left is the region under cosine squared times sine cubed from 0 to pi over 2. On the right is the region under u squared times one minus u squared from 0 to 1. The substitution says they have the same area, and both come out to two fifteenths.

Watch the limits. As x goes from 0 up to pi over 2, cosine goes from 1 down to 0, so the u-integral would naturally run backwards, from 1 to 0. The minus sign from du flips it back round. That is why a correct definite substitution never needs you to go back to x: change the limits along with the variable.

The picture also shows what substitution really does. It does not change the area; it redraws the region so that its boundary is a polynomial, which you can integrate with the power rule.

11. Checkpoint 3.6: an odd power of cosine

Worked example

\[ \int \cos^3 x\,\sin^2 x\,dx \]

Read the parity

Why: Now cosine carries the odd power, so a cosine is peeled.

\[ j = 3 \text{ is odd} \;\Rightarrow\; u = \sin x \]

Peel one cosine off

Why: Leave cosine squared.

\[ \cos^3 x = \cos^2 x\,\cos x \]

Convert the square into sines

Why: Pythagorean identity, the other way round.

\[ \int \left(1 - \sin^2 x\right)\sin^2 x\,\cos x\,dx \]

Substitute

Why: With u equal to sin x, du is cos x dx: no minus sign this time.

\[ = \int \left(1 - u^2\right)u^2\,du \]

Expand

Why: Multiply out.

\[ = \int \left(u^2 - u^4\right)du \]

Integrate

Why: Power rule on each term.

\[ = \frac{u^3}{3} - \frac{u^5}{5} + C \]

Return to x

Why: Replace u by sin x.

\[ = \frac13\sin^3 x - \frac15\sin^5 x + C \]

Check by differentiating

Why: Each term brings out a cosine.

\[ \sin^2 x\cos x - \sin^4 x\cos x = \sin^2 x\cos x\left(1 - \sin^2 x\right) \]

\[ = \sin^2 x\cos^3 x \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 274 — Checkpoint 3.6

This is the mirror image of Example 3.9: now cosine carries the odd power and sine the even one. So peel a cosine, convert the cosine squared that remains into one minus sine squared, and let u be sine.

The most noticeable difference is the sign. With u equal to sine, du is cosine x dx, so no minus sign appears, and the polynomial is u squared minus u to the fourth rather than its negative.

The check again runs the identity backwards. Differentiating sine cubed over three and sine to the fifth over five each brings out a cosine; factoring gives sine squared times cosine times one minus sine squared, and one minus sine squared is cosine squared, so the result is sine squared times cosine cubed, exactly the integrand. If you ever get the two roles confused, the parity of the exponents tells you which function to peel.

12. Example 3.11: cosine to the eighth, sine to the fifth

Worked example

\[ \int \cos^8 x\,\sin^5 x\,dx \]

Peel one sine off the odd power

Why: Sine has the odd exponent, 5.

\[ = \int \cos^8 x\,\sin^4 x\,\sin x\,dx \]

Write the even power as a square

Why: So the identity can act on it.

\[ = \int \cos^8 x\left(\sin^2 x\right)^2\sin x\,dx \]

Convert with the identity

Why: Sine squared becomes one minus cosine squared.

\[ = \int \cos^8 x\left(1 - \cos^2 x\right)^2\sin x\,dx \]

Substitute u equal to cos x

Why: The spare sine and dx become minus du.

\[ = -\int u^8\left(1 - u^2\right)^2du \]

Expand the square

Why: One minus u squared, squared.

\[ = -\int u^8\left(1 - 2u^2 + u^4\right)du \]

Distribute

Why: Including the minus sign.

\[ = \int\left(-u^8 + 2u^{10} - u^{12}\right)du \]

Integrate

Why: Power rule, three times.

\[ = -\frac19 u^9 + \frac{2}{11}u^{11} - \frac{1}{13}u^{13} + C \]

Return to x

Why: Replace u by cos x.

\[ = -\frac19\cos^9 x + \frac{2}{11}\cos^{11}x - \frac{1}{13}\cos^{13}x + C \]

Check with a definite integral

Why: From 0 to pi over 2 the answer is 0 at the top and minus one ninth plus two elevenths minus one thirteenth at the bottom. Simpson's rule on the original integrand gives the same six digits.

\[ F\left(\tfrac{\pi}{2}\right) - F(0) = \frac19 - \frac{2}{11} + \frac{1}{13} = \frac{8}{1287} \approx 0.006216 \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 275 — Example 3.11

The exponents look intimidating, but only one of them matters for the strategy. Sine has the odd power, five, so a sine is peeled and u is cosine. The eighth power of cosine just rides along; it will become u to the eighth.

Sine to the fourth is sine squared, squared, so after the identity it becomes one minus cosine squared, squared. Expanding that square is where arithmetic slips happen, so do it on its own line: one, minus two u squared, plus u to the fourth. Then multiply by u to the eighth and by the minus sign.

The check here uses a definite integral instead of differentiating, because differentiating three powers of cosine is long. From 0 to pi over 2, the antiderivative is zero at the top, since cosine is zero there, and at the bottom it is minus a ninth plus two elevenths minus a thirteenth. The difference, eight over 1287, about 0.006216, matches Simpson's rule on the original integrand to six decimal places.

13. Both powers odd: two routes, one answer

Concept

When both exponents are odd, either factor can be peeled. Exercise 84 done both ways gives answers that look different:

\[ u = \cos x: \quad \int\sin^3 x\cos^3 x\,dx = -\frac{\cos^4 x}{4} + \frac{\cos^6 x}{6} + C \]

\[ u = \sin x: \quad \int\sin^3 x\cos^3 x\,dx = \frac{\sin^4 x}{4} - \frac{\sin^6 x}{6} + C \]

Figure (svg): Two antiderivatives of sin cubed x cos cubed x drawn from 0 to pi: minus cos to the fourth over 4 plus cos to the sixth over 6, which dips to minus one twelfth at the ends, and sin to the fourth over 4 minus sin to the sixth over 6, the same shape lifted by exactly one twelfth. A yellow arrow marks the constant gap.

Two different-looking answers, one shape. Every pair of antiderivatives differs by a constant, and here the constant is one twelfth.

Both are right. At x equal to 0 the first is minus one twelfth and the second is 0, and the gap stays one twelfth everywhere, a constant that C absorbs.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, pp. 275 and 283 — the note to strategy 2, and Exercise 84

When both exponents are odd, you have a genuine choice: peel a sine and use u equal to cosine, or peel a cosine and use u equal to sine. Both work, and the two answers on the slide look completely different.

The picture settles any worry. The two antiderivatives are the same curve, one lifted exactly one twelfth above the other. You can confirm the gap at a single point: at x equal to 0, the cosine version is minus a quarter plus a sixth, which is minus one twelfth, and the sine version is 0.

This matters for checking your work against an answer key or a computer algebra system. If your answer disagrees with the key, do not assume you are wrong. Differentiate yours, or evaluate both at two points and see whether they differ by the same constant. Antiderivatives are families, and any two members of a family differ by a constant.

14. Trap: losing the minus sign in du

Trap

The trap

A line seen on many papers:

\[ \int\cos^3 x\sin x\,dx = \int u^3\,du \]

\[ = \frac14\cos^4 x + C \]

Wrong. The sign in du went missing.

The fix

With u equal to cos x, du is minus sin x dx. The correct answer carries a minus sign:

\[ \int\cos^3 x\sin x\,dx = -\frac14\cos^4 x + C \]

Figure (svg): Over 0 to pi: the integrand cos cubed x sin x, positive on the first half and negative on the second; the correct antiderivative minus cos to the fourth over 4, which rises on the first half; and the wrong one, plus cos to the fourth over 4, which falls there.

Where the integrand is positive the antiderivative must be increasing. Only the version carrying the minus sign from du does that.

This is the single most common error in the whole lesson. The substitution is chosen correctly, the power rule is applied correctly, and the answer is still wrong because the minus sign in du never made it into the integral.

The graph gives you a way to catch it without differentiating. On the first half of the interval the integrand is positive, so any antiderivative must be increasing there. The green curve, minus cosine to the fourth over four, rises from minus a quarter to zero. The dashed red curve, the wrong answer, falls. An antiderivative that decreases where the integrand is positive cannot be right.

The cure is the habit from Example 3.8: write sine x dx equals minus du on its own line before substituting.

15. Which factor gets peeled?

Sorting

Sort into buckets

Read the exponents and sort each integrand by its first move.

peel a sin, u = cos x
sin³x cos²x; sin⁵x
peel a cos, u = sin x
sin²x cos⁵x; cos³x
either works
sin³x cos³x
both even: reduce the power
sin⁴x cos²x; sin²x
cos
sin³x cos²x and sin⁵x have an odd sine power (the cosine power is 2 or 0, even), so a sine is spared and u = cos x.
sin
sin²x cos⁵x and cos³x have an odd cosine power, so a cosine is spared and u = sin x. A missing sine counts as sine to the zero, which is even.
either
sin³x cos³x has both powers odd, so either factor can be spared; the two answers differ by a constant.
even
sin⁴x cos²x and sin²x have no odd power at all, so nothing can be spared and the power-reducing identities are needed.

Sort each integrand by reading its two exponents, and count a missing function as having the power zero, which is even. That rule of thumb resolves the two items that contain only one function.

Sine to the fifth has an odd sine power and a zero cosine power, so it peels a sine and uses u equal to cosine, even though no cosine is written. Cosine cubed is the reverse. The item with sine cubed times cosine cubed can go either way.

The two items with only even powers, sine to the fourth times cosine squared and plain sine squared, have no factor to spare. They belong to the next part of the lesson, where the powers are lowered rather than substituted. Sorting first, before calculating anything, is the habit this slide is building: the parity check takes two seconds and decides the whole route.

16. Find the error: peeling from the even power

Error analysis

Annotate

On: \( \int\sin^3 x\cos^2 x\,dx = \int\sin^3 x\cos x\,\cos x\,dx = \int u^3\cos x\,du \)

  • Cosine has the EVEN power, 2. Peeling one leaves a single cos x behind, an odd power.
  • That cos x cannot become sines without a square root, cos x = ±√(1 − sin²x). The identity converts squares only.
  • An integral with both u and x inside it is not a finished substitution. It is the signal that the wrong factor was peeled.
  • Peel from the ODD power, the sine, and use u = cos x: the integral becomes −∫u²(1 − u²) du, as in Example 3.9.

Look for the mistake before revealing the notes. The integral is the one from Example 3.9, but this time the writer peeled a cosine instead of a sine.

Cosine has the even power here. Taking one cosine away leaves a single cosine, which is an odd power, and an odd power of cosine cannot be written in sines without a square root. So the writer is stuck with a cosine inside an integral that is supposed to be in u. An integral containing both u and x is the tell-tale sign of a substitution that has not worked.

The rule to take away is short: always peel from the odd power. What remains is then even, and even powers convert. The fix on the last note gives the integral from Example 3.9, which finishes in three more lines.

17. All even powers

Section

Part 2

18. Deriving the power-reducing identities

Concept

When both powers are even there is no factor to spare. Instead lower the powers, using two identities you already know:

\[ \cos(2x) = \cos^2 x - \sin^2 x, \qquad \cos^2 x + \sin^2 x = 1 \]

Replace cosine squared by one minus sine squared in the first, and solve:

\[ \cos(2x) = 1 - 2\sin^2 x \;\Rightarrow\; \sin^2 x = \frac{1 - \cos(2x)}{2} \]

Replace sine squared by one minus cosine squared instead:

\[ \cos(2x) = 2\cos^2 x - 1 \;\Rightarrow\; \cos^2 x = \frac{1 + \cos(2x)}{2} \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 274 — the power-reducing identities

When both exponents are even, peeling a factor always leaves an odd power, which is exactly the dead end from the previous slide. So a different idea is needed: instead of converting a square, lower it.

You do not need to memorise these identities, because each is two lines from things you certainly know. The double-angle formula says cosine of 2x is cosine squared minus sine squared. Replace cosine squared by one minus sine squared, and cosine of 2x becomes one minus twice sine squared; solve for sine squared. Replace sine squared instead, and you get the one for cosine squared.

The two results differ only in a sign: minus for sine, plus for cosine. A fast way to tell them apart is to test at x equal to 0, where sine squared is 0 and cosine squared is 1. Only the minus version gives 0 at that point.

19. Squaring halves the period

Picture it

Figure (svg): The curve y equals sin x drawn dashed, oscillating between minus 1 and 1, and the curve y equals sin squared x, which stays between 0 and 1, oscillates twice as fast, and is centred on a dashed yellow line at one half.

Squaring folds the negative half up: the result is a wave of half the period, riding on the line one half. That is exactly what one half minus one half cos 2x describes.

The identity is visible in the picture: sine squared is a cosine wave of twice the frequency, flipped, scaled by one half and lifted to sit on the line one half. A square becomes a first power, at the price of doubling the angle.

The dashed curve is sine. Squaring it does two things you can see. First, the negative half folds up, so the result never goes below zero. Second, because each hump of sine becomes a hump of sine squared, including the ones that used to point down, there are now twice as many humps: the period has halved.

A wave with half the period is a wave in 2x. Its centre line is at one half, and it swings one half above and below that line, touching zero where sine is zero. Write that description as a formula and you get one half minus one half cosine 2x, which is the identity.

This is the trade the power-reducing identities offer. The exponent drops from two to one, which is what you want, and in exchange the angle doubles, which costs nothing, because cosine of 2x integrates just as easily as cosine of x.

20. Example 3.10: sine squared

Worked example

\[ \int \sin^2 x\,dx \]

Read the parity

Why: Sine squared, and cosine to the zero: both even, nothing to peel.

\[ k = 2, \; j = 0 \;\Rightarrow\; \text{reduce the power} \]

Reduce the power

Why: Power-reducing identity for sine.

\[ \int\sin^2 x\,dx = \int\left(\frac12 - \frac12\cos(2x)\right)dx \]

Integrate the constant

Why: One half, integrated.

\[ \int \frac12\,dx = \frac12 x \]

Integrate the cosine

Why: The inner 2x contributes a factor of one half.

\[ \int \frac12\cos(2x)\,dx = \frac14\sin(2x) \]

Combine

Why: Subtract, and add the constant.

\[ \int\sin^2 x\,dx = \frac12 x - \frac14\sin(2x) + C \]

Figure (svg): Over the interval from 0 to pi, the region under y equals sin squared x is shaded green and the region between that curve and the line y equals 1 is shaded orange; the orange region is the area under cos squared x rearranged. The two regions are congruent and together fill a pi by 1 rectangle.

Sine squared plus cosine squared is 1, so the two regions fill a rectangle of area pi, and by symmetry each takes exactly half.

Check with the area from 0 to pi

Why: Both sine terms vanish at 0 and at pi, leaving half of pi: exactly half the rectangle in the picture, as the symmetry demands.

\[ \left[\tfrac12 x - \tfrac14\sin 2x\right]_0^{\pi} = \frac{\pi}{2} \approx 1.5708 \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 274 — Example 3.10

Both exponents are even, sine squared and cosine to the zero, so there is nothing to peel. Apply the identity and the integrand becomes a constant minus a cosine, both of which you can integrate at sight.

The only thing to watch is the inner 2x. The integral of cosine of 2x is one half sine of 2x, not sine of 2x, so the one half in front becomes one quarter. That is the same chain-rule reverse you used for substitution with a linear inside.

The check uses the picture. Sine squared and cosine squared add to one, so their regions from 0 to pi fill a rectangle of area pi. They are mirror images of each other across the middle, so each takes exactly half, pi over 2. The antiderivative says the same: both sine terms vanish at 0 and at pi, and x over 2 leaves pi over 2. Two different arguments agree.

21. Checkpoint 3.7: cosine squared

Fill the middle

Use the power-reducing identity for cosine and find the missing coefficient.

\[ \int\cos^2 x\,dx = \frac12 x + \boxed{\;?\;}\,\sin(2x) + C \]

Fill in the blanks

The coefficient of sin(2x) in the box is 1/4.

Why: Cosine squared is one half plus one half cos 2x. The constant integrates to x/2 and the cosine term to one quarter sin 2x, with a plus sign this time, the only difference from sine squared.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 275 — Checkpoint 3.7

Fill in the blank before checking. The only change from Example 3.10 is the sign in the identity: cosine squared is one half PLUS one half cosine 2x.

So the constant still integrates to x over 2, and the cosine term integrates to one quarter sine 2x, now added rather than subtracted.

It is worth noticing what adding the two results gives. Sine squared integrates to x over 2 minus the sine term, cosine squared to x over 2 plus it, and the two sine terms cancel, leaving x. That is exactly what it should be, since sine squared plus cosine squared is one, and the integral of one is x. That is Exercise 101 in the exercise set, and it is a quick way to recover whichever sign you have forgotten.

22. Where cosine squared turns up next: half a disc

Intuition

Section 3.3 turns square roots into trigonometric powers. A preview: the area of the upper half of the unit disc.

\[ \int_{-1}^{1}\sqrt{1 - x^2}\,dx, \qquad x = \sin\theta, \; dx = \cos\theta\,d\theta \]

\[ = \int_{-\pi/2}^{\pi/2}\cos^2\theta\,d\theta \]

\[ = \left[\frac{\theta}{2} + \frac{\sin 2\theta}{4}\right]_{-\pi/2}^{\pi/2} = \frac{\pi}{2} \]

Half of pi times one squared: the half-disc's area, exactly. The power-reducing identity did the real work, and it will do it again all through the next section.

This slide is a preview of Section 3.3, and a reason to care about cosine squared. The integral of the square root of one minus x squared from minus 1 to 1 is the area of the upper half of a disc of radius 1, which you know should be pi over 2.

Substitute x equal to sine theta. The square root of one minus sine squared is cosine, which is positive on the new interval, and dx is cosine theta d theta, so the integrand becomes cosine squared. That is an all-even integral, and the power-reducing identity finishes it: theta over 2 plus sine 2 theta over 4, which evaluates to pi over 2.

So the textbook area of a half-disc falls out of exactly the technique you just learned. Trigonometric substitution always works this way: it trades an awkward square root for a trigonometric integral, and this lesson is what then evaluates it.

23. Example 3.12: sine to the fourth

Worked example

\[ \int \sin^4 x\,dx \]

Write it as a square of a square

Why: So the identity can act.

\[ \int\sin^4 x\,dx = \int\left(\sin^2 x\right)^2dx \]

Reduce the inner square

Why: Power-reducing identity for sine.

\[ = \int\left(\frac12 - \frac12\cos 2x\right)^2dx \]

Expand the square

Why: Three terms.

\[ = \int\left(\frac14 - \frac12\cos 2x + \frac14\cos^2 2x\right)dx \]

Reduce the new even power

Why: Cosine squared of 2x is still even; the identity doubles 2x to 4x.

\[ \cos^2 2x = \frac12 + \frac12\cos 4x \]

Collect the constants

Why: One quarter plus one eighth is three eighths.

\[ = \int\left(\frac38 - \frac12\cos 2x + \frac18\cos 4x\right)dx \]

Integrate term by term

Why: Divide by 2 and by 4 for the inner angles.

\[ = \frac38 x - \frac14\sin 2x + \frac{1}{32}\sin 4x + C \]

Figure (svg): Over 0 to 2 pi: the curve sin to the fourth x, humps of height 1; a dashed horizontal line at three eighths, its average; and the antiderivative three x over 8 minus sin 2x over 4 plus sin 4x over 32, which wobbles around the dashed straight line three x over 8.

The constant term of the expansion, three eighths, is the average height of sine to the fourth, so the antiderivative climbs at that average rate while the two sine terms only wobble it.

Check with the area from 0 to pi

Why: Both sine terms vanish at 0 and at pi. Simpson's rule on sine to the fourth gives 1.178097 as well.

\[ F(\pi) - F(0) = \frac{3\pi}{8} \approx 1.178097 \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 276 — Example 3.12

Sine to the fourth is all even, but one application of the identity is not enough. Writing it as sine squared, squared, and reducing the inside gives a square of one half minus one half cosine 2x, and expanding that square produces cosine squared of 2x, which is again an even power.

So apply the identity a second time, now doubling 2x to 4x. Then collect the constants carefully: one quarter from the first expansion and one eighth from the second give three eighths. The integral is then three terms that each integrate at sight.

The picture carries a second check. The constant three eighths is the average height of sine to the fourth, and the antiderivative climbs along the dashed line three x over eight, with the two sine terms only making it wobble. Evaluating from 0 to pi gives three pi over eight, about 1.178097, and Simpson's rule agrees.

24. Estimate the average of cosine to the sixth

Estimation

\[ \frac{1}{2\pi}\int_0^{2\pi}\cos^6 x\,dx = \;? \]

Predict first

Sine squared averages 1/2 and sine to the fourth averages 3/8. Guess the average of cos⁶x over a period.

  • 1/2
  • 3/8
  • 5/16
  • 1/6

Correct: 5/16

Why: Expand cos⁶x = ((1 + cos 2x)/2)³ = (1 + 3cos 2x + 3cos²2x + cos³2x)/8. Over a period the cos 2x and cos³2x terms average 0 and 3cos²2x averages 3/2, so the average is (1 + 3/2)/8 = 5/16 = 0.3125. Simpson's rule agrees. Higher even powers average less: the humps get narrower.

Make a guess before revealing, using the pattern: one half for the square, three eighths for the fourth power. The averages are going down, because higher powers squash the humps narrower.

The reasoning from Example 3.12 gives the exact answer without integrating anything. Over a full period, every cosine of a multiple of x averages to zero, so the average of an even power is just the constant term in its expansion. For cosine to the sixth, write it as the cube of one half plus one half cosine 2x and expand. The cosine 2x term and the cosine cubed 2x term average to zero, and the three cosine squared 2x terms average three halves. That leaves one plus three halves, over eight, which is five sixteenths.

The pattern, one half, three eighths, five sixteenths, continues with thirty-five over one hundred twenty-eight for the eighth power. It is a quick sanity check on any even-power integral over a full period.

25. Checkpoint 3.8: read the exponent first

Step zero

\[ \int \cos^3 x\,dx \]

Discussion prompt

Before you reach for the power-reducing identities, read the exponents. Which strategy applies, and what is the antiderivative?

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 276 — Checkpoint 3.8

Write your answer before revealing. The integral of cosine cubed is placed in the book right after the even-power examples, and it is tempting to reach for the identity you just used.

Read the exponents instead. Cosine has the power three, which is odd; sine has the power zero. An odd power means a factor can be spared, so strategy 2 applies: peel one cosine, convert cosine squared into one minus sine squared, and let u be sine. The integral becomes one minus u squared, which integrates to sine x minus sine cubed over three.

The power-reducing identities would also work eventually, through a product-to-sum step, but they take three times as long. Checking parity first is always the cheapest move.

26. Checkpoint 3.9: cosine squared of 3x

Prediction

\[ \int \cos^2(3x)\,dx \]

Predict first

Which antiderivative is correct?

  • x/2 + sin(6x)/12 + C
  • x/2 + sin(6x)/2 + C
  • x/2 + sin(3x)/6 + C
  • cos³(3x)/9 + C

Correct: x/2 + sin(6x)/12 + C

Why: The identity doubles whatever angle is there: cos²(3x) = 1/2 + (1/2)cos(6x). Integrating cos(6x) divides by 6, so the second term is (1/2)(1/6) sin 6x = sin(6x)/12. From 0 to 1 this gives 0.476715, and Simpson's rule agrees.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 276 — Checkpoint 3.9

Choose before revealing. The identity does not care what the angle is: cosine squared of anything is one half plus one half cosine of twice that thing. So cosine squared of 3x becomes one half plus one half cosine 6x.

The second step is the one that separates the options. Integrating cosine of 6x divides by 6, so one half cosine 6x integrates to one twelfth sine 6x. The option with a one half in front of the sine forgot that division, and the option with sine of 3x forgot to double the angle.

The last option applies the power rule to a trigonometric function, which the trap later in this part addresses directly. As a numerical check, the correct antiderivative from 0 to 1 gives 0.476715, and Simpson's rule on cosine squared of 3x gives the same.

27. Reading the sine-cosine strategy

Notation

Annotate

On: \( \int \cos^{j}x\,\sin^{k}x\,dx \)

  • Strategy 1. Peel one sin x, turn sin^(k−1) x into cosines with sin²x = 1 − cos²x, and let u = cos x, du = −sin x dx.
  • Strategy 2. Peel one cos x, turn cos^(j−1) x into sines with cos²x = 1 − sin²x, and let u = sin x, du = cos x dx.
  • Either strategy works. The answers look different and differ by a constant.
  • Strategy 3. Use sin²x = ½ − ½cos 2x and cos²x = ½ + ½cos 2x, simplify, and apply strategies 1 to 3 again as needed.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 275 — Problem-Solving Strategy: products and powers of sin x and cos x

This is the textbook's summary of everything in the first two parts, and each note is one case. Step through them and connect each to an example: k odd is Examples 3.9 and 3.11, j odd is Checkpoint 3.6, both odd is the two-route slide, and both even is Examples 3.10 and 3.12.

Notice that the three strategies are not three unrelated tricks. The first two are the same idea with the roles of sine and cosine exchanged. The third is what you do when that idea has nothing to work with, and its instruction to reapply strategies 1 to 3 is why sine to the fourth needed two rounds.

You will see the same structure, with tangent and secant in place of sine and cosine, in Part 4. Understanding why parity matters here makes those strategies much easier to remember.

28. Trap: the power rule on sine squared

Trap

The trap

Treating sine as if it were x:

\[ \int\sin^2 x\,dx = \frac{\sin^3 x}{3} + C \]

Wrong. The power rule needs the derivative of the inside to be present.

The fix

Differentiate the claimed answer: the chain rule produces a cosine that is not in the integrand.

\[ \frac{d}{dx}\frac{\sin^3 x}{3} = \sin^2 x\cos x \]

Both powers are even, so reduce the power:

\[ \int\sin^2 x\,dx = \frac{x}{2} - \frac{\sin 2x}{4} + C \]

This mistake comes from treating sine like x. The power rule says the integral of x squared is x cubed over three, and it is tempting to write the same thing with sine in place of x.

The power rule for a function inside a power needs that function's derivative to be present, which is exactly what substitution requires. Differentiate the proposed answer and you see the problem at once: the chain rule produces sine squared times cosine, and there is no cosine in the integrand. So sine cubed over three is the antiderivative of a different function.

Whenever you are unsure about an antiderivative, differentiate it. Here the correct route is the all-even strategy, and the answer is x over 2 minus sine 2x over 4.

29. Sines and cosines of different angles

Section

Part 3

30. Where the product-to-sum rules come from

Concept

Write the angle-sum formula for sine with A plus B, and again with A minus B:

\[ \sin(A+B) = \sin A\cos B + \cos A\sin B \]

\[ \sin(A-B) = \sin A\cos B - \cos A\sin B \]

Add the two lines. The cos A sin B terms cancel:

\[ \sin(A+B) + \sin(A-B) = 2\sin A\cos B \]

Divide by 2 and put A equal to ax and B equal to bx:

\[ \sin(ax)\cos(bx) = \frac12\sin((a-b)x) + \frac12\sin((a+b)x) \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 276 — rule (3.4), from the sum-of-angle formulas

The product of a sine of 5x and a cosine of 3x is not a product of powers at all, so parity has nothing to say. What helps instead is an identity that turns the product into a sum.

It comes straight from the angle-sum formulas. Write the sine of A plus B and the sine of A minus B one under the other. They share the term sine A cosine B, and their other terms are equal and opposite. Adding the two lines cancels those, leaving twice sine A cosine B. Divide by two and you have the product as a sum of two sines.

The other two rules come the same way from the cosine angle-sum formulas: subtract them to isolate a product of sines, add them to isolate a product of cosines. If you forget a rule in an exam, rebuilding it this way takes less than a minute.

31. Reading the product-to-sum rules

Notation

Annotate

On: \( \sin(ax)\cos(bx) = \tfrac12\sin((a-b)x) + \tfrac12\sin((a+b)x) \)

  • The difference of the frequencies: a slow wave. If a − b is negative, use sin(−θ) = −sin θ.
  • The sum of the frequencies: a fast wave.
  • The product has become a sum, and each term integrates in one line: ∫sin(cx) dx = −cos(cx)/c.
  • Two sines give ½cos((a − b)x) − ½cos((a + b)x); two cosines give ½cos((a − b)x) + ½cos((a + b)x).

\[ \sin(ax)\sin(bx) = \tfrac12\cos((a-b)x) - \tfrac12\cos((a+b)x) \]

\[ \cos(ax)\cos(bx) = \tfrac12\cos((a-b)x) + \tfrac12\cos((a+b)x) \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 276 — rules (3.3), (3.4) and (3.5)

Step through the notes on the main formula first. The new angles are the difference and the sum of the old ones, so a product of two waves becomes one slower wave and one faster wave. Each gets a factor of one half.

The difference can come out negative, as it will in Exercise 121 where a is 2 and b is 3. Then use the fact that sine is odd to pull the minus sign out front. For the two cosine rules a negative difference does not even matter, because cosine is even.

The two further rules below the formula are worth comparing. Two cosines give a sum of two cosines with a plus sign; two sines give the same two cosines with a minus sign. Test them at x equal to 0 if you are unsure: a product of two sines is zero there, and only the minus version gives zero.

32. A product of waves is a sum of waves

Picture it

Figure (svg): Two panels over 0 to 2 pi. Left: the product sin 5x cos 3x, a jagged wave. Right: its two ingredients, one half sin 2x, a slow wave, and one half sin 8x, a fast one; adding them point by point gives the left panel.

A product of two waves is really two waves added, one at the difference of the frequencies (5 minus 3) and one at their sum (5 plus 3). Each piece integrates in one line.

The jagged product on the left is nothing more than the smooth slow wave plus the quick fast wave on the right. Integrating the product means integrating two plain sines.

The left panel is the product sine 5x times cosine 3x. It looks irregular, with peaks of different heights, and it is not obvious how you would integrate it directly.

The right panel shows its two ingredients: a slow wave with frequency 2, the difference of 5 and 3, and a fast wave with frequency 8, their sum, each with amplitude one half. Add the two panels on the right point by point and you get exactly the panel on the left. Where the slow and fast waves peak together, the product has its tallest peaks; where they disagree, the peaks are small.

Musicians know this effect as beats: two notes played together produce a combined sound whose loudness swells at the difference frequency. Here it simply means that the product integrates as two simple sines.

33. Example 3.13: sin 5x times cos 3x

Worked example

\[ \int\sin(5x)\cos(3x)\,dx \]

Match the product to rule (3.4)

Why: Here a is 5 and b is 3.

\[ a - b = 2, \qquad a + b = 8 \]

Rewrite the product as a sum

Why: Two sine waves.

\[ \sin(5x)\cos(3x) = \frac12\sin(2x) + \frac12\sin(8x) \]

Integrate the slow wave

Why: Divide by 2 for the inner angle.

\[ \int\frac12\sin(2x)\,dx = -\frac14\cos(2x) \]

Integrate the fast wave

Why: Divide by 8 for the inner angle.

\[ \int\frac12\sin(8x)\,dx = -\frac{1}{16}\cos(8x) \]

Combine

Why: Add the constant.

\[ \int\sin(5x)\cos(3x)\,dx = -\frac14\cos(2x) - \frac{1}{16}\cos(8x) + C \]

The printed solution has a slip here: it writes a cosine of 8x in the identity and a sine of 8x in the answer. The lines above are the corrected ones.

Check numerically from 0 to 1

Why: Simpson's rule on the product gives 0.425630, matching the corrected antiderivative; the printed one would give 0.292202.

\[ \left[-\tfrac14\cos 2x - \tfrac{1}{16}\cos 8x\right]_0^1 \approx 0.425630 \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 277 — Example 3.13

Match the product to the sine-cosine rule with a equal to 5 and b equal to 3. The difference is 2 and the sum is 8, so the product is one half sine 2x plus one half sine 8x. Each integrates in one line, dividing by the inner coefficient.

One caution about the textbook. The printed solution to this example writes minus one half cosine 8x in the identity and a sine of 8x in the answer. Both are slips; the rule plainly gives a sine of 8x with a plus sign, which integrates to a cosine. The slide shows the corrected version.

The check is how you would find such a slip yourself. Simpson's rule on the product from 0 to 1 gives 0.425630. The corrected antiderivative gives the same number, and the printed one gives 0.292202. When a numerical check and a formula disagree, trust the numbers and go looking for the error.

34. Checkpoint 3.10: cos 6x times cos 5x

Socratic

\[ \int\cos(6x)\cos(5x)\,dx \]

Discussion prompt

Which of the three product-to-sum rules applies, what are the two new frequencies, and what is the antiderivative?

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 277 — Checkpoint 3.10

Answer all three parts before revealing: which rule, which frequencies, which antiderivative.

Two cosines means the cosine-cosine rule, with a plus sign between the two terms. The frequencies are 6 minus 5, which is 1, and 6 plus 5, which is 11. So the product is one half cosine x plus one half cosine 11x.

Integrating divides each term by its frequency: one half sine x, and one half of one eleventh, which is one twenty-second, times sine 11x. The numerical check from 0 to 1 gives 0.375281 both ways. Notice how much easier this is than it looks; once the product is a sum, there is nothing left but two textbook integrals.

Notice also what did not happen: no exponent was read and no parity was checked. When the angles differ, parity is the wrong question, and the product-to-sum rule comes first.

35. Exercise 121: sin 2x and cos 3x are orthogonal

Worked example

Show that the product of sin 2x and cos 3x integrates to zero over one full period.

\[ \int_{-\pi}^{\pi}\sin(2x)\cos(3x)\,dx \]

Rewrite with rule (3.4)

Why: Here a is 2 and b is 3, so a minus b is minus 1.

\[ \sin(2x)\cos(3x) = \frac12\sin(-x) + \frac12\sin(5x) \]

Use that sine is odd

Why: The sine of minus x is minus sine of x.

\[ = -\frac12\sin x + \frac12\sin(5x) \]

Find an antiderivative

Why: Integrate each sine.

\[ F(x) = \frac12\cos x - \frac{1}{10}\cos(5x) \]

Evaluate at both ends

Why: Cosine of pi and of 5 pi are both minus 1, and cosine is even.

\[ F(\pi) = -\tfrac12 + \tfrac{1}{10} = -\tfrac25, \qquad F(-\pi) = -\tfrac25 \]

Subtract

Why: The two ends agree.

\[ \int_{-\pi}^{\pi}\sin(2x)\cos(3x)\,dx = -\tfrac25 - \left(-\tfrac25\right) = 0 \]

Figure (svg): The curve sin 2x cos 3x over minus pi to pi with the regions above the axis shaded green and the regions below shaded red. The curve is odd: every green lobe on one side is matched by a red lobe of the same size on the other.

Positive and negative lobes cancel exactly over a full period. That cancellation is what the word orthogonal means for functions.

Check by symmetry

Why: sin 2x is odd and cos 3x is even, so their product is odd, and an odd function integrates to zero over an interval centred at 0.

\[ f(-x) = \sin(-2x)\cos(-3x) = -\sin(2x)\cos(3x) = -f(x) \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 284 — Exercise 121

This exercise leads into one of the most important uses of these integrals. Two functions are called orthogonal on an interval when the integral of their product is zero. The claim is that sine 2x and cosine 3x are orthogonal over one full period.

The product-to-sum rule turns the product into one half sine of minus x plus one half sine 5x, and the sine of minus x is minus sine x. Both terms integrate to cosines, and evaluating at pi and at minus pi gives the same value, minus two fifths, because cosine is even. The difference is zero.

The picture shows why. The green lobes above the axis and the red lobes below are the same sizes, arranged so that each positive lobe on one side of the origin has a negative twin on the other. The check makes that precise: sine 2x is odd and cosine 3x is even, so their product is odd, and an odd function always integrates to zero over an interval centred at zero.

36. A full period of sin mx times sin nx

Concept

Take any two positive whole numbers m and n and integrate the product over one period with rule (3.3):

\[ \int_{-\pi}^{\pi}\sin(mx)\sin(nx)\,dx = \frac12\int_{-\pi}^{\pi}\left[\cos((m-n)x) - \cos((m+n)x)\right]dx \]

A cosine of a nonzero whole-number frequency runs through whole periods and integrates to zero:

\[ \int_{-\pi}^{\pi}\cos(cx)\,dx = \left[\frac{\sin(cx)}{c}\right]_{-\pi}^{\pi} = 0 \qquad (c \ne 0) \]

So if m and n are different both terms vanish. If they are equal, the first cosine is cos 0, which is 1, and it survives:

\[ m \ne n: \; 0, \qquad m = n: \; \frac12\int_{-\pi}^{\pi}1\,dx = \pi \]

orthogonal — Two functions are orthogonal on an interval when the integral of their product over it is zero. Different harmonics are orthogonal on any full period.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 284 — the inner product before Exercises 121 and 122

Exercise 121 was one case of a general fact, and the product-to-sum rule proves the whole thing at once. The product of sine mx and sine nx becomes one half of a cosine at the difference frequency minus a cosine at the sum frequency.

Over one full period, any cosine with a nonzero whole-number frequency integrates to zero, because its sine antiderivative is zero at both ends. So when m and n are different, both terms vanish and the integral is zero. When m equals n, the difference frequency is zero, cosine of zero is one, and that term survives to give pi.

This is the orthogonality of harmonics. Different frequencies cancel completely over a period, and a frequency paired with itself does not. The next two slides let you see the cancellation and then put it to work.

37. Slide the frequencies and watch the lobes

Tweak it

Parameter explorer

The curve is sin(mx) sin(nx) over one full period. Make m and n different, then make them equal. When do the lobes above and below the axis cancel, and what happens when they cannot?

\[ \int_{-\pi}^{\pi}\sin({m}x)\sin({n}x)\,dx \]

  • m — from 1 to 6: frequency m
  • n — from 1 to 6: frequency n

Start with m equal to 2 and n equal to 3 and look at the curve. There are positive lobes and negative lobes, and they cancel exactly: the readout integral is zero.

Now set the two sliders equal. The curve becomes a sine squared, which never dips below the axis, so nothing can cancel. The integral jumps to pi, and it stays pi whichever common value you choose, because a sine squared of any whole frequency averages one half over the period.

Try a few more unequal pairs, including ones far apart like 1 and 6. The lobes change shape completely, but they always cancel. That robustness is what makes orthogonality useful: you can rely on it for every pair of different frequencies at once.

38. Building a square wave from sines

Real world

Figure (svg): A square wave equal to minus 1 on minus pi to 0 and plus 1 on 0 to pi, drawn in grey, with two approximations: four over pi times sin x, a single smooth wave, and the sum of the first four odd harmonics, which hugs the square wave more closely and overshoots near the jumps.

Each coefficient is one trigonometric integral, and orthogonality makes every other harmonic drop out of it. Four terms already trace the square.

Discussion prompt

A signal engineer writes a square wave, minus 1 on the left half-period and plus 1 on the right, as a sum of sines. The coefficient of sin nx is one over pi times the integral over the period of the wave times sin nx; orthogonality is why every other harmonic drops out. Compute the first coefficient.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 276 — the physics and signal-processing motivation for rules (3.3) to (3.5)

This is where orthogonality earns its keep. Any reasonable periodic signal, even one with jumps like this square wave, can be written as a sum of sines and cosines of whole-number frequencies. The question is how to find the coefficients.

Multiply the signal by sine nx and integrate over the period. Every other harmonic in the sum is orthogonal to sine nx and integrates to zero, so only the coefficient you want survives. For the square wave and n equal to 1, the two halves each give 2, so the coefficient is four over pi, about 1.2732.

The picture shows how quickly the sum converges. One term already has the right shape; four odd harmonics hug the flat parts closely, with a small overshoot near the jumps that never quite goes away. This calculation, done by computers millions of times a second, is at the heart of audio compression, image formats, and the analysis of electrical circuits.

39. Powers of tangent and secant

Section

Part 4

40. The tangent-secant toolkit

Concept

Two derivatives supply the spare factors, and one identity converts between the two families.

\[ \frac{d}{dx}\tan x = \sec^2 x, \qquad \frac{d}{dx}\sec x = \sec x\tan x \]

Divide the Pythagorean identity through by cosine squared to get the converter:

\[ \frac{\sin^2 x}{\cos^2 x} + \frac{\cos^2 x}{\cos^2 x} = \frac{1}{\cos^2 x} \;\Rightarrow\; \tan^2 x + 1 = \sec^2 x \]

Figure (svg): The curves y equals sec squared x and y equals tan squared x on the interval from about minus 1.3 to 1.3. Both are U-shaped; sec squared sits exactly one unit above tan squared, and yellow segments of length 1 join them at four places.

The identity one plus tan squared equals sec squared, drawn: the two curves are the same shape, one unit apart. That identity is what converts between the two families.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, pp. 277-278 — products and powers of tan x and sec x

Tangent and secant play the roles that sine and cosine played in the first half. What you need to notice is where their derivatives lead. The derivative of tangent is secant squared, and the derivative of secant is secant times tangent. Both derivatives stay inside the tangent-secant family, which is what makes products of their powers tractable.

The converter is the Pythagorean identity divided through by cosine squared. Sine over cosine is tangent and one over cosine is secant, so it reads tangent squared plus one equals secant squared.

The graph shows the identity as a picture: secant squared and tangent squared are the same U shape, one unit apart at every point. Like the sine-cosine identity, it converts squares only. That is why parity will matter again.

41. The four integrals you already have

Concept

integralwhere it comes from
∫sec²x dx = tan x + Cthe derivative of tan x
∫sec x tan x dx = sec x + Cthe derivative of sec x
∫tan x dx = ln|sec x| + Ctan x = sin x / cos x, with u = cos x
∫sec x dx = ln|sec x + tan x| + Cthe trick below

The last one needs a trick: multiply by a clever form of 1.

\[ \int\sec x\,dx = \int\sec x\,\frac{\sec x + \tan x}{\sec x + \tan x}\,dx = \int\frac{\sec^2 x + \sec x\tan x}{\sec x + \tan x}\,dx \]

The numerator is exactly the derivative of the denominator, so the integral is a logarithm:

\[ \int\sec x\,dx = \ln|\sec x + \tan x| + C \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 277 — the list of known tangent and secant integrals

The table lists the four integrals that every tangent-secant problem eventually reduces to. The first two are just derivatives read backwards. The third comes from writing tangent as sine over cosine and substituting u equal to cosine.

The fourth, the integral of secant, is the odd one out: no substitution is visible. The trick is to multiply top and bottom by secant plus tangent. The new numerator, secant squared plus secant tangent, is exactly the derivative of the new denominator, so the integral is the logarithm of the denominator.

Nobody would find that trick by accident, and you do not need to rediscover it. Remember the result, and remember that it exists, because the integral of secant is where every odd power of secant eventually lands, including the famous secant cubed.

42. Example 3.14: a secant power times one tangent

Worked example

\[ \int\sec^5 x\,\tan x\,dx \]

Split off the derivative of secant

Why: One secant joins the tangent.

\[ \sec^5 x\tan x = \sec^4 x\,(\sec x\tan x) \]

Choose u

Why: The bracket is its differential.

\[ u = \sec x, \qquad du = \sec x\tan x\,dx \]

Substitute

Why: Everything is now in u.

\[ \int\sec^4 x\,\sec x\tan x\,dx = \int u^4\,du \]

Integrate

Why: Power rule.

\[ = \frac15 u^5 + C \]

Return to x

Why: Replace u by sec x.

\[ = \frac15\sec^5 x + C \]

Check by differentiating

Why: Chain rule: bring down the 5, then multiply by the derivative of secant.

\[ \frac{d}{dx}\tfrac15\sec^5 x = \sec^4 x\cdot\sec x\tan x = \sec^5 x\tan x \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, pp. 277-278 — Example 3.14

This is the tangent-secant version of Example 3.8. The integrand has five secants and one tangent, and the derivative of secant is secant times tangent. So set one secant aside with the tangent: that pair, with dx, is du for u equal to secant.

The four remaining secants become u to the fourth, and the integral is the power rule. Returning to x gives one fifth secant to the fifth.

The check is the chain rule again: five secant to the fourth, divided by five, times the derivative of secant, which is secant tangent. That is secant to the fifth times tangent. Keep the pattern in mind for the rest of this part: every tangent-secant strategy is a hunt for one of two spare factors, secant squared or secant times tangent.

43. Checkpoint 3.11: tangent to the fifth times secant squared

Prediction

\[ \int\tan^5 x\,\sec^2 x\,dx \]

Predict first

Which antiderivative is correct?

  • tan⁶x/6 + C
  • sec⁶x/6 + C
  • tan⁶x sec³x/18 + C
  • 5tan⁴x sec²x + C

Correct: tan⁶x/6 + C

Why: sec²x dx is the differential of tan x, so u = tan x turns the integral into ∫u⁵ du = u⁶/6. The last option is a derivative, not an antiderivative, and sec⁶x/6 would need sec⁵x · sec x tan x in the integrand.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 278 — Checkpoint 3.11

Choose an option before revealing. Here the spare factor is secant squared, the derivative of tangent, so u is tangent and the integral is the integral of u to the fifth.

The answer is tangent to the sixth over six. The option with secant to the sixth would need a secant tangent factor, not a secant squared. The last option is what you get by differentiating instead of integrating, a slip that shows up surprisingly often under time pressure.

The option with three factors multiplied together is the tangent-secant version of the error in Checkpoint 3.5: no amount of juggling exponents makes a product like that into an antiderivative. When in doubt, differentiate the candidate and compare.

Keep the two spare factors side by side in your mind from here on: secant squared belongs with u equal to tangent, secant tangent belongs with u equal to secant. Every strategy in the rest of this part is a search for one of them.

44. Reading the tangent-secant strategy

Notation

Annotate

On: \( \int\tan^{k}x\,\sec^{j}x\,dx \)

  • Strategy 1. Save one sec²x, turn sec^(j−2) x into tangents with sec²x = tan²x + 1, and let u = tan x, du = sec²x dx.
  • Strategy 2. Save one sec x tan x, turn tan^(k−1) x into secants with tan²x = sec²x − 1, and let u = sec x.
  • Strategy 3. Write tanᵏx = tanᵏ⁻²x sec²x − tanᵏ⁻²x and repeat on the second piece.
  • Strategy 4. Rewrite all tangents as secants and integrate the odd secant powers by parts, or by a reduction formula.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 278 — Problem-Solving Strategy: integrating tan^k x sec^j x

Here is the textbook's four-case summary. Compare it with the sine-cosine strategy: the first two cases are again one idea with the roles exchanged, each saving one of the two spare factors.

Strategy 1 needs an even secant power so that, after one secant squared is saved, what remains is still an even power of secant, which converts into tangents. Strategy 2 needs an odd tangent power so that, after saving one secant tangent, an even power of tangent remains, which converts into secants. Parity decides again, for the same reason as before: the identity only converts squares.

Strategies 3 and 4 cover what is left. A pure odd power of tangent splits off a tangent squared, as Example 3.17 will show. An even tangent power with an odd secant power has no spare factor at all, and parts, or the reduction formulas of Part 5, take over.

45. Example 3.15: an even power of secant

Worked example

\[ \int\tan^6 x\,\sec^4 x\,dx \]

The secant power is even: save one secant squared

Why: Strategy 1.

\[ \sec^4 x = \sec^2 x\,\sec^2 x \]

Convert the other secant squared

Why: Into tangents, with the identity.

\[ \int\tan^6 x\left(\tan^2 x + 1\right)\sec^2 x\,dx \]

Substitute u equal to tan x

Why: The saved secant squared and dx are du.

\[ = \int u^6\left(u^2 + 1\right)du \]

Expand

Why: Multiply out.

\[ = \int\left(u^8 + u^6\right)du \]

Integrate

Why: Power rule on each term.

\[ = \frac19 u^9 + \frac17 u^7 + C \]

Return to x

Why: Replace u by tan x.

\[ = \frac19\tan^9 x + \frac17\tan^7 x + C \]

Check by differentiating

Why: Each term brings out a secant squared; then factor.

\[ \tan^8 x\sec^2 x + \tan^6 x\sec^2 x = \tan^6 x\sec^2 x\left(\tan^2 x + 1\right) \]

\[ = \tan^6 x\sec^4 x \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 279 — Example 3.15

Read the exponents: tangent to the sixth, secant to the fourth. The secant power is even, so strategy 1 applies. Save one secant squared for du, and convert the other secant squared into tangent squared plus one.

After substituting u equal to tangent, the integral is u to the sixth times u squared plus one, a polynomial you expand and integrate. Returning to x gives two powers of tangent, the ninth and the seventh.

The check differentiates each term, which brings out a secant squared. Factoring out tangent to the sixth times secant squared leaves tangent squared plus one, which is secant squared again, so the result is tangent to the sixth times secant to the fourth. As in the sine-cosine case, the check is the identity run backwards.

46. Example 3.16: an odd power of tangent

Worked example

\[ \int\tan^5 x\,\sec^3 x\,dx \]

The tangent power is odd: save one sec x tan x

Why: Strategy 2.

\[ \tan^5 x\sec^3 x = \tan^4 x\,\sec^2 x\,(\sec x\tan x) \]

Write the even tangent power as a square

Why: Then convert with the identity.

\[ \tan^4 x = \left(\tan^2 x\right)^2 = \left(\sec^2 x - 1\right)^2 \]

Substitute u equal to sec x

Why: The saved factor and dx are du.

\[ \int\left(u^2 - 1\right)^2u^2\,du \]

Expand

Why: Square, then multiply by u squared.

\[ = \int\left(u^6 - 2u^4 + u^2\right)du \]

Integrate

Why: Power rule on each term.

\[ = \frac17 u^7 - \frac25 u^5 + \frac13 u^3 + C \]

Return to x

Why: Replace u by sec x.

\[ = \frac17\sec^7 x - \frac25\sec^5 x + \frac13\sec^3 x + C \]

Check by differentiating

Why: Every term brings out a factor sec x tan x; factor out a secant squared as well.

\[ \sec x\tan x\left(\sec^6 x - 2\sec^4 x + \sec^2 x\right) \]

\[ = \sec^3 x\tan x\left(\sec^2 x - 1\right)^2 = \sec^3 x\tan^5 x \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 279 — Example 3.16

Here the secant power is odd, three, so strategy 1 is not available: saving a secant squared would leave a single secant, which does not convert into tangents. But the tangent power is odd, five, so strategy 2 works. Save one secant tangent for du.

What remains is tangent to the fourth times secant squared. The secant squared is already in terms of u equal to secant. The tangent to the fourth is tangent squared, squared, which converts to secant squared minus one, squared. After substituting, you have u squared minus one, squared, times u squared, a polynomial.

The check differentiates three powers of secant, each of which brings out a secant tangent. Factoring out secant cubed times tangent leaves secant to the fourth minus twice secant squared plus one, which is the square of secant squared minus one, that is, tangent to the fourth. So the result is secant cubed times tangent to the fifth.

47. Checkpoint 3.12: tangent cubed, secant to the seventh

Worked example

\[ \int\tan^3 x\,\sec^7 x\,dx \]

The tangent power is odd: save one sec x tan x

Why: The secant power is odd, so strategy 1 is not available.

\[ \tan^3 x\sec^7 x = \tan^2 x\,\sec^6 x\,(\sec x\tan x) \]

Convert tangent squared

Why: Into secants.

\[ = \left(\sec^2 x - 1\right)\sec^6 x\,(\sec x\tan x) \]

Substitute u equal to sec x

Why: The saved factor and dx are du.

\[ \int\left(u^2 - 1\right)u^6\,du \]

Expand

Why: Multiply by u to the sixth.

\[ = \int\left(u^8 - u^6\right)du \]

Integrate

Why: Power rule.

\[ = \frac19 u^9 - \frac17 u^7 + C \]

Return to x

Why: Replace u by sec x.

\[ = \frac19\sec^9 x - \frac17\sec^7 x + C \]

Check by differentiating

Why: Each term brings out sec x tan x.

\[ \sec^8 x\,\sec x\tan x - \sec^6 x\,\sec x\tan x = \sec^7 x\tan x\left(\sec^2 x - 1\right) \]

\[ = \sec^7 x\tan^3 x \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 280 — Checkpoint 3.12

Read the exponents first. The secant power, seven, is odd, so strategy 1 is ruled out. The tangent power, three, is odd, so strategy 2 applies: save one secant tangent, leaving tangent squared times secant to the sixth.

Convert tangent squared into secant squared minus one, substitute u equal to secant, and the integral is u squared minus one times u to the sixth: two powers of u after expanding. The answer is secant to the ninth over nine minus secant to the seventh over seven.

The check factors out secant to the seventh times tangent from the two derivatives, leaving secant squared minus one, which is tangent squared. So the derivative is secant to the seventh times tangent cubed. Notice that the length of the calculation depended only on the tangent power, not on the large secant power, which simply rode along as u to the sixth.

48. Example 3.17: tangent cubed alone

Worked example

\[ \int\tan^3 x\,dx \]

No secant to save: split off a tangent squared

Why: Strategy 3.

\[ \tan^3 x = \tan x\,\tan^2 x \]

Convert

Why: Tangent squared is secant squared minus 1.

\[ = \tan x\left(\sec^2 x - 1\right) = \tan x\sec^2 x - \tan x \]

Split the integral

Why: Two familiar pieces.

\[ \int\tan^3 x\,dx = \int\tan x\sec^2 x\,dx - \int\tan x\,dx \]

First piece: u equal to tan x

Why: The secant squared is du.

\[ \int\tan x\sec^2 x\,dx = \int u\,du = \frac12\tan^2 x \]

Second piece: from the table

Why: One of the four known integrals.

\[ \int\tan x\,dx = \ln|\sec x| \]

Combine

Why: Subtract, and add the constant.

\[ \int\tan^3 x\,dx = \frac12\tan^2 x - \ln|\sec x| + C \]

Figure (svg): The curve y equals tan cubed x from 0 to about 1.3, rising steeply toward its asymptote, with the region under it from 0 to pi over 4 shaded; the shaded area is one half minus ln root 2, about 0.1534.

A small sliver of area, 0.1534, which is what the antiderivative predicts and what numerical integration confirms.

Check with the area from 0 to pi over 4

Why: At pi over 4, tan is 1 and sec is root 2; at 0 both terms are 0. Simpson's rule on tangent cubed gives 0.153426 too.

\[ \left[\tfrac12\tan^2 x - \ln|\sec x|\right]_0^{\pi/4} = \tfrac12 - \ln\sqrt2 \approx 0.153426 \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, pp. 279-280 — Example 3.17

Tangent cubed has no secant at all, so neither spare factor is available. Strategy 3 manufactures one: write tangent cubed as tangent times tangent squared, and convert the tangent squared into secant squared minus one.

That splits the integral into two familiar pieces. Tangent times secant squared is the Checkpoint 3.11 shape, with u equal to tangent, and gives one half tangent squared. The integral of tangent alone is from the table, the logarithm of the absolute value of secant.

The picture and the check go together. The shaded sliver under tangent cubed from 0 to pi over 4 has area 0.153426 by Simpson's rule, and the antiderivative gives one half minus the log of root 2, the same number. Higher odd powers of tangent work the same way, one step at a time, which is exactly the tangent reduction formula of Part 5.

49. Why secant cubed resists substitution

Intuition

Secant cubed has an odd secant power and no tangent, strategy 4. Try each substitution and watch it fail:

\[ u = \tan x: \quad \sec^3 x = \sec x\cdot\sec^2 x, \quad \text{leftover } \sec x = \sqrt{1 + \tan^2 x} \]

\[ u = \sec x: \quad \text{needs a factor } \sec x\tan x, \quad \text{but there is no } \tan x \]

A square root, or a missing tangent: neither differential can be completed. So fall back on the other tool, integration by parts, with the one piece you can integrate, secant squared, as dv.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 278 — strategy 4

Before doing Example 3.18, see why the tools of this part fail on it. Secant cubed has an odd secant power and no tangent, which is strategy 4, the case with no spare factor.

Try u equal to tangent: save a secant squared, and one secant is left over. Writing that secant in terms of tangent needs the square root of one plus tangent squared, and a square root ruins the substitution. Try u equal to secant instead: that needs a secant tangent factor, and there is no tangent anywhere to pair with.

So substitution is out, and the other general tool, integration by parts, comes in. The piece to integrate, dv, should be the one part you can integrate, secant squared. That choice is the whole of Example 3.18.

50. Example 3.18: secant cubed by parts

Worked example

\[ \int\sec^3 x\,dx \]

Choose the parts

Why: Secant squared is the piece you can integrate.

\[ u = \sec x, \qquad dv = \sec^2 x\,dx \]

Differentiate u and integrate dv

Why: The two toolkit derivatives.

\[ du = \sec x\tan x\,dx, \qquad v = \tan x \]

Apply integration by parts

Why: uv minus the integral of v du.

\[ \int\sec^3 x\,dx = \sec x\tan x - \int\tan^2 x\sec x\,dx \]

Convert tangent squared

Why: Into secants.

\[ = \sec x\tan x - \int\left(\sec^2 x - 1\right)\sec x\,dx \]

Distribute: the original integral returns

Why: Secant cubed appears on the right.

\[ = \sec x\tan x - \int\sec^3 x\,dx + \int\sec x\,dx \]

Add the integral to both sides

Why: And use the known integral of sec x.

\[ 2\int\sec^3 x\,dx = \sec x\tan x + \ln|\sec x + \tan x| \]

Divide by 2

Why: Add the constant at the end.

\[ \int\sec^3 x\,dx = \frac12\sec x\tan x + \frac12\ln|\sec x + \tan x| + C \]

Figure (svg): The curves y equals sec cubed x and y equals sec x from 0 to about 1.2; the region under sec cubed from 0 to pi over 4 is shaded, with area about 1.1478.

The integral that needed a trick: half of sec x tan x plus half the log term gives 1.1478 at pi over 4, the shaded area to four decimals.

Check with the area from 0 to pi over 4

Why: At pi over 4, sec is root 2 and tan is 1; at 0 both terms vanish. Simpson's rule on secant cubed gives 1.147794.

\[ \tfrac12\sqrt2 + \tfrac12\ln\left(1 + \sqrt2\right) \approx 0.707107 + 0.440687 = 1.147794 \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 280 — Example 3.18

With u equal to secant and dv equal to secant squared, parts gives secant tangent minus the integral of tangent squared secant. That new integral looks no better, until you convert the tangent squared into secant squared minus one.

Then something surprising happens: the integral splits into minus the integral of secant cubed, the very integral you started with, plus the integral of secant. It is tempting to think you have gone in a circle, but you have not. The original integral now appears on both sides of an equation with opposite signs, so you can add it to both sides and solve for it. Solving for an integral that returns is a standard move with integration by parts.

The check evaluates from 0 to pi over 4. Secant is root 2 there and tangent is 1, so the answer is half of root 2 plus half the log of one plus root 2, which is 1.147794. Simpson's rule on secant cubed gives exactly that, the shaded area in the picture.

51. Match each integrand to its first move

Matching

Match the pairs

  • a. tan⁶x sec⁴x
  • b. tan⁵x sec³x
  • c. tan³x
  • d. tan²x sec x
  • w. save sec²x, u = tan x
  • x. save sec x tan x, u = sec x
  • y. split into tan x sec²x − tan x
  • z. rewrite as sec³x − sec x, then parts

Why: An even secant power saves sec²x for u = tan x; an odd tangent power saves sec x tan x for u = sec x; a tangent power alone splits off tan²x = sec²x − 1; and an even tangent power with an odd secant power (Exercise 89) becomes odd powers of secant, which need parts.

Match each integrand before checking. For each one, read the two exponents and ask which spare factor is available, if any.

Tangent to the sixth times secant to the fourth has an even secant power: save secant squared, and use u equal to tangent. Tangent to the fifth times secant cubed has an odd tangent power: save secant tangent, and use u equal to secant. Tangent cubed alone has no secant, so split it into tangent secant squared minus tangent.

The last one, tangent squared times secant, is Exercise 89 and the hardest case: even tangent, odd secant, no spare factor. Convert the tangent squared, and you get secant cubed minus secant, which is Example 3.18 minus a table integral. That is strategy 4 in action: when nothing can be saved, rewrite everything in secants.

52. Reduction formulas

Section

Part 5

53. Put the secant-cubed argument in order

Ranking

Put in order

Order the moves of Example 3.18, the argument the reduction formula will generalise.

  1. Integrate by parts with u = sec x and dv = sec²x dx
  2. Replace tan²x by sec²x − 1 in the new integral
  3. Notice ∫sec³x dx has reappeared on the right
  4. Add it to both sides
  5. Divide by 2 and use ∫sec x dx = ln|sec x + tan x|

Why: Parts produces tan²x sec x; the identity turns it back into secants; the original integral returns with a minus sign, so it can be collected on the left and solved for. Replace 3 by n and the same five moves give reduction formula 3.6.

Order the steps before checking. This is the structure of Example 3.18, and seeing it as five abstract moves is what lets you apply it to any power of secant.

Parts comes first, with secant squared as the piece integrated. The identity then turns the new tangent squared back into secants. At that point the original integral reappears, and the last two moves collect it on one side and divide.

Hold on to this list. On the next slide exactly these five moves are carried out with a general power n in place of 3, and the result is a formula that does the whole argument for you, for every n at once.

The most important move to remember is the third one. When the original integral comes back, it is not a sign that you have gone in a circle; it is the moment the problem becomes solvable, because you can treat the integral as an unknown and solve an equation for it.

54. Deriving the secant reduction formula

Concept

Repeat Example 3.18 with a general power n of at least 2. Parts, with u equal to sec to the n minus 2 and dv equal to sec squared x dx:

\[ \int\sec^n x\,dx = \sec^{n-2}x\tan x - (n-2)\int\sec^{n-2}x\tan^2 x\,dx \]

Convert tangent squared, and the original integral comes back:

\[ = \sec^{n-2}x\tan x - (n-2)\int\sec^n x\,dx + (n-2)\int\sec^{n-2}x\,dx \]

Collect it on the left, where its coefficient becomes n minus 1:

\[ (n-1)\int\sec^n x\,dx = \sec^{n-2}x\tan x + (n-2)\int\sec^{n-2}x\,dx \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 281 — formula (3.6), verified by integration by parts

This is Example 3.18 with 3 replaced by n. Parts with u equal to secant to the n minus 2 and dv equal to secant squared: the derivative of secant to the n minus 2 is n minus 2 times secant to the n minus 3 times secant tangent, so v du has a tangent squared in it, just as before.

Convert that tangent squared into secant squared minus one. The integral splits into n minus 2 times the original integral, subtracted, and n minus 2 times the integral of a secant power two lower, added. Moving the original integral to the left gives it a coefficient of one plus n minus 2, which is n minus 1.

Divide by n minus 1 and you have formula 3.6. Its value is that it reduces the power by two in one line, so you can walk any secant power down to secant or secant squared without redoing parts each time.

55. Reading reduction formula 3.6

Notation

Annotate

On: \( \int\sec^n x\,dx = \frac{1}{n-1}\sec^{n-2}x\tan x + \frac{n-2}{n-1}\int\sec^{n-2}x\,dx \)

  • The uv piece from parts, divided by n − 1. It needs no more integrating.
  • The integral left over has power two lower. Apply the formula again until the power reaches 1 or 0.
  • The fraction that multiplies the leftover. At n = 2 it is 0, and the formula gives ∫sec²x dx = tan x.
  • Odd n ends at ∫sec x dx = ln|sec x + tan x|; even n ends at n = 2, where the leftover's coefficient is 0 and the answer is tan x.

\[ \int\tan^n x\,dx = \frac{1}{n-1}\tan^{n-1}x - \int\tan^{n-2}x\,dx \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 281 — formulas (3.6) and (3.7)

Step through the notes. The first term is the uv piece from parts, already integrated. The second term is an integral like the one you started with, but with the power lowered by two. Apply the formula again and again until the power is 1 or 2.

Check the formula on a case you know: at n equal to 2 the fraction in front of the leftover integral is zero, and the formula says the integral of secant squared is tangent, which is right. Checking a general formula on its simplest case is a good habit, and it would catch a wrong coefficient immediately.

The tangent formula underneath is simpler: no fraction in front of the leftover integral, and a minus sign instead of a plus. Tangent powers lose two at each step and end at tangent, whose integral is a logarithm, or at tangent to the zero, whose integral is x.

56. The tangent reduction formula

Concept

Formula 3.7 is strategy 3 done once for every n of at least 2:

\[ \int\tan^n x\,dx = \int\tan^{n-2}x\sec^2 x\,dx - \int\tan^{n-2}x\,dx \]

\[ = \frac{\tan^{n-1}x}{n-1} - \int\tan^{n-2}x\,dx \]

Figure (svg): Stems and dots for the values of the integral of tan to the n x from 0 to pi over 4, for n from 0 to 8: 0.785, 0.347, 0.215, 0.153, 0.119, 0.097, 0.081, 0.070, 0.062, decreasing toward zero.

Each integral plus the one two steps down equals one over n minus 1, exactly as the tangent reduction formula says when evaluated from 0 to pi over 4.

From 0 to pi over 4 the tangent is 1 at the top and 0 at the bottom, so each definite integral plus the one two steps below it is exactly one over n minus 1. The computed values obey that to every digit.

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 281 — formula (3.7)

Formula 3.7 comes from strategy 3 without any integration by parts. Split tangent to the n into tangent to the n minus 2 times secant squared minus one. The first piece is a substitution with u equal to tangent and gives tangent to the n minus 1 over n minus 1; the second piece is the same integral with the power lowered by two.

The figure checks the formula numerically. Each dot is the integral of tangent to the n from 0 to pi over 4, computed by Simpson's rule. At pi over 4 tangent is 1, and at 0 it is 0, so the formula says each integral plus the one two places to its left equals exactly one over n minus 1.

Read two pairs off the figure: 0.215 plus 0.785 is 1, and 0.119 plus 0.215 is one third. The whole row obeys the formula. The dots also shrink toward zero, because tangent is below 1 on that interval, so its higher powers are smaller.

57. Example 3.19: secant cubed, the short way

Worked example

\[ \int\sec^3 x\,dx \]

Apply formula 3.6 with n equal to 3

Why: One over 2 in front of the boundary term, and one half of the lower integral.

\[ \int\sec^3 x\,dx = \frac12\sec x\tan x + \frac12\int\sec x\,dx \]

Finish with the table integral

Why: The recursion has reached the first power.

\[ = \frac12\sec x\tan x + \frac12\ln|\sec x + \tan x| + C \]

Check against Example 3.18

Why: Identical to the answer found by parts, as it must be: the formula is that argument done once for every n.

\[ \text{Example 3.18: } \tfrac12\sec x\tan x + \tfrac12\ln|\sec x + \tan x| + C \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 281 — Example 3.19

With the formula in hand, Example 3.18 takes two lines. Put n equal to 3: the boundary term is one half secant tangent, and the leftover is one half the integral of secant, which is in the table.

The check compares with the long derivation, and the two agree exactly. That is not a coincidence, since the formula is the long derivation done once in general. But the comparison is still worth making, because it confirms you have remembered the formula's coefficients correctly.

This is the pattern for all reduction formulas: the hard work is done once, in the derivation, and each use afterwards is bookkeeping. The cost is that you must either memorise the formula accurately or be able to rederive it, which is why the derivation slide came first.

58. Example 3.20: tangent to the fourth

Worked example

\[ \int\tan^4 x\,dx \]

Apply formula 3.7 with n equal to 4

Why: One over 3, and the power drops by two.

\[ \int\tan^4 x\,dx = \frac13\tan^3 x - \int\tan^2 x\,dx \]

Apply formula 3.7 again with n equal to 2

Why: Tangent to the zero is 1.

\[ \int\tan^2 x\,dx = \tan x - \int 1\,dx = \tan x - x \]

Substitute back

Why: Mind the double minus.

\[ \int\tan^4 x\,dx = \frac13\tan^3 x - \tan x + x + C \]

Check by differentiating

Why: Use the identity twice.

\[ \tan^2 x\sec^2 x - \sec^2 x + 1 = \tan^2 x\sec^2 x - \tan^2 x \]

\[ = \tan^2 x\left(\sec^2 x - 1\right) = \tan^4 x \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, pp. 281-282 — Example 3.20

Tangent to the fourth needs formula 3.7 twice. With n equal to 4, the boundary term is one third tangent cubed and the leftover is minus the integral of tangent squared. With n equal to 2, that integral is tangent minus the integral of tangent to the zero, which is tangent minus x.

Substituting back needs care with signs: minus the quantity tangent minus x is minus tangent plus x. Writing the inner result in brackets before distributing avoids the most common slip.

The check differentiates each term: tangent squared secant squared, minus secant squared, plus one. Rewrite minus secant squared plus one as minus tangent squared, factor out tangent squared, and what is left is secant squared minus one, which is tangent squared again. The result is tangent to the fourth.

59. Checkpoint 3.13: secant to the fifth

Worked example

\[ \int\sec^5 x\,dx \]

Apply formula 3.6 with n equal to 5

Why: One quarter, and three quarters of the lower integral.

\[ \int\sec^5 x\,dx = \frac14\sec^3 x\tan x + \frac34\int\sec^3 x\,dx \]

Use the result for secant cubed

Why: From Example 3.19.

\[ \int\sec^3 x\,dx = \frac12\sec x\tan x + \frac12\ln|\sec x + \tan x| \]

Multiply by three quarters

Why: Three eighths on each term.

\[ \frac34\int\sec^3 x\,dx = \frac38\sec x\tan x + \frac38\ln|\sec x + \tan x| \]

Assemble

Why: Add the constant.

\[ \int\sec^5 x\,dx = \frac14\sec^3 x\tan x + \frac38\sec x\tan x \]

\[ \qquad + \frac38\ln|\sec x + \tan x| + C \]

Check with the area from 0 to pi over 4

Why: Secant cubed is 2 root 2 there and tangent is 1. Simpson's rule on secant to the fifth gives 1.567952.

\[ \tfrac14\left(2\sqrt2\right) + \tfrac38\sqrt2 + \tfrac38\ln\left(1 + \sqrt2\right) \approx 1.567952 \]

OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals §3.2, p. 282 — Checkpoint 3.13

One application of formula 3.6 with n equal to 5 gives one quarter secant cubed tangent plus three quarters of the integral of secant cubed. You already know that integral from Examples 3.18 and 3.19, so there is no need to apply the formula a second time from scratch.

Multiplying the secant cubed result by three quarters gives three eighths on each of its two terms. Assembled, the answer has three terms: one quarter secant cubed tangent, three eighths secant tangent, and three eighths of the logarithm.

The check evaluates from 0 to pi over 4, where secant cubed is two root 2 and tangent is 1, and at 0 every term vanishes. The total is about 1.567952, and Simpson's rule on secant to the fifth gives the same six decimals.

60. Trap: running a reduction past its floor

Trap

The trap

Pushing the tangent formula one step too far:

\[ \int\tan x\,dx \overset{?}{=} \frac{1}{0}\tan^0 x \]

\[ \quad - \int\tan^{-1}x\,dx \]

Wrong. At n equal to 1 the formula divides by zero.

The fix

Both formulas need n of at least 2. The chain stops at the first or zeroth power, and those come from the table:

\[ \int\tan x\,dx = \ln|\sec x| + C \]

\[ \int\tan^0 x\,dx = x + C \]

A reduction formula is a recursion, and every recursion has a place where it must stop. The tangent formula has one over n minus 1 in front, so at n equal to 1 it would divide by zero. The wrong line on the slide is what happens if you keep turning the handle without watching the power.

The fix is to recognise the floor. For tangent, the chain ends either at the first power, whose integral is the log of secant from the table, or at the zeroth power, whose integral is x. For secant, it ends at the first power, the log of secant plus tangent, or at secant squared, which is tangent.

So before applying a reduction formula, check that n is at least 2. If it is not, you are already at the bottom, and the table has the answer.

61. Putting it together

Section

Part 6

62. Pattern: choosing the first move

Pattern

Figure (svg): A grid of dots for the exponents j of cosine from 0 to 6 across and k of sine from 0 to 6 up. Dots are coloured by strategy: k odd and j even uses u equals cos x; j odd and k even uses u equals sin x; both odd may use either; both even needs the power-reducing identities. The colours form a checkerboard.

Read the two exponents, find the dot, and the colour is the strategy. Three quarters of the grid is a substitution; only the all-even quarter needs the half-angle identities.
  1. Sine and cosine: an odd sine power peels a sin x for u = cos x; an odd cosine power peels a cos x for u = sin x.
  2. Both even: power-reducing identities, as many rounds as it takes.
  3. Different angles: product-to-sum first, then one line per wave.
  4. Tangent and secant: an even secant power saves sec²x for u = tan x; an odd tangent power saves sec x tan x for u = sec x.
  5. Neither fits: rewrite in secants and use parts or a reduction formula.
  6. Always check by differentiating or with a definite integral: correct answers can look different.

The grid is the sine-cosine decision drawn out. Find the dot at your two exponents and its colour is your strategy. The checkerboard pattern shows that three of the four parity combinations give a substitution; only when both exponents are even do you need the power-reducing identities.

The list extends the same thinking to the rest of the lesson. Different angles call for product-to-sum. For tangent and secant, look for the spare factor: an even secant power gives secant squared, an odd tangent power gives secant tangent. If neither is available, rewrite in secants and use parts or a reduction formula.

The last item is the one that saves marks. Trigonometric antiderivatives come in many equivalent forms, so an answer that does not match the key may still be right. Differentiate it, or compare values at two points, before deciding.

63. Complete the strategy table

Comparison

Comparison matrix

integrandcasefirst move
sin⁵x cos²xsine power oddpeel sin x, u = cos x
cos⁴xboth powers evenpower-reducing identity
tan²x sec⁴xsecant power evensave sec²x, u = tan x
tan³x sec xtangent power oddsave sec x tan x, u = sec x
sin 4x cos 2xdifferent anglesproduct-to-sum

Fill in each blank before checking. For each row, the case is read from the exponents and angles, and the first move follows from the case.

Sine to the fifth times cosine squared has an odd sine power, so peel a sine. Cosine to the fourth is all even, so reduce the power. Tangent squared times secant to the fourth has an even secant power, so save secant squared for u equal to tangent. Tangent cubed times secant has an odd tangent power, so save secant tangent for u equal to secant. And sine 4x times cosine 2x has different angles, so the product-to-sum rule comes first.

If any row took more than a few seconds, look back at the matching notation slide; this table is those slides compressed into five lines.

64. Check: an all-even product

Check

Check your understanding

Which first move fits ∫sin⁴x cos⁶x dx?

  • A. u = sin x
  • B. u = cos x
  • C. the power-reducing identities (correct)
  • D. a product-to-sum rule

Answer: C

Why: Both exponents are even, so there is no spare factor to serve as du. Lowering the powers with sin²x = ½ − ½cos 2x and cos²x = ½ + ½cos 2x is the only route.

Why A tempts people
u = sin x needs a spare cos x, which needs an odd cosine power; 6 is even.
Why B tempts people
u = cos x needs a spare sin x, which needs an odd sine power; 4 is even.
Why D tempts people
Product-to-sum is for sines and cosines of different angles; here both have angle x.

Both exponents are even, four and six, so the question is really about what that means. Neither substitution can be set up, because each needs a spare factor from an odd power, and there is none.

The power-reducing identities are the only route. It is a long calculation, with several rounds of reduction, but it is guaranteed to finish. The product-to-sum option is a reasonable-sounding distractor, but those rules are for sines and cosines of different angles, and here both angles are x.

It is worth knowing that the long calculation is rarely needed in practice for a full period. Over one period, the average-value shortcut from the estimation slide gives the definite integral at once, from the constant term of the expansion alone. The antiderivative itself, though, needs every round of reduction.

65. Check: two different angles

Check

Check your understanding

What is ∫sin(3x) sin(x) dx?

  • A. ¼ sin 2x − ⅛ sin 4x + C (correct)
  • B. ¼ sin 2x + ⅛ sin 4x + C
  • C. ½ sin 2x − ½ sin 4x + C
  • D. −¼ cos 2x + ⅛ cos 4x + C

Answer: A

Why: Rule (3.3): sin 3x sin x = ½cos 2x − ½cos 4x. Integrating, ½cos 2x gives ¼ sin 2x and ½cos 4x gives ⅛ sin 4x, keeping the minus sign.

Why B tempts people
The two sines rule has a MINUS between the two cosines: ½cos((a − b)x) − ½cos((a + b)x).
Why C tempts people
Integrating cos(cx) divides by c: the halves must also be divided by 2 and by 4.
Why D tempts people
Cosines integrate to sines, not cosines; this is the wrong antiderivative family.

This is the sine-sine rule with a equal to 3 and b equal to 1. The difference frequency is 2 and the sum frequency is 4, and for two sines the cosines are subtracted: one half cosine 2x minus one half cosine 4x.

Integrating divides by the frequencies, giving one quarter sine 2x minus one eighth sine 4x. The distractors each make one specific slip: the wrong sign between the terms, forgetting to divide by the frequencies, or integrating cosine into cosine. If you picked one of them, find which slip it was.

This is also a fast way to self-check any product-to-sum answer: put x equal to 0 into the original product and into the rewritten sum. Here the product of two sines is zero at 0, and one half cosine 0 minus one half cosine 0 is zero too, while the plus version would give one.

66. Check: one step of reduction

Check

Check your understanding

Formula (3.7) applied once to ∫tan⁶x dx gives which expression?

  • A. ⅕ tan⁵x − ∫tan⁴x dx (correct)
  • B. ⅙ tan⁶x − ∫tan⁴x dx
  • C. ⅕ tan⁵x + ∫tan⁴x dx
  • D. ⅕ tan⁵x − ∫tan⁵x dx

Answer: A

Why: With n = 6: one over n − 1 is one fifth, the power on the boundary term is n − 1 = 5, and the remaining integral is tan to the n − 2 = 4, subtracted.

Why B tempts people
That confuses the formula with the power rule; the boundary term comes from ∫tan⁴x sec²x dx = tan⁵x/5.
Why C tempts people
The leftover integral is subtracted, because tan²x = sec²x − 1 carries a minus sign.
Why D tempts people
The power drops by TWO each step, because the identity removes a tan²x.

Put n equal to 6 into formula 3.7. The coefficient is one over n minus 1, which is one fifth. The boundary term's power is n minus 1, which is 5. The leftover integral's power is n minus 2, which is 4, and it is subtracted.

Each distractor gets exactly one of those three pieces wrong. The most instructive is the one that lowers the power by only one: the formula removes a tangent squared at each step, so powers always drop by two, and odd and even powers never mix.

That last point has a practical consequence. An odd starting power walks down through the odd powers and ends at tangent, whose integral is a logarithm; an even starting power ends at tangent to the zero, whose integral is x. You can predict what the final answer will contain before doing any of the steps.

67. Explain why parity decides

Explain it to yourself

Discussion prompt

In two or three sentences: why does an odd power of sine or cosine let you substitute, while two even powers force you to use the power-reducing identities instead?

Write your explanation before revealing. This is the idea that holds the whole lesson together, and if you can explain it you can reconstruct every strategy list without memorising it.

The model answer has two parts. First, substitution needs one factor to spend on du. Second, the identity can only convert even powers into the other function. An odd power can afford to spend one factor, because what remains is even and converts. An even power cannot, because spending one leaves an odd power, which does not convert without a square root.

The same explanation, with tangent and secant, accounts for the tangent-secant strategies. That is a good test of your understanding: try saying why an even secant power allows u equal to tangent.

68. Exit ticket

Exit ticket

\[ \int_0^{\pi/2}\sin^2 x\cos^2 x\,dx \]

Discussion prompt

Name the case, choose the first move, and evaluate. (Exercise 100, with limits.)

This problem combines two ideas from the lesson. Both exponents are even, so the power must be lowered, and there is a shortcut worth spotting first: sine x times cosine x is one half sine 2x, so the whole product is one quarter sine squared 2x.

One more power reduction turns that into one eighth times one minus cosine 4x. Integrating from 0 to pi over 2, the sine term vanishes at both ends, leaving one eighth of pi over 2, which is pi over 16, about 0.1963.

If you went the long way, reducing sine squared and cosine squared separately and multiplying out, you should get the same number; the product of the two brackets contains a cosine squared of 2x that needs one more reduction. Either route is fine. Choosing the shorter one is the skill this lesson has been building.

69. Recap

Recap

integrandcasemove
cosʲx sinᵏxk odd (or j odd)peel one factor; u = cos x (or u = sin x)
cosʲx sinᵏxboth evensin²x = ½ − ½cos 2x, cos²x = ½ + ½cos 2x
sin(ax)cos(bx) and kindifferent anglesproduct-to-sum rules (3.3) to (3.5)
tanᵏx secʲxj even / k oddsave sec²x, u = tan x / save sec x tan x, u = sec x
secⁿx, tanⁿxodd secant, or a lone tangentparts, or reduction formulas (3.6) and (3.7)

\[ \sin^2 x + \cos^2 x = 1, \qquad \tan^2 x + 1 = \sec^2 x \]

Next, Section 3.3 runs this lesson in reverse: it turns square roots of quadratics into exactly these trigonometric integrals.

Stewart, Calculus: Early Transcendentals 8e, §7.2 Trigonometric Integrals §7.2, pp. 479-485 — the same material in Stewart

The table is the lesson on one page. For sines and cosines, parity decides: an odd power spares a factor for substitution, and all-even powers are lowered with the power-reducing identities. Different angles become sums with the product-to-sum rules. For tangents and secants, look for a spare secant squared or secant tangent, and when there is none, turn to parts or a reduction formula.

Two identities power everything: sine squared plus cosine squared is one, and tangent squared plus one is secant squared. Each converts squares only, which is the deep reason parity matters in both halves of the lesson.

Section 3.3 now runs this in reverse. It starts with square roots of quadratics, which no technique so far can handle, and substitutes a sine, tangent or secant to turn them into exactly the integrals you have just learned to evaluate.

Sources

  1. OpenStax Calculus Volume 2, §3.2 Trigonometric Integrals — Strang & Herman, OpenStax / Rice University, CC BY-NC-SA 4.0, pp. 273-284
  2. Stewart, Calculus: Early Transcendentals 8e, §7.2 Trigonometric Integrals — James Stewart, Cengage Learning, 2016, pp. 479-485

Want this taught 1-on-1? Alexander tutors Calculus II — $55/session, free consultation.

Book on Wyzant · Text (657) 465-8108