MAT1051 · Week 14 · Inverse Substitution and Review

Inverse substitution: trigonometric substitution

The substitutions x = a sin θ, a tan θ, a sec θ when you see a² - x², a² + x², x² - a² inside roots, returning with a triangle, completing the square and algebraic inverse substitutions.

inverse substitutiontrigonometric substitutionreference trianglecompleting the squaresine substitutiontangent substitutionsecant substitutionrationalizing substitution

In substitution (week 12) you defined a new variable by saying u=g(x)u=g(x). In inverse substitution you do the opposite: you write xx as a function of a new variable, x=g(θ)x=g(\theta). Why? Because for roots like a2−x2\sqrt{a^2-x^2}, putting x=asin⁡θx=a\sin\theta gives a2cos⁡2θ=acos⁡θ\sqrt{a^2\cos^2\theta}=a\cos\theta and the root disappears. This is using the trigonometric identities (1−sin⁡2=cos⁡21-\sin^2=\cos^2, 1+tan⁡2=sec⁡21+\tan^2=\sec^2, sec⁡2−1=tan⁡2\sec^2-1=\tan^2) in integrals. There is usually one on the final exams. Keep in mind:

  1. The form inside the root determines the substitution. There are three types, memorize them.
  2. Convert dxdx too. If x=asin⁡θx=a\sin\theta, then dx=acos⁡θ dθdx=a\cos\theta\,d\theta.
  3. Draw a triangle to convert the result back to xx.
  4. Try a simple substitution first. If the derivative of the radicand is outside the root, trigonometry is unnecessary.

The three basic substitutions

ExpressionSubstitutionIdentity usedWhat the root becomes
a2−x2\sqrt{a^2-x^2}x=asin⁡θx=a\sin\theta1−sin⁡2θ=cos⁡2θ1-\sin^2\theta=\cos^2\thetaacos⁡θa\cos\theta
a2+x2\sqrt{a^2+x^2}x=atan⁡θx=a\tan\theta1+tan⁡2θ=sec⁡2θ1+\tan^2\theta=\sec^2\thetaasec⁡θa\sec\theta
x2−a2\sqrt{x^2-a^2}x=asec⁡θx=a\sec\thetasec⁡2θ−1=tan⁡2θ\sec^2\theta-1=\tan^2\thetaatan⁡θa\tan\theta

Because you choose θ\theta from the range of the inverse trigonometric function ([−π2,π2][-\tfrac\pi2,\tfrac\pi2] for sine), cos⁡θ≥0\cos\theta\ge0, and the square root comes out without an absolute value.

Sine substitution: a2−x2\sqrt{a^2-x^2}

Example 1. ∫9−x2 dx\displaystyle\int\sqrt{9-x^2}\,dx.

x = 3 sin θ,   dx = 3 cos θ dθ,   sqrt(9 - x^2) = 3 cos θ
∫ 3 cos θ · 3 cos θ dθ = 9 ∫ cos^2 θ dθ
                       = 9 (θ/2 + sin 2θ / 4)
                       = (9/2) θ + (9/2) sin θ cos θ

Now go back to xx. Draw the right triangle with sin⁡θ=x3\sin\theta=\tfrac x3: opposite side xx, hypotenuse 33, adjacent side 9−x2\sqrt{9-x^2}. From it cos⁡θ=9−x23\cos\theta=\tfrac{\sqrt{9-x^2}}{3} and θ=arcsin⁡x3\theta=\arcsin\tfrac x3.

∫9−x2 dx=92arcsin⁡x3+x29−x2+C\int\sqrt{9-x^2}\,dx=\frac92\arcsin\frac x3+\frac x2\sqrt{9-x^2}+C

Check: ∫039−x2 dx\int_0^3\sqrt{9-x^2}\,dx is the area of a quarter circle, 9π4\tfrac{9\pi}{4}. From the formula: 92⋅π2+0−0=9π4\tfrac92\cdot\tfrac\pi2+0-0=\tfrac{9\pi}{4}. It matches.

PITFALL · leaving sin⁡2θ\sin2\theta unconverted. If θ\theta or sin⁡2θ\sin2\theta remains in the answer, it counts as incomplete. First write sin⁡2θ=2sin⁡θcos⁡θ\sin2\theta=2\sin\theta\cos\theta, then go to xx using the triangle.

Tangent substitution: a2+x2\sqrt{a^2+x^2}

Example 2. ∫dxx2+4\displaystyle\int\frac{dx}{\sqrt{x^2+4}}.

x=2tan⁡θx=2\tan\theta, dx=2sec⁡2θ dθdx=2\sec^2\theta\,d\theta, x2+4=2sec⁡θ\sqrt{x^2+4}=2\sec\theta.

∫2sec⁡2θ2sec⁡θdθ=∫sec⁡θ dθ=ln⁡∣sec⁡θ+tan⁡θ∣+C\int\frac{2\sec^2\theta}{2\sec\theta}d\theta=\int\sec\theta\,d\theta=\ln|\sec\theta+\tan\theta|+C

Triangle: tan⁡θ=x2\tan\theta=\tfrac x2 (opposite xx, adjacent 22), hypotenuse x2+4\sqrt{x^2+4}, sec⁡θ=x2+42\sec\theta=\tfrac{\sqrt{x^2+4}}{2}.

ln⁡∣x2+4+x2∣+C=ln⁡(x+x2+4)+C′\ln\left|\frac{\sqrt{x^2+4}+x}{2}\right|+C=\ln\left(x+\sqrt{x^2+4}\right)+C'

−ln⁡2-\ln2 is absorbed into the constant. In week 7 you saw that the derivative of ln⁡(x+x2+1)\ln(x+\sqrt{x^2+1}) is 1x2+1\tfrac{1}{\sqrt{x^2+1}}; this is its general form.

Secant substitution: x2−a2\sqrt{x^2-a^2}

Example 3. ∫dxx2x2−1\displaystyle\int\frac{dx}{x^2\sqrt{x^2-1}}, x>1x>1.

x=sec⁡θx=\sec\theta, dx=sec⁡θtan⁡θ dθdx=\sec\theta\tan\theta\,d\theta, x2−1=tan⁡θ\sqrt{x^2-1}=\tan\theta.

∫sec⁡θtan⁡θsec⁡2θtan⁡θdθ=∫cos⁡θ dθ=sin⁡θ+C\int\frac{\sec\theta\tan\theta}{\sec^2\theta\tan\theta}d\theta=\int\cos\theta\,d\theta=\sin\theta+C

Triangle: sec⁡θ=x1\sec\theta=\tfrac x1, so the hypotenuse is xx, adjacent 11, opposite x2−1\sqrt{x^2-1}. sin⁡θ=x2−1x\sin\theta=\dfrac{\sqrt{x^2-1}}{x}.

∫dxx2x2−1=x2−1x+C\int\frac{dx}{x^2\sqrt{x^2-1}}=\frac{\sqrt{x^2-1}}{x}+C

Inverse substitution in a definite integral

In a definite integral you don’t have to go back to xx: if you convert the limits to θ\theta, you finish without drawing a triangle. For x=asin⁡θx=a\sin\theta, θ=arcsin⁡xa\theta=\arcsin\tfrac xa; for x=atan⁡θx=a\tan\theta, θ=arctan⁡xa\theta=\arctan\tfrac xa. Convert each limit with this formula.

Example 3b. ∫03dx(1+x2)2\displaystyle\int_0^{\sqrt3}\frac{dx}{(1+x^2)^2}.

x = tan θ,  dx = sec^2 θ dθ,  (1 + x^2)^2 = sec^4 θ
x = 0   -> θ = 0          x = √3 -> θ = arctan √3 = π/3
∫_0^(π/3) sec^2 θ / sec^4 θ dθ = ∫_0^(π/3) cos^2 θ dθ
  = [θ/2 + sin 2θ / 4]_0^(π/3) = π/6 + (√3/2)/4 = π/6 + √3/8 ≈ 0.740

There is no root here but there is a power of 1+x21+x^2; the tangent substitution works again. The rule is not limited to roots: think of the substitution whenever the expression a2±x2a^2\pm x^2 or x2−a2x^2-a^2, or its power, makes the integrand hard.

Why does it work, and why do we go back?

In inverse substitution you are really changing the variable with the function θ=arcsin⁡xa\theta=\arcsin\tfrac xa. Since this function is one-to-one on the chosen interval, the substitution can be undone and the integral does not change. Knowing the range of θ\theta ([−π2,π2][-\tfrac\pi2,\tfrac\pi2], and [0,π2)[0,\tfrac\pi2) for secant) determines the sign of the cos⁡θ\cos\theta or tan⁡θ\tan\theta that comes out of the root. That is why Example 3 and Questions 6 and 7 have a condition like "x>1x>1": so that the value of secant is positive and tan⁡θ≥0\tan\theta\ge0.

Completing the square

If you see ax2+bx+c\sqrt{ax^2+bx+c} or 1ax2+bx+c\dfrac{1}{ax^2+bx+c}, first complete the square, then reduce it to one of the three types above.

Example 4. ∫dxx2+2x+5\displaystyle\int\frac{dx}{\sqrt{x^2+2x+5}}.

x2+2x+5=(x+1)2+4x^2+2x+5=(x+1)^2+4. With u=x+1u=x+1 it reached the form of Example 2:

∫duu2+4=ln⁡(u+u2+4)+C=ln⁡(x+1+x2+2x+5)+C\int\frac{du}{\sqrt{u^2+4}}=\ln\left(u+\sqrt{u^2+4}\right)+C=\ln\left(x+1+\sqrt{x^2+2x+5}\right)+C

If the leading coefficient is negative (5+4x−x25+4x-x^2), first take the minus out: −(x2−4x)+5=−(x−2)2+4+5=9−(x−2)2-(x^2-4x)+5=-(x-2)^2+4+5=9-(x-2)^2. This is the sine type.

Algebraic inverse substitution

In Adams, “inverse substitution” is not only trigonometric. Writing xx as a power to get rid of a root is the same idea.

Example 5. ∫x1+x dx\displaystyle\int\frac{\sqrt x}{1+x}\,dx. x=u2x=u^2, dx=2u dudx=2u\,du:

∫u⋅2u1+u2du=2∫u21+u2du=2∫(1−11+u2)du=2u−2arctan⁡u+C\int\frac{u\cdot2u}{1+u^2}du=2\int\frac{u^2}{1+u^2}du=2\int\left(1-\frac{1}{1+u^2}\right)du=2u-2\arctan u+C

u=xu=\sqrt x: 2x−2arctan⁡x+C2\sqrt x-2\arctan\sqrt x+C. In the integrand that became rational, the numerator’s degree equals the denominator’s, so we divided first (week 13).

Which method? A decision table

is there a root in the integrand?
 ├─ the derivative of the radicand (up to a constant) is outside the root  -> u = radicand (simple)
 ├─ a^2 - x^2                                        -> x = a sin θ
 ├─ a^2 + x^2                                        -> x = a tan θ
 ├─ x^2 - a^2                                        -> x = a sec θ
 ├─ ax^2 + bx + c                                    -> complete the square, then the three above
 └─ √x, ∛x                                           -> x = u^2, u^3

PITFALL · an unnecessary trigonometric substitution. For ∫x dxx2+9\displaystyle\int\frac{x\,dx}{\sqrt{x^2+9}}, x=3tan⁡θx=3\tan\theta works but takes four lines. With u=x2+9u=x^2+9 it is x2+9+C\sqrt{x^2+9}+C in one line. What saves time on an exam is seeing the simple way first.

Common mistakes

Wrong thinkingCorrect
Saying x=asin⁡θx=a\sin\theta and writing dx=dθdx=d\thetadx=acos⁡θ dθdx=a\cos\theta\,d\theta
x=asin⁡θx=a\sin\theta for a2+x2\sqrt{a^2+x^2}With a plus sign, use tangent
Leaving θ\theta in the answerGo back to xx with the triangle
Writing sin⁡2θ\sin2\theta directly as sin⁡2xa\sin\frac{2x}{a}2sin⁡θcos⁡θ2\sin\theta\cos\theta, then the triangle
Not converting the θ\theta limits in a definite integralIf x=1x=1 and x=tan⁡θx=\tan\theta, then θ=π4\theta=\tfrac\pi4
Balancing the constant wrongly when completing the squarex2+4x+13=(x+2)2−4+13=(x+2)2+9x^2+4x+13=(x+2)^2-4+13=(x+2)^2+9
Not distributing the minus with a negative leading coefficient5+4x−x2=9−(x−2)25+4x-x^2=9-(x-2)^2
Trig substitution for every integral with a rootIf the derivative of the radicand is outside, use a simple uu

Test yourself

Exam-style questions. Solve them on paper first, then reveal the answer.

Question 1easy

Find ∫dx9−x2\displaystyle\int\frac{dx}{\sqrt{9-x^2}}.

Show answer
arcsin⁡x3+C\arcsin\dfrac x3+C

x=3sin⁡θx=3\sin\theta, dx=3cos⁡θ dθdx=3\cos\theta\,d\theta, 9−x2=3cos⁡θ\sqrt{9-x^2}=3\cos\theta. The integral is ∫3cos⁡θ3cos⁡θdθ=θ+C\int\dfrac{3\cos\theta}{3\cos\theta}d\theta=\theta+C. θ=arcsin⁡x3\theta=\arcsin\tfrac x3. (As a formula: ∫dxa2−x2=arcsin⁡xa+C\int\frac{dx}{\sqrt{a^2-x^2}}=\arcsin\frac xa+C.)

Question 2medium

Find ∫4−x2 dx\displaystyle\int\sqrt{4-x^2}\,dx.

Show answer
x24−x2+2arcsin⁡x2+C\dfrac x2\sqrt{4-x^2}+2\arcsin\dfrac x2+C

x=2sin⁡θx=2\sin\theta, dx=2cos⁡θ dθdx=2\cos\theta\,d\theta, 4−x2=2cos⁡θ\sqrt{4-x^2}=2\cos\theta. ∫4cos⁡2θ dθ=4(θ2+sin⁡2θ4)=2θ+2sin⁡θcos⁡θ\int4\cos^2\theta\,d\theta=4\left(\tfrac\theta2+\tfrac{\sin2\theta}{4}\right)=2\theta+2\sin\theta\cos\theta. Triangle: sin⁡θ=x2\sin\theta=\tfrac x2, cos⁡θ=4−x22\cos\theta=\tfrac{\sqrt{4-x^2}}{2}. The result is 2arcsin⁡x2+x24−x2+C2\arcsin\tfrac x2+\tfrac x2\sqrt{4-x^2}+C.

Question 3medium

Evaluate ∫01dx(1+x2)3/2\displaystyle\int_0^1\frac{dx}{(1+x^2)^{3/2}}.

Show answer
12=22\dfrac{1}{\sqrt2}=\dfrac{\sqrt2}{2}

x=tan⁡θx=\tan\theta, dx=sec⁡2θ dθdx=\sec^2\theta\,d\theta, 1+x2=sec⁡2θ1+x^2=\sec^2\theta, (1+x2)3/2=sec⁡3θ(1+x^2)^{3/2}=\sec^3\theta. The integral is ∫cos⁡θ dθ=sin⁡θ\int\cos\theta\,d\theta=\sin\theta. Limits: x=0→θ=0x=0\to\theta=0, x=1→θ=π4x=1\to\theta=\tfrac\pi4. sin⁡π4−0=22\sin\tfrac\pi4-0=\tfrac{\sqrt2}{2}.

Question 4hard

Find ∫dxx2x2+4\displaystyle\int\frac{dx}{x^2\sqrt{x^2+4}}.

Show answer
−x2+44x+C-\dfrac{\sqrt{x^2+4}}{4x}+C

x=2tan⁡θx=2\tan\theta, dx=2sec⁡2θ dθdx=2\sec^2\theta\,d\theta, x2+4=2sec⁡θ\sqrt{x^2+4}=2\sec\theta. ∫2sec⁡2θ4tan⁡2θ⋅2sec⁡θdθ=14∫sec⁡θtan⁡2θdθ=14∫cos⁡θsin⁡2θdθ=−14sin⁡θ+C\int\dfrac{2\sec^2\theta}{4\tan^2\theta\cdot2\sec\theta}d\theta=\tfrac14\int\dfrac{\sec\theta}{\tan^2\theta}d\theta=\tfrac14\int\dfrac{\cos\theta}{\sin^2\theta}d\theta=-\dfrac{1}{4\sin\theta}+C. Triangle: opposite xx, adjacent 22, hypotenuse x2+4\sqrt{x^2+4}; sin⁡θ=xx2+4\sin\theta=\dfrac{x}{\sqrt{x^2+4}}.

Question 5medium

Find ∫x21−x2 dx\displaystyle\int\frac{x^2}{\sqrt{1-x^2}}\,dx.

Show answer
12(arcsin⁡x−x1−x2)+C\dfrac12\left(\arcsin x-x\sqrt{1-x^2}\right)+C

x=sin⁡θx=\sin\theta, dx=cos⁡θ dθdx=\cos\theta\,d\theta: ∫sin⁡2θcos⁡θcos⁡θdθ=∫sin⁡2θ dθ=θ2−sin⁡2θ4=θ2−sin⁡θcos⁡θ2\int\dfrac{\sin^2\theta\cos\theta}{\cos\theta}d\theta=\int\sin^2\theta\,d\theta=\tfrac\theta2-\tfrac{\sin2\theta}{4}=\tfrac\theta2-\tfrac{\sin\theta\cos\theta}{2}. Go back: 12arcsin⁡x−12x1−x2+C\tfrac12\arcsin x-\tfrac12x\sqrt{1-x^2}+C.

Question 6medium

Find ∫dxx2−9\displaystyle\int\frac{dx}{\sqrt{x^2-9}} for x>3x>3.

Show answer
ln⁡∣x+x2−9∣+C\ln\left|x+\sqrt{x^2-9}\right|+C

x=3sec⁡θx=3\sec\theta, dx=3sec⁡θtan⁡θ dθdx=3\sec\theta\tan\theta\,d\theta, x2−9=3tan⁡θ\sqrt{x^2-9}=3\tan\theta. ∫sec⁡θ dθ=ln⁡∣sec⁡θ+tan⁡θ∣\int\sec\theta\,d\theta=\ln|\sec\theta+\tan\theta|. Go back: ln⁡∣x3+x2−93∣=ln⁡∣x+x2−9∣−ln⁡3\ln\left|\tfrac x3+\tfrac{\sqrt{x^2-9}}{3}\right|=\ln|x+\sqrt{x^2-9}|-\ln3; −ln⁡3-\ln3 is absorbed into the constant.

Question 7hard

Find ∫x2−1x dx\displaystyle\int\frac{\sqrt{x^2-1}}{x}\,dx for x>1x>1.

Show answer
x2−1−arcsec⁡x+C\sqrt{x^2-1}-\operatorname{arcsec}x+C

x=sec⁡θx=\sec\theta, dx=sec⁡θtan⁡θ dθdx=\sec\theta\tan\theta\,d\theta, x2−1=tan⁡θ\sqrt{x^2-1}=\tan\theta. ∫tan⁡θsec⁡θsec⁡θtan⁡θ dθ=∫tan⁡2θ dθ=∫(sec⁡2θ−1)dθ=tan⁡θ−θ\int\dfrac{\tan\theta}{\sec\theta}\sec\theta\tan\theta\,d\theta=\int\tan^2\theta\,d\theta=\int(\sec^2\theta-1)d\theta=\tan\theta-\theta. Go back: x2−1−arcsec⁡x+C\sqrt{x^2-1}-\operatorname{arcsec}x+C.

Question 8easy

Find ∫dxx2+4x+13\displaystyle\int\frac{dx}{x^2+4x+13}.

Show answer
13arctan⁡x+23+C\dfrac13\arctan\dfrac{x+2}{3}+C

Complete the square: x2+4x+13=(x+2)2+9x^2+4x+13=(x+2)^2+9. u=x+2u=x+2: ∫duu2+9=13arctan⁡u3+C\int\dfrac{du}{u^2+9}=\tfrac13\arctan\tfrac u3+C.

Question 9medium

Find ∫dx5+4x−x2\displaystyle\int\frac{dx}{\sqrt{5+4x-x^2}}.

Show answer
arcsin⁡x−23+C\arcsin\dfrac{x-2}{3}+C

5+4x−x2=−(x2−4x)+5=−((x−2)2−4)+5=9−(x−2)25+4x-x^2=-(x^2-4x)+5=-\big((x-2)^2-4\big)+5=9-(x-2)^2. u=x−2u=x-2: ∫du9−u2=arcsin⁡u3+C\int\dfrac{du}{\sqrt{9-u^2}}=\arcsin\tfrac u3+C.

Question 10medium

Evaluate ∫04xx2+9 dx\displaystyle\int_0^4\frac{x}{\sqrt{x^2+9}}\,dx. Which method is fastest?

Show answer
2 (simple u-substitution)

The root contains x2+9x^2+9 and outside there is xx, which is half the derivative of the radicand. Trigonometric substitution is unnecessary: u=x2+9u=x^2+9, du=2x dxdu=2x\,dx. 12∫925u−1/2du=[u]925=5−3=2\tfrac12\int_9^{25}u^{-1/2}du=\big[\sqrt u\big]_9^{25}=5-3=2.

Question 11hard

Use a trigonometric substitution to find the area enclosed by the ellipse x225+y29=1\dfrac{x^2}{25}+\dfrac{y^2}{9}=1.

Show answer
15π

The upper half is y=31−x225=3525−x2y=3\sqrt{1-\tfrac{x^2}{25}}=\tfrac35\sqrt{25-x^2}. By symmetry the area is 4∫053525−x2 dx4\int_0^5\tfrac35\sqrt{25-x^2}\,dx. x=5sin⁡θx=5\sin\theta: ∫0525−x2dx=∫0π/225cos⁡2θ dθ=25π4\int_0^5\sqrt{25-x^2}dx=\int_0^{\pi/2}25\cos^2\theta\,d\theta=\tfrac{25\pi}{4}. The area is 4⋅35⋅25π4=15π4\cdot\tfrac35\cdot\tfrac{25\pi}{4}=15\pi. The general result is πab\pi ab.

Question 12hard

Use the substitution x=u2x=u^2 to find ∫dx1+x\displaystyle\int\frac{dx}{1+\sqrt x}.

Show answer
2x−2ln⁡(1+x)+C2\sqrt x-2\ln(1+\sqrt x)+C

x=u2x=u^2 (u=x≥0u=\sqrt x\ge0), dx=2u dudx=2u\,du. ∫2u1+udu=2∫(1−11+u)du=2u−2ln⁡(1+u)+C=2x−2ln⁡(1+x)+C\int\dfrac{2u}{1+u}du=2\int\left(1-\dfrac{1}{1+u}\right)du=2u-2\ln(1+u)+C=2\sqrt x-2\ln(1+\sqrt x)+C.

Verification: All answers were checked with node (verify/MAT1051/14.mjs): the numerical derivative of the indefinite integral answers was compared with the integrand at three points; definite integrals and the area of the ellipse with Simpson's rule.

Review card

sqrt(a^2 - x^2) -> x = a sin θ, dx = a cos θ dθ, root = a cos θ sqrt(a^2 + x^2) -> x = a tan θ, dx = a sec^2 θ dθ, root = a sec θ sqrt(x^2 - a^2) -> x = a sec θ, dx = a sec θ tan θ dθ, root = a tan θ Going back: draw a TRIANGLE (sin θ = x/a: opposite x, hypotenuse a) ∫ cos^2 = θ/2 + sin2θ/4 ∫ sin^2 = θ/2 - sin2θ/4 sin2θ = 2 sinθ cosθ ∫ sec θ = ln|sec θ + tan θ| ∫ tan^2 = tan θ - θ ∫ dx/√(a^2 - x^2) = arcsin(x/a) ∫ dx/(a^2 + x^2) = (1/a) arctan(x/a) ax^2 + bx + c -> COMPLETE THE SQUARE, then one of the three types above Try simple u-sub first: if the derivative of the radicand is outside the root, trig is unnecessary If √x, ∛x is present: use x = u^2 (u^3) to get rid of the root