Chalk−1

Math · Calculus II · Concept

Trigonometric substitution

Trigonometric substitution handles integrals that contain a2−x2, a2+x2 or x2−a2. Replace x with asinθ, atanθ or asecθ, and an identity such as 1−sin2θ=cos2θ turns the expression under the root into a perfect square. Integrate in θ, then return to x with a right triangle, or change the limits of a definite integral and stay in θ.

A concrete case

A quarter circle, measured in angles

The curve y=9−x2 from x=0 to x=3 is a quarter of a circle of radius 3. Geometry gives its area as a quarter of π⋅32, which is 9⁢π⁢/4≈7.069. An integral should agree, but the substitution u=9−x2 needs a factor of x beside d⁢x, and there is none.

Describe each point of the circle by an angle instead. Put x=3sinθ. The height 9−x2 becomes 9−9sin2θ=3cosθ, with no root left. At θ=π⁢/6, for example, x=1.5 and the height is 6.75≈2.598, which is 3cos(π⁢/6).

The width of a strip changes too. As θ moves by a small d⁢θ, x moves by about 3cosθ d⁢θ, so equal steps in θ give narrower strips in x near x=3, where θ is close to π⁢/2. The area is the integral of the height 3cosθ times the width 3cosθ d⁢θ, from θ=0 to θ=π⁢/2. That integral of 9cos2θ is 9⁢π⁢/4, the quarter circle exactly.

Forgetting the width gives the integral of 3cosθ alone, which is 3, far from 7.069. The root disappears only when d⁢x changes along with it.

∫039−x2d⁢x=∫0π⁢/29cos2θd⁢θ=9⁢π4
∫039−x2d⁢x=∫0π⁢/29cos2θd⁢θ=9⁢π4

The rule

The three substitutions

Trigonometric substitution replaces x with a times a trigonometric function of a new variable θ. The function is chosen so that a Pythagorean identity turns the expression under the root into one square. Here a is a positive constant read from the integral, as in 9−x2=32−x2.

θ is kept in a range where the substitution can be undone and the root comes out without an absolute value. The range is −π⁢/2≤θ≤π⁢/2 for sine, −π⁢/2<θ<π⁢/2 for tangent, and 0≤θ<π⁢/2 for secant when x≥a.

a2−a2sin2θ=acosθ
The three trigonometric substitutions
Integral containsSubstituted⁢xThe root becomes
a2−x2x =asinθacosθ d⁢θacosθ
a2+x2x =atanθasec2θ d⁢θasecθ
x2−a2x =asecθasecθtanθ d⁢θatanθ

Replace d⁢x as well

The substitution changes the variable of integration, so d⁢x changes with it. Differentiate x=asinθ to get d⁢x=acosθ d⁢θ. Swapping the root for acosθ and writing d⁢θ in place of d⁢x gives an integral with a different value, as the quarter circle showed.

x=asinθ⇒d⁢x=acosθd⁢θ

Why it works

Why it works

Each Pythagorean identity rewrites a sum or difference of squares as a single square. The identities are 1−sin2θ=cos2θ, 1+tan2θ=sec2θ and sec2θ−1=tan2θ. Multiplied through by a2, they match the forms a2−x2, a2+x2 and x2−a2, and the square root of a single square is that quantity up to its sign.

The change of variable is substitution run in the other direction. In u-substitution an inside expression gets a new name. Here x itself is written as a function of θ, x=g⁡(θ), and the chain rule gives d⁢x=g′(θ) d⁢θ. That direction needs g to be one-to-one on the chosen range, so that each x comes from exactly one θ and the answer can return to x. On each range the function the root becomes is not negative: cosθ for the sine substitution, secθ for the tangent and tanθ for the secant. That is why the root loses its absolute value.

∫f⁡(x)d⁢x=∫f(g⁡(θ))g′(θ)d⁢θ
∫f⁡(x)d⁢x=∫f(g⁡(θ))g′(θ)d⁢θ

The method

The method in seven steps

The table works through ∫d⁢x⁢/⁢(x24−x2) for x between 0 and 2.

∫d⁢xx24−x2=∫14csc2θd⁢θ=−4−x24⁢x+C
∫d⁢xx24−x2=∫14csc2θd⁢θ=−4−x24⁢x+C
Trigonometric substitution on the integral of 1⁢/⁢(x24−x2)
StepWhat to doFor ∫d⁢x⁢/⁢(x24−x2)
1Match the form and choose x4−x2 =22−x2, so x =2sinθ
2Find d⁢xd⁢x =2cosθ d⁢θ
3Simplify the root4−4sin2θ =2cosθ
4Rewrite the integral in θ∫2cosθ d⁢θ⁢/⁢(4sin2θ⋅2cosθ) =∫14csc2θ d⁢θ
5Integrate in θ−14cotθ+C
6Return to x with the trianglecotθ =4−x2/⁢x, so −4−x2/⁢(4⁢x)+C
7Check by differentiatingThe derivative is 1⁢/⁢(x24−x2)

Return to x with a triangle

An indefinite integral in x needs an answer in x. Draw a right triangle that shows the substitution. x=asinθ says sinθ=x⁢/⁢a, so the side opposite θ is x and the hypotenuse is a. The Pythagorean theorem gives the third side, and every other trigonometric function of θ can be read from the triangle. θ itself becomes arcsin(x⁢/⁢a), arctan(x⁢/⁢a) or arccos(a⁢/⁢x) for the three substitutions.

Sides of the triangle for each substitution
SubstitutionOpposite θAdjacent to θHypotenuse
x =asinθxa2−x2a
x =atanθxaa2+x2
x =asecθx2−a2ax

Definite integrals: change the limits

For a definite integral, convert each limit to a value of θ and evaluate there. With x=2tanθ, the limit x=2 becomes θ=π⁢/4, because tan(π⁢/4)=1. Once the limits are values of θ, there is no triangle to draw and no return to x.

When the θ-integral is a secant

A tangent or secant substitution often leaves a power of secθ to integrate. The simplest case is the integral of secθ itself. For ∫d⁢x⁢/x2+4, the substitution x=2tanθ leaves exactly that, and the triangle turns the result into ln(x+x2+4)+C, with a constant −ln2 absorbed into C.

∫secθd⁢θ=ln|secθ+tanθ|+C

Complete the square first

A quadratic that is not yet a sum or difference of squares becomes one when you complete the square. x2+4⁢x+13 =(x+2)2+9, so the shift u=x+2 gives u2+9, and then u=3tanθ.

Where it breaks

Where it breaks

Try an ordinary substitution first. In ∫x9−x2 d⁢x the factor x is, up to a constant, the derivative of 9−x2, so u=9−x2 gives −(1⁢/3)⁢(9−x2)3⁢/2+C in one line. Trigonometric substitution is for the integrals where that factor is missing.

Each form has its own substitution, and the wrong one leaves the root in place. x=3sinθ in 9+x2 gives 9+9sin2θ, which no identity simplifies. The root must hold a quadratic, too. 9−x3 is not a sum or difference of squares, and no trigonometric substitution removes it.

Outside the ranges the absolute value comes back. cos2θ is ∣cosθ⁢∣, and it equals cosθ only for θ between −π⁢/2 and π⁢/2. For x2−a2 with x≤−a, θ lies between π⁢/2 and π, where tanθ is negative, and the root equals −atanθ. The examples here take x≥a.

An answer with an inverse trigonometric function carries a domain. arcsin(x⁢/3) is defined only for x from −3 to 3, the same interval on which 9−x2 is real.

Four integrals that look alike
IntegralWhat it needsResult
∫x9−x2 d⁢xu =9−x2−(1⁢/3)⁢(9−x2)3⁢/2+C
∫9−x2 d⁢xx =3sinθ(9⁢/2)arcsin(x⁢/3)+(x⁢/2)9−x2+C
∫d⁢x⁢/⁢(9+x2)x =3tanθ(1⁢/3)arctan(x⁢/3)+C
∫d⁢x⁢/x2−9, x>3x =3secθln(x+x2−9)+C

Check your answer

Check your answer

An answer here travels into θ and back, so test it where it lands, in x.

Take the derivative back in x. It should return the integrand in x, not the integrand in θ. The derivative of x2−9/⁢(9⁢x) simplifies to 1⁢/⁢(x2x2−9), the integrand of the secant example.

Compare a definite value with a number you trust. The first worked example’s answer gives 9⁢π⁢/4 from 0 to 3, the quarter circle. For the tangent example, Slopes, sums & signed area integrates the original integrand in x and gives about 0.1768, which is 2/8.

Check the triangle. Its sides must satisfy the Pythagorean theorem, and the ratio it shows must be the substitution, sinθ=x⁢/⁢a, tanθ=x⁢/⁢a or secθ=x⁢/⁢a.

In a Math box, Chalk checks the substitution and its differential. Write the integral, then x=3sinθ, then d⁢x=3cosθ d⁢θ. The differential is checked against the derivative of the substitution. A slip such as d⁢x=3sinθ d⁢θ reads ✗ “Doesn’t match dx = x′(θ) dθ.” A θ-integral with its antiderivative on one row is checked too, such as ∫14csc2θ d⁢θ =−14cotθ+C. One with cos2θ is checked as well, written directly or in its half-angle form.

Chalk also checks the step from the integral in x to the integral in θ. A θ-integral with the d⁢x factor left out, ∫3cosθ d⁢θ =3sinθ+C under ∫9−x2 d⁢x, reads ✗, because with x written out it is not the integral in row 1. Count the factors in the θ-integral: what the root becomes, times what d⁢x becomes.

Write the first row as ∫1⁢/⁢(x2x2−9) d⁢x, with d⁢x after the fraction. When every step is right, the answer in x at the bottom, x2−9/⁢(9⁢x)+C, reads ✓ against it. A wrong answer there, such as 1⁢/⁢(3⁢x)+C, reads ✗. Written with d⁢x on top of the fraction, the integral is not read yet.

Some rows of this method read “?”, which means not verified, not wrong. An answer with arccos reads ✓ “Equal for x > 2.” when it stands straight under its integral, and “?” when it comes after the substitution rows. The row ∫secθ d⁢θ by itself below the substitution rows reads “?”, but ∫secθ d⁢θ =ln∣secθ+tanθ⁢∣+C on one row reads ✓. A root in the denominator is read too: the method table’s own answer, −4−x2/⁢(4⁢x)+C, reads ✓. The row that rewrites an integral in x as one in θ with new limits reads ✓ when the limits carry over. Keeping the old limits reads ✗. The θ-integral and its value can share one row, as the tangent example’s box has them.

A sector, a triangle and the hyperbolic route

The answer to ∫9−x2 d⁢x has a picture. From 0 to x, the region under the arc of radius 3 splits along the radius into a sector and a triangle. The sector, with angle θ=arcsin(x⁢/3) at the center, has area (9⁢/2)⁢θ. The triangle, with base x and height 9−x2, has area (x⁢/2)9−x2. At x=1.5 they are about 2.356 and 1.949, which add to 4.305, the area under the arc from 0 to 1.5.

Hyperbolic functions give a second family of substitutions. The identity cosh2t−sinh2t=1 plays the part of the Pythagorean identity, so x=asinht removes a2+x2 with no secant at all. It turns ∫d⁢x⁢/x2+a2 into ∫d⁢t=t, and t=arcsinh⁢(x⁢/⁢a) =ln(x+x2+a2)−lna, the answer the secant route gives.

Some integrals lead to ∫sec3θ d⁢θ, as the arc length of a parabola does. Integration by parts with u=secθ and d⁢v=sec2θ d⁢θ brings the integral back, and solving for it gives 12⁢(secθtanθ+ln∣secθ+tanθ⁢∣) +C.

∫0x9−t2d⁢t=92arcsinx3+x29−x2
∫0x9−t2d⁢t=92arcsinx3+x29−x2

Common mistakes

  • Replacing the root and writing d⁢θ for d⁢x. With x=3sinθ, d⁢x is 3cosθ d⁢θ, and leaving out the 3cosθ turns the quarter circle’s 9⁢π⁢/4 into 3.
  • Dropping a when it is not 1. 9−x2 needs x=3sinθ, because x=sinθ leaves 9−sin2θ, which no identity simplifies.
  • Leaving the answer in θ. An indefinite integral in x ends in x, so read the trigonometric functions of θ from the triangle and write θ itself as arcsin(x⁢/⁢a), arctan(x⁢/⁢a) or arccos(a⁢/⁢x).
  • Reading the wrong ratio from the triangle. With x=3secθ the hypotenuse is x and the adjacent side is 3, so cosθ=3⁢/⁢x and sinθ=x2−9/⁢x, not 3⁢/⁢x.
  • Putting the x-limits on the θ-integral. With x=2tanθ, the limits x=0 and x=2 become θ=0 and θ=π⁢/4, and keeping 0 and 2 gives a wrong number.
  • Writing cos2θ as cosθ without a reason. It is ∣cosθ⁢∣, and it equals cosθ only because θ is kept between −π⁢/2 and π⁢/2, where the cosine is not negative.
  • Using a trigonometric substitution where u=a2−x2 would do. In ∫x9−x2 d⁢x the factor x is half the derivative of 9−x2, so the ordinary substitution finishes in one line.

Key terms

Trigonometric substitution
A method for integrals that contain a2−x2, a2+x2 or x2−a2. Set x=asinθ, x=atanθ or x=asecθ, so that a Pythagorean identity turns the expression under the root into a perfect square. Replace d⁢x too, and use a right triangle to convert the answer back to x.
Integration by substitution
A method that reverses the chain rule: when an integrand has the form f⁡(g⁡(x))⋅g′(x), set u=g⁡(x), so d⁢u=g′(x) d⁢x, and integrate f⁡(u) instead. A definite integral also converts its limits to u-values.
Pythagorean identity
The identity sin2θ+cos2θ=1, true for every angle because (cosθ,sinθ) lies on the unit circle. Dividing it by cos2θ or by sin2θ gives 1+tan2θ=sec2θ and 1+cot2θ=csc2θ.
Inverse sine
arcsinx, or sin−1x: the angle between −π⁢/2 and π⁢/2 (−90⁢° to 90⁢°) whose sine is x, for −1≤x≤1. The equation sinθ=x has other solutions too, and arcsin gives just this one.
Inverse tangent
arctanx, or tan−1x: the angle between −π⁢/2 and π⁢/2 (−90⁢° to 90⁢°) whose tangent is x. It is defined for every real x.
Antiderivative
A function whose derivative is the given function, such as x3 for 3x2. Any two antiderivatives on one interval differ by a constant, which is why answers carry +C.

Work through an example

Find ∫9−x2 d⁢x.

Integrate 9−x2 by trig substitution →

Change the limits in a tangent substitution →

Use a secant substitution and a triangle →

Sources and scope

Authored study material. Tool results depend on the stated inputs and model assumptions.

After reading

Study it, then try it

Practice the key terms as flashcards, then open the example in its tool, change a value and keep a useful result on your board.

Study the 6 key terms Check the substitution in Math Check the θ-integral in Math See the quarter circle in Graph Open worked example on a board Pythagorean identity in Math Reference

Your existing work stays on this device. Examples open as editable copies.