BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

Trigonometric integrals and substitution

Integrals of sinⁿx cosᵐx: if one exponent is odd, peel off one factor, turn the rest into the other function with sin²x + cos²x = 1, and substitute u = cos x or u = sin x. If both are even, lower the powers with the half-angle formulas cos²x = (1 + cos 2x)/2 and sin²x = (1 − cos 2x)/2. The notes treat secants and tangents the same way. Then a trigonometric substitution, y = a sin θ, integrates √(a² − y²) and splits the area of a piece of a disk into a sector and a triangle.

You need this first

Full reading path (15 pages)
  1. The derivative: slope of the tangent line and rate of change (18.01)
  2. Limits and continuity (18.01)
  3. Derivatives of sine and cosine, and the product and quotient rules (18.01)
  4. The chain rule and higher derivatives (18.01)
  5. Implicit differentiation and the derivatives of inverse functions (18.01)
  6. Exponentials and logarithms: the number e and its derivatives (18.01)
  7. Linear and quadratic approximations (18.01)
  8. Curve sketching with the first and second derivative (18.01)
  9. Sketching strategy and maximum–minimum problems (18.01)
  10. More max–min, and related rates (18.01)
  11. A ring on a string, and Newton's method (18.01)
  12. The mean value theorem and inequalities (18.01)
  13. Differentials and antiderivatives (18.01)
  14. Definite integrals and Riemann sums (18.01)
  15. The first fundamental theorem of calculus (18.01)
On this page · 6 sections
  1. Trigonometric identities
  2. Powers of sine and cosine: an odd exponent
  3. Powers of sine and cosine: all even
  4. Secants and tangents
  5. Trigonometric substitution
  6. Summary

This lecture, given by a substitute lecturer, collects techniques for integrals involving trigonometric functions: powers of sines and cosines, then secants and tangents (in the notes), then a substitution that uses trigonometry to integrate a square root (transcript, p. 1). The notes for it are numbered Lecture 26; in their calendar Lecture 27 is the third exam (notes, p. 5).

Trigonometric identities#

Everything rests on the unit circle: the point at angle θ\theta is (cos⁡θ,sin⁡θ)(\cos\theta, \sin\theta), so sin⁡2θ+cos⁡2θ=1\sin^2\theta + \cos^2\theta = 1, where sin⁡2θ\sin^2\theta means (sin⁡θ)2(\sin\theta)^2 (transcript, p. 1). The double-angle formulas are cos⁡2θ=cos⁡2θ−sin⁡2θ\cos 2\theta = \cos^2\theta - \sin^2\theta and sin⁡2θ=2sin⁡θcos⁡θ\sin 2\theta = 2\sin\theta\cos\theta (p. 1). Replacing sin⁡2θ\sin^2\theta by 1−cos⁡2θ1 - \cos^2\theta in the first gives cos⁡2θ=2cos⁡2θ−1\cos 2\theta = 2\cos^2\theta - 1, and solving for the square (pp. 1–2; notes, p. 2):

Half-angle formulas
cos⁡2θ=1+cos⁡2θ2,sin⁡2θ=1−cos⁡2θ2\cos^2\theta = \frac{1 + \cos 2\theta}{2}, \qquad \sin^2\theta = \frac{1 - \cos 2\theta}{2}
In words

cos squared theta equals the quantity 1 plus cos 2 theta, all over 2, sine squared theta equals the quantity 1 minus cos 2 theta, all over 2

Source: 18.01 Lecture 27 transcript, pp. 1–2

For integration they are a way to remove squares, at the cost of doubling the angle (p. 2). The starting integrals are ∫cos⁡x dx=sin⁡x+c\int\cos x\,dx = \sin x + c and ∫sin⁡x dx=−cos⁡x+c\int\sin x\,dx = -\cos x + c (p. 2; notes, p. 1).

Powers of sine and cosine: an odd exponent#

The family is ∫sin⁡nx cos⁡mx dx\int\sin^n x\,\cos^m x\,dx with nn and mm whole numbers, 0,1,2,…0, 1, 2, \ldots; such integrals come up in Fourier series and elsewhere (transcript, p. 2). The easy case is when at least one exponent is odd (p. 2; notes, Method A, p. 1). With m=1m = 1, the factor cos⁡x dx\cos x\,dx is exactly d(sin⁡x)d(\sin x), so substitute u=sin⁡xu = \sin x, du=cos⁡x dxdu = \cos x\,dx (pp. 2–3):

One factor of cosine
∫sin⁡nx cos⁡x dx=∫un du=un+1n+1+c=sin⁡n+1xn+1+c\int \sin^n x\,\cos x\,dx = \int u^n\,du = \frac{u^{n+1}}{n + 1} + c = \frac{\sin^{n+1}x}{n + 1} + c
In words

the integral of sine to the power n x cos x d x equals the integral of u to the power n d u equals u to the power n plus 1, end of power, over the quantity n plus 1, plus c equals sine to the power n plus 1, end of power, x over the quantity n plus 1, plus c

Then substitute back: you introduced uu, but the question was asked in terms of xx (p. 3). When the odd power is higher, keep one factor and turn the remaining even power into the other function with sin⁡2x=1−cos⁡2x\sin^2 x = 1 - \cos^2 x (p. 3):

An odd power of sine
∫sin⁡3x cos⁡2x dx=∫(1−cos⁡2x)cos⁡2x sin⁡x dx=−∫(u2−u4) du=−cos⁡3x3+cos⁡5x5+c\int \sin^3 x\,\cos^2 x\,dx = \int (1 - \cos^2 x)\cos^2 x\,\sin x\,dx = -\int (u^2 - u^4)\,du = -\frac{\cos^3 x}{3} + \frac{\cos^5 x}{5} + c
In words

the integral of sine cubed x cos squared x d x equals the integral of the quantity 1 minus cos squared x, cos squared x sine x d x equals minus the integral of the quantity u squared minus u to the power 4, d u equals minus cos cubed x over 3 plus cos to the power 5 x over 5 plus c

Source: 18.01 Lecture 27 transcript, pp. 3–4

using u=cos⁡xu = \cos x, du=−sin⁡x dxdu = -\sin x\,dx; mind the minus sign (p. 4; notes, Example 1, p. 1). Differentiating the answer is an easy check (p. 4). With no cosine at all, ∫sin⁡3x dx=∫(1−cos⁡2x)sin⁡x dx=−cos⁡x+cos⁡3x3+c\int\sin^3 x\,dx = \int(1 - \cos^2 x)\sin x\,dx = -\cos x + \frac{\cos^3 x}{3} + c (p. 4). (The transcript drops the minus sign on cos⁡x\cos x in this last answer, p. 4; differentiating confirms −cos⁡x-\cos x.) The notes do ∫cos⁡3x dx=sin⁡x−sin⁡3x3+c\int\cos^3 x\,dx = \sin x - \frac{\sin^3 x}{3} + c the same way, with u=sin⁡xu = \sin x (notes, Example 2, p. 1).

Powers of sine and cosine: all even#

The harder case is when every exponent is even: there is no spare factor to serve as dudu, and writing cos⁡2x=1−sin⁡2x\cos^2 x = 1 - \sin^2 x only swaps one even power for another (transcript, p. 5). Use the half-angle formulas instead (p. 5; notes, Method B, p. 2):

Cosine squared
∫cos⁡2x dx=∫1+cos⁡2x2 dx=x2+sin⁡2x4+c\int \cos^2 x\,dx = \int \frac{1 + \cos 2x}{2}\,dx = \frac{x}{2} + \frac{\sin 2x}{4} + c
In words

the integral of cos squared x d x equals the integral of the quantity 1 plus cos 2 x, all over 2, times d x equals x over 2 plus sine 2 x over 4 plus c

The 14\frac{1}{4} comes from the chain rule: differentiating sin⁡2x\sin 2x brings out a 2 (p. 5). Note that a non-trigonometric term, x/2x/2, appears (p. 5). In the same way ∫sin⁡2x dx=x2−sin⁡2x4+c\int\sin^2 x\,dx = \frac{x}{2} - \frac{\sin 2x}{4} + c (notes, p. 2).

For sin⁡2xcos⁡2x\sin^2 x\cos^2 x, do the trigonometry on the side first (pp. 5–6). Both half-angle formulas, then (a−b)(a+b)=a2−b2(a - b)(a + b) = a^2 - b^2, then the half-angle formula once more:

Sine squared times cosine squared
sin⁡2xcos⁡2x=1−cos⁡22x4=18−cos⁡4x8,∫sin⁡2xcos⁡2x dx=x8−sin⁡4x32+c\sin^2 x\cos^2 x = \frac{1 - \cos^2 2x}{4} = \frac{1}{8} - \frac{\cos 4x}{8}, \qquad \int \sin^2 x\cos^2 x\,dx = \frac{x}{8} - \frac{\sin 4x}{32} + c
In words

sine squared x cos squared x equals the quantity 1 minus cos squared 2 x, all over 4 equals one eighth minus cos 4 x over 8, the integral of sine squared x cos squared x d x equals x over 8 minus sine 4 x over 32 plus c

A shortcut: sin⁡xcos⁡x=12sin⁡2x\sin x\cos x = \frac{1}{2}\sin 2x, so sin⁡2xcos⁡2x=14sin⁡22x\sin^2 x\cos^2 x = \frac{1}{4}\sin^2 2x, and one half-angle step gives the same expression (pp. 6–7; notes, Example 3, p. 2). Alternating these two procedures handles any sin⁡nx cos⁡mx\sin^n x\,\cos^m x (transcript, p. 6; notes, p. 2).

The curve y=sin⁡2xcos⁡2xy = \sin^2 x\cos^2 x from 0 to π\pi, computed from the formula, with its average value 1/8 (dashed). It equals 1/8−cos⁡(4x)/81/8 - \cos(4x)/8, and the cosine part averages to zero over a whole number of periods, so the area from 0 to π\pi is π/8\pi/8.

Secants and tangents#

The notes start a second family, ∫sec⁡nx tan⁡mx dx\int\sec^n x\,\tan^m x\,dx, with the identity sec⁡2x=1+tan⁡2x\sec^2 x = 1 + \tan^2 x and the derivatives ddxtan⁡x=sec⁡2x\frac{d}{dx}\tan x = \sec^2 x and ddxsec⁡x=sec⁡xtan⁡x\frac{d}{dx}\sec x = \sec x\tan x (notes, p. 2). The same ideas work:

  • ∫tan⁡x dx=∫sin⁡xcos⁡x dx=−ln⁡∣cos⁡x∣+c\int\tan x\,dx = \int\frac{\sin x}{\cos x}\,dx = -\ln|\cos x| + c, with u=cos⁡xu = \cos x (notes, p. 3).
  • An even power of secant: ∫sec⁡4x dx=∫(1+tan⁡2x)sec⁡2x dx=tan⁡x+tan⁡3x3+c\int\sec^4 x\,dx = \int(1 + \tan^2 x)\sec^2 x\,dx = \tan x + \frac{\tan^3 x}{3} + c, with u=tan⁡xu = \tan x (p. 3).
  • An odd power of tangent: ∫tan⁡3x sec⁡x dx=∫(sec⁡2x−1)sec⁡xtan⁡x dx=sec⁡3x3−sec⁡x+c\int\tan^3 x\,\sec x\,dx = \int(\sec^2 x - 1)\sec x\tan x\,dx = \frac{\sec^3 x}{3} - \sec x + c, with u=sec⁡xu = \sec x (p. 3).

And one integral found by "knowing the answer ahead of time": multiply and divide by sec⁡x+tan⁡x\sec x + \tan x, and the numerator becomes the derivative of the denominator (notes, pp. 3–4):

Integral of the secant
∫sec⁡x dx=∫sec⁡2x+sec⁡xtan⁡xsec⁡x+tan⁡x dx=ln⁡∣sec⁡x+tan⁡x∣+c\int \sec x\,dx = \int \frac{\sec^2 x + \sec x\tan x}{\sec x + \tan x}\,dx = \ln|\sec x + \tan x| + c
In words

the integral of secant x d x equals the integral of the quantity secant squared x plus secant x tan x, all over the quantity secant x plus tan x, times d x equals log the absolute value of secant x plus tan x plus c

(The notes write these logarithms without the absolute value signs, which are needed where the inside is negative.) Odd powers of secant with even powers of tangent are left for later (p. 4).

Trigonometric substitution#

Now a problem with no trigonometry in it. A disk of radius aa is centred at the origin; cut out the piece in the first quadrant below the height y=by = b. What is its area (transcript, p. 7)? Vertical strips are awkward, because the top edge is flat and then curved. Horizontal strips of width dydy and length x=a2−y2x = \sqrt{a^2 - y^2} work in one piece (p. 7):

Area of the piece
A=∫0ba2−y2 dyA = \int_0^b \sqrt{a^2 - y^2}\,dy
In words

capital A equals the integral from 0 to b of the square root of a squared minus y squared, end of root, d y

The square root comes from the circle, so use the circle: put y=asin⁡θy = a\sin\theta, as in polar coordinates (pp. 7–8). Then a2−y2=a2−a2sin⁡2θ=acos⁡θ\sqrt{a^2 - y^2} = \sqrt{a^2 - a^2\sin^2\theta} = a\cos\theta and dy=acos⁡θ dθdy = a\cos\theta\,d\theta, so the square root disappears and only trigonometry is left (p. 8; notes, p. 5):

The substitution y=asin⁡θy = a\sin\theta
∫a2−y2 dy=a2∫cos⁡2θ dθ=a2(θ2+sin⁡2θ4)+c\int \sqrt{a^2 - y^2}\,dy = a^2\int \cos^2\theta\,d\theta = a^2\left(\frac{\theta}{2} + \frac{\sin 2\theta}{4}\right) + c
In words

the integral of the square root of a squared minus y squared, end of root, d y equals a squared the integral of cos squared theta d theta equals a squared the quantity theta over 2 plus sine 2 theta over 4, all plus c

using the cosine-squared integral from before. To go back to yy, write sin⁡2θ=2sin⁡θcos⁡θ\sin 2\theta = 2\sin\theta\cos\theta, θ=arcsin⁡(y/a)\theta = \arcsin(y/a), asin⁡θ=ya\sin\theta = y and acos⁡θ=a2−y2a\cos\theta = \sqrt{a^2 - y^2} (pp. 8–9):

Integral of the square root
∫a2−y2 dy=a22arcsin⁡ya+ya2−y22+c\int \sqrt{a^2 - y^2}\,dy = \frac{a^2}{2}\arcsin\frac{y}{a} + \frac{y\sqrt{a^2 - y^2}}{2} + c
In words

the integral of the square root of a squared minus y squared, end of root, d y equals a squared over 2 arc sine y over a plus y the square root of a squared minus y squared, end of root, over 2 plus c

Whenever you see a constant minus a square under a root, think of sin⁡2+cos⁡2=1\sin^2 + \cos^2 = 1; the substitution y=acos⁡θy = a\cos\theta works just as well (p. 9). At y=0y = 0 both terms vanish, so with θ0=arcsin⁡(b/a)\theta_0 = \arcsin(b/a), the angle at the corner (pp. 9–10):

The area, read geometrically
A=a2θ02+ba2−b22A = \frac{a^2\theta_0}{2} + \frac{b\sqrt{a^2 - b^2}}{2}
In words

capital A equals a squared theta nought over 2 plus b the square root of a squared minus b squared, end of root, over 2

Source: 18.01 Lecture 27 transcript, pp. 9–10

The first term is the area of a sector of angle θ0\theta_0, the second the area of a right triangle with legs bb and a2−b2\sqrt{a^2 - b^2}: plain geometry gives the same answer as the calculus (p. 10).

Worked example

Three integrals

Find (a) ∫0π/2sin⁡3x dx\int_0^{\pi/2}\sin^3 x\,dx, (b) ∫0πsin⁡2xcos⁡2x dx\int_0^\pi\sin^2 x\cos^2 x\,dx, (c) the area of the piece of a disk of radius 2 below the height 1, in the first quadrant.

(a) An odd power

∫sin⁡3x dx=−cos⁡x+cos⁡3x3+c\int\sin^3 x\,dx = -\cos x + \frac{\cos^3 x}{3} + c. At π/2\pi/2 this is 0; at 0 it is −1+13=−23-1 + \frac{1}{3} = -\frac{2}{3}. So the integral is 23≈0.667\frac{2}{3} \approx 0.667.

(b) Even powers

[x8−sin⁡4x32]0π=π8≈0.393\Big[\frac{x}{8} - \frac{\sin 4x}{32}\Big]_0^\pi = \frac{\pi}{8} \approx 0.393, since sin⁡4π=0\sin 4\pi = 0.

(c) The trigonometric substitution

With a=2a = 2, b=1b = 1: θ0=arcsin⁡12=π6\theta_0 = \arcsin\frac{1}{2} = \frac{\pi}{6}, so A=42⋅π6+1⋅32=π3+32≈1.047+0.866=1.913A = \frac{4}{2}\cdot\frac{\pi}{6} + \frac{1 \cdot \sqrt 3}{2} = \frac{\pi}{3} + \frac{\sqrt 3}{2} \approx 1.047 + 0.866 = 1.913. The piece is a little less than the rectangle of width 2 and height 1: it must be, since the length x=4−y2x = \sqrt{4 - y^2} of each horizontal strip is at most 2.

Summary#

  • Half-angle formulas: cos⁡2θ=1+cos⁡2θ2\cos^2\theta = \frac{1 + \cos 2\theta}{2}, sin⁡2θ=1−cos⁡2θ2\sin^2\theta = \frac{1 - \cos 2\theta}{2}.
  • ∫sin⁡nxcos⁡mx dx\int\sin^n x\cos^m x\,dx with an odd exponent: keep one factor for dudu, convert the rest with sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1, substitute.
  • All exponents even: lower the powers with the half-angle formulas, repeatedly if needed.
  • Secants and tangents: sec⁡2x=1+tan⁡2x\sec^2 x = 1 + \tan^2 x; ∫tan⁡x dx=−ln⁡∣cos⁡x∣+c\int\tan x\,dx = -\ln|\cos x| + c, ∫sec⁡x dx=ln⁡∣sec⁡x+tan⁡x∣+c\int\sec x\,dx = \ln|\sec x + \tan x| + c.
  • a2−y2\sqrt{a^2 - y^2}: substitute y=asin⁡θy = a\sin\theta; the area of a piece of a disk splits into a sector and a triangle.

Symbols on this page

Show the 26 symbols used here
α\alpha alpha.
In the cosmology note, the length that sets the size of a closed universe. Unit: m. Say it: “alpha”.
θ\theta theta.
An angle. Say it: “theta” (sounds like “thay-ta or thee-ta”).
π\pi pi.
The ratio of a circle's circumference to its diameter, π ≈ 3.14159. Say it: “pi”.
≈\approx approximately equal.
Is approximately equal to. Say it: “is approximately”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
∫\int integral.
Integral: the sum of infinitely many small pieces, such as the area under a curve. Say it: “the integral of”.
sin⁡\sin sine.
Sine of an angle. Say it: “sine”.
cos⁡\cos cosine.
Cosine of an angle. Say it: “cos”.
tan⁡\tan tangent.
Tangent of an angle, sin/cos. Say it: “tan”.
arcsin⁡\arcsin arcsine.
Inverse sine: the angle whose sine is the given number. Say it: “arc sine”.
ln⁡\ln natural logarithm.
Natural logarithm (base e ≈ 2.718). Say it: “log”.
a~\tilde a tilde.
A modified version of a quantity (ã, k̃); its meaning is given where it is introduced. Say it: “tilde”.
aa a.
The radius of the disk; in the identity (a − b)(a + b) = a² − b², any number; in the cosmology note, the scale factor. Say it: “a”.
cc c.
The constant of integration; in the cosmology note, the speed of light. Say it: “c”.
kk k.
In the cosmology note, the curvature constant of a closed universe. Say it: “k”.
xx x.
The variable of integration (an angle, in radians, in the trigonometric integrals); in the area problem, the horizontal length √(a² − y²) of a strip; in the cosmology note, a shifted scale factor. Say it: “x”.
yy y.
The height above the x-axis (the variable of integration in the area problem). Say it: “y”.
tt t.
In the cosmology note, the time since the Big Bang. Unit: s. Say it: “t”.
dd d.
As in dx, du, dy and dθ: a differential. Say it: “d”.
nn n.
The power of sin x in sinⁿx cosᵐx (a whole number 0, 1, 2, …). Say it: “n”.
mm m.
The power of cos x in sinⁿx cosᵐx (a whole number 0, 1, 2, …). Say it: “m”.
AA A.
The area of the piece of the disk. Say it: “capital A”.
bb b.
The height at which the piece of the disk is cut off; in the identity (a − b)(a + b) = a² − b², any number. Say it: “b”.
θ0\theta_{0} theta nought.
The angle at the corner of the piece of the disk, θ₀ = arcsin(b/a). Unit: rad. Say it: “theta nought”.
uu u.
The new variable in a substitution (u = sin x, cos x, tan x or sec x). Say it: “u”.
sec⁡\sec secant.
The secant, sec x = 1/cos x. Say it: “secant”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 18 words used here

Also used

integral.
A sum of very many very small pieces, such as the area under a graph; it undoes taking a derivative. Explained in Rates of change and area under a graph.
secant.
The trigonometric function sec x, equal to 1 divided by cos x.
tangent.
The trigonometric function tan x, equal to sin x divided by cos x.
integration.
Finding an integral: adding up very many small pieces, or finding an antiderivative. Explained in Differentials and antiderivatives.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
unit circle.
The circle of radius 1 centred at the origin; the point at angle θ on it is (cos θ, sin θ). Explained in Angles, radians and trigonometry.
Fourier series.
A way of writing a repeating function as a sum of sines and cosines whose frequencies are whole-number multiples of one frequency. Explained in Normal modes of a string and Fourier series.
differentiation.
Finding a derivative: working out how fast a function changes. Explained in The derivative: slope of the tangent line and rate of change.
chain rule.
The rule for the derivative of a function of a function: multiply the derivative of the outer one by that of the inner one. Explained in Circular motion: polar coordinates, position and velocity.
derivative.
The rate at which a function changes as its input changes: the slope of its graph at a point. Explained in Position and velocity in one dimension.
logarithm.
The power to which a fixed base must be raised to give a number: log₁₀ 1000 = 3 because 10³ = 1000. Explained in Exponentials and logarithms.
polar coordinates.
Coordinates in a flat plane that give a point's distance r from the origin and its angle θ from a fixed direction. Explained in Vectors.
closed universe.
A universe with more than the critical density, whose space curves back on itself like a sphere, so it is finite. Explained in Open, closed and flat universes.
completing the square.
Rewriting x² + bx + c as (x + b/2)² plus a number, which turns any quadratic into a shifted square. Explained in Inverse substitution and completing the square.
parametric solution.
A solution that gives two quantities, such as size and time, each as a function of a third helper variable, instead of one directly. Explained in The closed universe as a cycloid.
cycloid.
The curve traced by a point on the rim of a wheel rolling along a straight line. Explained in Rolling kinematics.

Academic

transcript.
A written record of exactly what was said in a recorded lecture, word for word.
vanish.
To become zero; sometimes, of a fixed point or solution, to stop existing.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

Pages that build on this

Practise

Check your understanding

  1. ∫sin⁡4x cos⁡x dx=\int \sin^4 x\,\cos x\,dx =
  2. Which first step suits ∫sin⁡2x cos⁡4x dx\int \sin^2 x\,\cos^4 x\,dx?
  3. ∫0π/2sin⁡3x dx=\int_0^{\pi/2} \sin^3 x\,dx =
  4. To integrate 9−y2\sqrt{9 - y^2}, substitute…
0 of 4 answered

Flashcards

1 / 4