MATH-101 · Lesson 2 of 12 · 39 min

Trigonometric substitution and integration strategy

Lesson 1 introduced the four workhorse techniques of integration: substitution, integration by parts, trigonometric identities and partial fractions. Some common integrals still resist them, particularly those containing square roots of quadratic expressions such as \(\sqrt{a^2 - x^2}\) or \((x^2 + a^2)^{3/2}\). These appear whenever geometry involves circles, ellipses and distances: the area of a circular segment, the magnetic field of a straight wire, the electric field of a charged rod, the arc length of a parabola. This lesson adds trigonometric substitution, which turns such roots into trigonometric functions, along with completing the square, rationalizing substitutions and the integrals that lead to inverse hyperbolic functions. It ends with practical advice on integral tables, computer algebra systems and special functions, and a strategy for attacking any integral you meet.

The idea of trigonometric substitution

The Pythagorean identities \(1 - \sin^2\theta = \cos^2\theta\), \(1 + \tan^2\theta = \sec^2\theta\) and \(\sec^2\theta - 1 = \tan^2\theta\) each turn a difference or sum of squares into a single square. Substituting \(x\) as a trigonometric function of a new variable \(\theta\) can therefore remove a square root:

The three trigonometric substitutions.
Expression in the integrandSubstitutionIdentity usedResult
\(\sqrt{a^2 - x^2}\)\(x = a\sin\theta\), \(-\tfrac{\pi}{2} \le \theta \le \tfrac{\pi}{2}\)\(1 - \sin^2\theta = \cos^2\theta\)\(a\cos\theta\)
\(\sqrt{a^2 + x^2}\)\(x = a\tan\theta\), \(-\tfrac{\pi}{2} < \theta < \tfrac{\pi}{2}\)\(1 + \tan^2\theta = \sec^2\theta\)\(a\sec\theta\)
\(\sqrt{x^2 - a^2}\)\(x = a\sec\theta\), \(0 \le \theta < \tfrac{\pi}{2}\)\(\sec^2\theta - 1 = \tan^2\theta\)\(a\tan\theta\)

The restricted ranges of \(\theta\) make the substitutions one-to-one and ensure that the square roots are positive, so \(\sqrt{\cos^2\theta} = \cos\theta\) without an absolute value. After integrating in \(\theta\), convert back to \(x\) using a reference right triangle drawn from the substitution: for \(x = a\sin\theta\), the triangle has hypotenuse \(a\), opposite side \(x\), and adjacent side \(\sqrt{a^2 - x^2}\).

Roots of the form √(a² − x²)

Worked problem

Area of a circle

Show that the area of a circle of radius \(a\) is \(\pi a^2\) by integrating \(\int_{-a}^{a} 2\sqrt{a^2 - x^2}\,dx\).

Show solution
  1. Substitute \(x = a\sin\theta\), \(dx = a\cos\theta\,d\theta\); the limits \(x = \pm a\) become \(\theta = \pm\pi/2\).
  2. The integrand becomes \(2a\cos\theta \cdot a\cos\theta = 2a^2\cos^2\theta\).
  3. Using \(\cos^2\theta = \tfrac{1}{2}(1 + \cos 2\theta)\): \(\int_{-\pi/2}^{\pi/2} a^2(1 + \cos 2\theta)\,d\theta = a^2\left[\theta + \tfrac{1}{2}\sin 2\theta\right]_{-\pi/2}^{\pi/2} = \pi a^2\).

Answer: Area πa², as expected. The same calculation with \(x = a\sin\theta\) scaled by \(b/a\) gives the area of an ellipse, πab.

Worked problem

A partly filled horizontal tank

A horizontal cylindrical fuel tank has radius \(r = 1\) m and length 5 m. Find the volume of fuel when the depth is 0.5 m.

Show solution
  1. Measure \(y\) from the centre. The fuel occupies \(-1 \le y \le -0.5\), where the width of the cross-section is \(2\sqrt{1 - y^2}\).
  2. Cross-sectional area: \(A = \int_{-1}^{-0.5} 2\sqrt{1 - y^2}\,dy\). With \(y = \sin\theta\), the antiderivative is \(\theta + \tfrac{1}{2}\sin 2\theta = \arcsin y + y\sqrt{1 - y^2}\).
  3. Evaluate: \(\left[\arcsin y + y\sqrt{1 - y^2}\right]_{-1}^{-0.5} = (-0.5236 - 0.4330) - (-1.5708) = 0.6142\) m².
  4. Volume: \(0.6142 \times 5 = 3.07\) m³.

Answer: About 3.07 m³, or 19.6 percent of the full 15.7 m³, although the tank is a quarter full by depth. Gauge charts that convert dipstick depth to volume for horizontal tanks are built from exactly this integral.

Roots of the form √(a² + x²)

Integrals with \(a^2 + x^2\) arise whenever the distance from a point to a line is involved, since the distance from a point at height \(d\) above a line to a point \(x\) along it is \(\sqrt{x^2 + d^2}\). The tangent substitution handles them.

Worked problem

Magnetic field of a straight conductor

By the Biot-Savart law, a straight conductor of length \(2L\) carrying current \(I\) produces a magnetic field at distance \(d\) from its midpoint of \(B = \dfrac{\mu_0 I d}{4\pi}\displaystyle\int_{-L}^{L}\frac{dx}{(x^2 + d^2)^{3/2}}\). Evaluate the integral, and find \(B\) for \(I = 100\) A, \(d = 5\) cm and \(L = 0.5\) m.

Show solution
  1. Substitute \(x = d\tan\theta\), \(dx = d\sec^2\theta\,d\theta\), \((x^2 + d^2)^{3/2} = d^3\sec^3\theta\).
  2. The integrand becomes \(\dfrac{d\sec^2\theta}{d^3\sec^3\theta} = \dfrac{\cos\theta}{d^2}\), whose antiderivative is \(\dfrac{\sin\theta}{d^2} = \dfrac{x}{d^2\sqrt{x^2 + d^2}}\).
  3. Evaluate: \(\dfrac{2L}{d^2\sqrt{L^2 + d^2}}\), so \(B = \dfrac{\mu_0 I}{2\pi d}\cdot\dfrac{L}{\sqrt{L^2 + d^2}}\).
  4. Numbers: \(\dfrac{\mu_0 I}{2\pi d} = \dfrac{4\pi \times 10^{-7} \times 100}{2\pi \times 0.05} = 4.0 \times 10^{-4}\) T, and \(L/\sqrt{L^2 + d^2} = 0.995\).

Answer: B ≈ 3.98 × 10⁻⁴ T (0.398 mT). As L → ∞, the factor approaches 1 and the formula becomes μ₀I/(2πd), the field of an infinitely long wire used in PHYS-131. The calculation shows that a conductor ten times longer than the distance to it behaves almost exactly like an infinite one.

Integrals of \(1/\sqrt{x^2 + a^2}\) lead to logarithms. With \(x = a\tan\theta\), \(\int \frac{dx}{\sqrt{x^2 + a^2}} = \int \sec\theta\,d\theta = \ln|\sec\theta + \tan\theta| + C\), which converts back to:

\[\int \frac{dx}{\sqrt{x^2 + a^2}} = \ln\left(x + \sqrt{x^2 + a^2}\right) + C = \operatorname{arsinh}\frac{x}{a} + C\]

The inverse hyperbolic sine, \(\operatorname{arsinh}\), is the inverse of the hyperbolic sine met in Calculus I (MATH-100), and the logarithmic form shows how hyperbolic functions are built from exponentials. Similarly, \(\int \frac{dx}{\sqrt{x^2 - a^2}} = \ln\left|x + \sqrt{x^2 - a^2}\right| + C\).

Roots of the form √(x² − a²)

Worked problem

A secant substitution

Evaluate \(\displaystyle\int_2^4 \frac{\sqrt{x^2 - 4}}{x}\,dx\).

Show solution
  1. Substitute \(x = 2\sec\theta\), \(dx = 2\sec\theta\tan\theta\,d\theta\), \(\sqrt{x^2 - 4} = 2\tan\theta\). Limits: \(x = 2 \to \theta = 0\); \(x = 4 \to \sec\theta = 2\), \(\theta = \pi/3\).
  2. Integrand: \(\dfrac{2\tan\theta}{2\sec\theta}\cdot 2\sec\theta\tan\theta = 2\tan^2\theta = 2(\sec^2\theta - 1)\).
  3. Integrate: \(\left[2\tan\theta - 2\theta\right]_0^{\pi/3} = 2\sqrt{3} - \tfrac{2\pi}{3} = 3.464 - 2.094 = 1.370\).

Answer: 2√3 − 2π/3 ≈ 1.370. Changing the limits along with the variable avoids converting back to x.

Completing the square

A quadratic \(ax^2 + bx + c\) that is not a pure sum or difference of squares can be brought into one of the standard forms by completing the square. Then a simple shift \(u = x + b/(2a)\) prepares it for a table entry or a trigonometric substitution.

Worked problem

An arctangent after completing the square

Evaluate \(\displaystyle\int \frac{dx}{x^2 + 4x + 13}\).

Show solution
  1. Complete the square: \(x^2 + 4x + 13 = (x + 2)^2 + 9\).
  2. With \(u = x + 2\): \(\displaystyle\int \frac{du}{u^2 + 9} = \frac{1}{3}\arctan\frac{u}{3} + C\).

Answer: (1/3) arctan((x + 2)/3) + C. Integrals of this form appear in the inverse Laplace transforms of underdamped systems (MATH-201), where the complex roots of the quadratic correspond to oscillation.

Worked problem

An arcsine after completing the square

Evaluate \(\displaystyle\int \frac{dx}{\sqrt{5 - 4x - x^2}}\).

Show solution
  1. Complete the square: \(5 - 4x - x^2 = 9 - (x + 2)^2\).
  2. With \(u = x + 2\): \(\displaystyle\int \frac{du}{\sqrt{9 - u^2}} = \arcsin\frac{u}{3} + C\).

Answer: arcsin((x + 2)/3) + C, valid for −5 < x < 1, where the expression under the root is positive.

When the numerator contains \(x\), split the integral into a part that is a multiple of the derivative of the quadratic (handled by substitution) and a constant part (handled as above). For example, \(\dfrac{2x + 7}{x^2 + 4x + 13} = \dfrac{2x + 4}{x^2 + 4x + 13} + \dfrac{3}{x^2 + 4x + 13}\), whose integrals are \(\ln(x^2 + 4x + 13)\) and \(\arctan\frac{x + 2}{3}\). This is also how the irreducible quadratic factors of the partial fraction method in Lesson 1 are integrated.

Rationalizing substitutions

Integrands containing a root of a linear expression, such as \(\sqrt{x}\) or \(\sqrt[3]{x + 1}\), can often be turned into rational functions by substituting \(u\) for the root.

Worked problem

Removing a square root

Evaluate \(\displaystyle\int \frac{dx}{1 + \sqrt{x}}\).

Show solution
  1. Let \(u = \sqrt{x}\), so \(x = u^2\) and \(dx = 2u\,du\).
  2. \(\displaystyle\int \frac{2u}{1 + u}\,du = \int \left(2 - \frac{2}{1 + u}\right)du = 2u - 2\ln(1 + u) + C\).

Answer: 2√x − 2 ln(1 + √x) + C.

A remarkable substitution, \(t = \tan(\theta/2)\), turns any rational function of \(\sin\theta\) and \(\cos\theta\) into a rational function of \(t\), since \(\sin\theta = \frac{2t}{1 + t^2}\), \(\cos\theta = \frac{1 - t^2}{1 + t^2}\) and \(d\theta = \frac{2\,dt}{1 + t^2}\). It is rarely the quickest method by hand, but it guarantees that such integrals can always be done, and computer algebra systems use it.

Tables, computer algebra and special functions

Engineers do not integrate everything by hand. Extensive tables of integrals have been published for over a century, and computer algebra systems, built into mathematical software and available online, can find antiderivatives of a vast range of functions. Their results can, however, look very different from a hand calculation (the same antiderivative may be written with logarithms, inverse hyperbolic functions or a different constant), may assume conditions such as positive parameters without saying so, and occasionally contain errors at points where expressions are undefined. A sound habit is to verify any antiderivative, from any source, by differentiating it.

Many integrals that matter in engineering have no elementary antiderivative at all, and are defined as special functions, tabulated and built into software like the familiar trigonometric functions:

  • The error function, \(\operatorname{erf}(x) = \frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}\,dt\), gives probabilities for the normal distribution (Lesson 6) and solutions of the heat equation, such as how far a temperature change penetrates into soil or concrete.
  • Elliptic integrals give the exact period of a pendulum at large amplitude and the perimeter of an ellipse.
  • The Fresnel integrals, \(\int \sin(t^2)\,dt\) and \(\int \cos(t^2)\,dt\), describe diffraction of light and also the transition curves (clothoids) used in road and railway design to change curvature smoothly between straight and curved sections.

Worked problem

Perimeter of an ellipse

The perimeter of an ellipse with semi-axes \(a = 5\) and \(b = 3\) is \(\int_0^{2\pi}\sqrt{a^2\sin^2 t + b^2\cos^2 t}\,dt\), an elliptic integral. Estimate it with Ramanujan's approximation \(P \approx \pi\left[3(a + b) - \sqrt{(3a + b)(a + 3b)}\right]\).

Show solution
  1. \(3(a + b) = 24\); \((3a + b)(a + 3b) = 18 \times 14 = 252\), \(\sqrt{252} = 15.875\).
  2. \(P \approx \pi(24 - 15.875) = 25.53\).

Answer: About 25.53, within a few millionths of the exact value obtained by numerical integration. When no formula exists, good approximations and numerical integration (Simpson's rule, Lesson 1) fill the gap.

A strategy for integration

Combining Lesson 1 with this lesson, a practical order of attack for an unfamiliar integral is:

  • Simplify: expand, cancel, split fractions, apply identities.
  • Look for a standard form, perhaps after a constant adjustment or completing the square.
  • Look for a function and its derivative: substitution.
  • Products of different kinds of function: integration by parts.
  • Powers and products of trigonometric functions: identities.
  • Rational functions: polynomial division, then partial fractions.
  • Square roots of quadratics: complete the square, then trigonometric substitution.
  • Roots of linear expressions: rationalizing substitution.
  • If all else fails: tables or computer algebra (and verify), special functions, or numerical integration.

The skill lies less in memorizing every case than in recognizing which form an integral can be turned into. That recognition comes from practice, which is why the practice problems at the end of each lesson matter.

Common mistakes

  • MistakeForgetting to substitute for dx in a trigonometric substitution.

    InsteadWith x = a sin θ, replace dx by a cos θ dθ.

  • MistakeLeaving the answer in θ for an indefinite integral.

    InsteadConvert back to x with a reference triangle.

  • MistakeUsing √(cos²θ) = cos θ outside the restricted range.

    InsteadKeep θ in the range where the substitution is one-to-one and the root is positive.

  • MistakeCompleting the square incorrectly when the leading coefficient is negative.

    InsteadFactor out −1 first: 5 − 4x − x² = 9 − (x + 2)².

  • MistakeAccepting a computer algebra result without checking.

    InsteadDifferentiate the result and check any assumptions on parameters.

Summary and key terms

  • Trigonometric substitution removes square roots of a² − x², a² + x² and x² − a² using Pythagorean identities.
  • Use x = a sin θ, a tan θ or a sec θ respectively, with restricted θ ranges.
  • Convert back to x with a reference triangle, or change the limits of a definite integral.
  • Applications include circular areas, tank gauge charts and the field of a straight conductor.
  • Completing the square reduces general quadratics to standard forms giving arctangents, arcsines or logarithms.
  • Rationalizing substitutions remove roots of linear expressions.
  • Verify table and computer results by differentiation; use special functions or numerical integration when no elementary antiderivative exists.
Trigonometric substitution
Replacing x by a trigonometric function to simplify a square root.
Reference triangle
A right triangle used to convert trigonometric expressions back to x.
Completing the square
Rewriting a quadratic as a squared term plus a constant.
Inverse hyperbolic sine
The inverse of sinh, equal to ln(x + √(x² + 1)).
Rationalizing substitution
A substitution that turns an integrand with roots into a rational function.
Weierstrass substitution
The substitution t = tan(θ/2) for rational functions of sine and cosine.
Computer algebra system
Software that manipulates symbolic expressions, including integrals.
Special function
A named, tabulated function defined by an integral or equation, such as erf.
Error function
erf(x) = (2/√π)∫₀ˣ e^(−t²) dt.
Elliptic integral
An integral arising from arc length of an ellipse and the pendulum period.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Evaluate \(\int_0^3 \sqrt{9 - x^2}\,dx\).

    Show answer

    9π/4 (a quarter of a circle of radius 3).

  2. Evaluate \(\int \frac{dx}{(x^2 + 1)^{3/2}}\).

    Show answer

    x/√(x² + 1) + C.

  3. Evaluate \(\int \frac{dx}{x^2\sqrt{4 - x^2}}\).

    Show answer

    −√(4 − x²)/(4x) + C.

  4. Evaluate \(\int_0^1 \frac{dx}{\sqrt{x^2 + 1}}\).

    Show answer

    ln(1 + √2) ≈ 0.881.

  5. Evaluate \(\int \frac{dx}{x^2 - 6x + 10}\).

    Show answer

    arctan(x − 3) + C.

  6. Evaluate \(\int \frac{dx}{\sqrt{8 + 2x - x^2}}\).

    Show answer

    arcsin((x − 1)/3) + C.

  7. Evaluate \(\int \frac{\sqrt{x}}{1 + x}\,dx\).

    Show answer

    2√x − 2 arctan √x + C.

  8. A 1 m radius horizontal tank is filled to depth 1 m. What fraction of its volume is full?

    Show answer

    One half.

  9. Field of an infinite wire at 2 cm carrying 50 A?

    Show answer

    μ₀I/(2πd) = 5 × 10⁻⁴ T.

  10. Why should computer algebra results be checked by differentiation?

    Show answer

    They may hide assumptions, use unfamiliar forms, or contain errors at special points.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz