Physics Library
 An open source physics library
Encyclopedia | Forums | Docs | Random  

Trigonometric Substitution for Integration

(Topic)

Trigonometric Substitution for Integration

Some algebraic integrands look difficult because a square root contains a sum or difference of squares. Trigonometric substitution is a change of variable chosen to eliminate that square root by using a Pythagorean identity. The method is especially useful for expressions based on

a2 − x2,    a2 + x2,     x2 − a2,    a >  0.
(1)

The central idea is to replace an algebraic variable x by an angle 𝜃 so that the radical becomes a familiar trigonometric function. After integrating, one returns to the original variable. The sign of the square root and the domain of the substitution must be handled carefully.

1 Why trigonometric substitution works

The Pythagorean identities are

1 − sin 2𝜃 = cos 2𝜃, (2)
1 + tan 2𝜃 = sec 2𝜃, (3)
sec 2𝜃 − 1 = tan 2𝜃. (4)

If the integrand contains √ --------
  a2 − x2, try x = a sin 𝜃. Its radicand then becomes a2 cos 2𝜃. If it contains √ --------
  a2 + x2, try x = a tan 𝜃. Its radicand becomes a2 sec 2𝜃. The third pattern, √ --------
  x2 − a2, is suited to x = a sec 𝜃.

This method is an ordinary substitution: both the algebraic expression and its differential dx must be replaced. The result is then a trigonometric integral that can be evaluated using standard identities.

PIC

Figure 1. Match a difference or sum of squares to the Pythagorean identity that makes its square root simpler. The choice of angle interval fixes the sign of the resulting trigonometric function.

2 The three substitution families

For the most common real branches, use the following choices.

Family A: difference of squares

x = a sin 𝜃, (5)
dx = a cos 𝜃 d𝜃, (6)
√a2--−-x2- = a cos 𝜃. (7)

Here one may use −π∕2 ≤ 𝜃 ≤ π∕2, so cos 𝜃 ≥ 0. The original radical is real for |x|≤ a. The endpoints should be treated as limits whenever the integrand itself is singular there.

Family B: sum of squares

x = a tan 𝜃, (8)
dx = a sec 2𝜃 d𝜃, (9)
√ --------
  a2 + x2 = a sec 𝜃. (10)

Choosing −π∕2 < 𝜃 < π∕2 ensures sec 𝜃 > 0. Every real x is covered.

Family C: difference of squares with x first

x = a sec 𝜃, (11)
dx = a sec 𝜃 tan 𝜃 d𝜃, (12)
√ --------
  x2 − a2 = a tan 𝜃, (13)

on the positive branch x > a using 0 < 𝜃 < π∕2. The original square root is real also when x < −a, but that branch requires a different angle interval and careful absolute values. Antiderivatives may be written separately on disconnected domain intervals.

3 Why the signs and absolute values matter

A square root is defined to be nonnegative. The precise identity is

√ -2----2-
  a  cos 𝜃 = a|cos 𝜃|,
(14)

not a cos 𝜃 for every angle. Likewise,

√ --------
  a2 sec2𝜃 = a|sec𝜃 |.
(15)

If we deliberately restrict 𝜃 to (−π∕2,π∕2), then sec 𝜃 > 0 and the absolute value can be dropped. The restriction is doing mathematical work; it is not a typographical convenience.

A particularly important expression is a three-halves power. For a > 0,

(a2 + x2)3∕2 = (a2 sec 2𝜃)3∕2 (16)
= (√ --------)
   a2 sec2 𝜃3 (17)
= (a| sec 𝜃|)3 (18)
= a3| sec 𝜃|3. (19)

On the chosen interval, this reduces to

(a2 + x2)3∕2 = a3sec3𝜃.
(20)

For example, (z2 sec 2𝜃)3∕2 = |z|3| sec 𝜃|3. It is only equal to z3 sec 3𝜃 without absolute values when the signs are known, such as z > 0 and sec 𝜃 > 0.

PIC

Figure 2. Raising a squared trigonometric factor to the 3∕2 power first takes a nonnegative square root and then cubes it. A suitable angle interval permits the absolute value to be removed.

4 Using a reference triangle to return to x

After integrating in 𝜃, one must convert the answer back to x. A reference right triangle makes that step transparent.

Triangle for x = a sin 𝜃

From sin 𝜃 = x∕a, the opposite side has length x, the hypotenuse length a, and the adjacent side length √ --------
  a2 − x2 (for the illustrated case 0 ≤ x < a). Thus

sin 𝜃 = x
--
a, (21)
cos 𝜃 = √ --------
--a2 −-x2
    a, (22)
𝜃 = arcsin(x∕a). (23)

For negative x, use the same algebraic identities and the chosen signed angle interval rather than treating a triangle side as a negative length.

PIC

Figure 3. Right-triangle back substitution for x = asin𝜃. The drawing shows the positive-x case; the inverse-sine expression covers the full allowed interval.

Triangle for x = a tan 𝜃

From tan 𝜃 = x∕a,

sin 𝜃 =     x
√---------
  a2 + x2, (24)
cos 𝜃 = ----a-----
√ a2 + x2, (25)
sec 𝜃 = √ -2----2-
--a--+-x-
    a, (26)
𝜃 = arctan(x∕a). (27)

PIC

Figure 4. Right-triangle back substitution for x = atan𝜃, drawn for x > 0. The hypotenuse is found with the Pythagorean theorem.

Triangle for x = a sec 𝜃

On the branch x > a, sec 𝜃 = x∕a and therefore cos 𝜃 = a∕x. The hypotenuse is x, one leg is a, and the remaining leg is √ --------
  x2 − a2:

tan 𝜃 = √ --------
--x2-−-a2
    a, (28)
sec 𝜃 = x-
a, (29)
𝜃 = arccos(a∕x). (30)

Some texts write 𝜃 = arcsec(x∕a), but arccos(a∕x) avoids ambiguity between conventions for the inverse secant function.

PIC

Figure 5. Right-triangle back substitution for x = asec𝜃, shown on the branch x > a. The radical is the side opposite 𝜃.

5 A reliable substitution procedure

A useful working sequence is:

  1. Rewrite the quadratic in a recognizable form, completing the square if necessary.
  2. Choose one of x = a sin 𝜃, x = a tan 𝜃, or x = a sec 𝜃; if the radical involves bx, first set u = bx.
  3. State the substitution interval, particularly when a square root or inverse secant is involved.
  4. Compute dx by differentiation.
  5. Replace every appearance of x and dx before simplifying.
  6. Simplify the radical using the appropriate trigonometric identity, retaining absolute values unless the interval removes them.
  7. Integrate in 𝜃 using trigonometric identities, substitution, or integration by parts.
  8. Back-substitute with an inverse trigonometric function or a reference triangle.
  9. Differentiate the result to check the original integrand.

6 Example 1: a difference of squares

Evaluate

    ∫
       ----dx-----
I =    (9 − x2)3∕2,    − 3 < x < 3.
(31)

Set x = 3 sin 𝜃. Then dx = 3 cos 𝜃 d𝜃 and

(9 − x2)3∕2 = (9 − 9 sin 2𝜃)3∕2 (32)
= (9 cos 2𝜃)3∕2 (33)
= 27 cos 3𝜃, (34)

because cos 𝜃 ≥ 0 on the chosen interval. Therefore

I = ∫  3cos 𝜃
-----3---
27cos  𝜃d𝜃 (35)
= 1-
9 ∫ sec 2𝜃 d𝜃 (36)
= 1
--
9 tan 𝜃 + C. (37)

The reference triangle gives tan 𝜃 = x∕√ -------
  9 − x2. Thus

I =  -√--x----+  C.
     9  9 − x2
(38)

Differentiate to verify:

 d
---
dx[    x     ]
  -√--------
  9  9 − x2 = 1
--
9[                            ]
 (9 − x2 )− 1∕2 + x2(9 − x2)−3∕2 (39)
= -----9------
9(9 − x2)3∕2 (40)
= (9 − x2)−3∕2. (41)

7 Example 2: a sum of squares and a 3∕2 power

Evaluate

     ∫
            dx
I =     (x2-+-4)3∕2.
(42)

Set x = 2 tan 𝜃. Then

dx =  2sec2𝜃 d𝜃
(43)

and

(x2 + 4)3∕2 = (4 tan 2𝜃 + 4)3∕2 (44)
= (4 sec 2𝜃)3∕2 (45)
= 8 sec 3𝜃. (46)

The last equality is valid because sec 𝜃 > 0 on (−π∕2,π∕2). Substitute into the entire integral:

I = ∫ 2 sec2 𝜃
----3--
8 sec  𝜃d𝜃 (47)
= 1-
4 ∫ cos 𝜃 d𝜃 (48)
= 1
--
4 sin 𝜃 + C. (49)

From the tangent triangle,

sin 𝜃 = √--x----,
          x2 + 4
(50)

so

I =  -√--x----+  C.
     4  x2 + 4
(51)

This illustrates why both dx and the radical’s entire 3∕2 power must be transformed. Simply replacing the square root while leaving dx unchanged does not produce a valid substitution.

8 Example 3: a secant substitution

Evaluate

       √ -------
    ∫    x2 − 9
I =    --------dx,     x >  3.
          x
(52)

Set x = 3 sec 𝜃 with 0 < 𝜃 < π∕2. Then

dx = 3 sec 𝜃 tan 𝜃 d𝜃, (53)
√ -------
  x2 − 9 = 3 tan 𝜃. (54)

Therefore

I = ∫ 3tan-𝜃-
3sec𝜃(3 sec𝜃tan 𝜃) d𝜃 (55)
= 3 ∫ tan 2𝜃 d𝜃 (56)
= 3 ∫ (sec 2𝜃 − 1) d𝜃 (57)
= 3 tan 𝜃 − 3𝜃 + C. (58)

From the triangle,

          √-------
3 tan𝜃 =   x2 − 9,     𝜃 = arccos(3∕x).
(59)

Hence

    √ -------
I =   x2 − 9 − 3arccos(3∕x ) + C,  x >  3.
(60)

The formula must be revisited if one wants an antiderivative on the separate branch x < −3; the angle and radical signs cannot simply be copied from the positive branch.

9 Example 4: a radical in the numerator

Evaluate

    ∫
      √ -------2
I =     16 − x  dx,     − 4 < x < 4.
(61)

Set x = 4 sin 𝜃. Then

√ --------
  16 − x2 =  4cos𝜃,     dx = 4 cos𝜃 d𝜃,
(62)

so

I = 16 ∫ cos 2𝜃 d𝜃 (63)
= 16 ∫ 1 + cos2𝜃
----------
    2 d𝜃 (64)
= 8𝜃 + 4 sin 2𝜃 + C (65)
= 8𝜃 + 8 sin 𝜃 cos 𝜃 + C. (66)

Use sin 𝜃 = x∕4 and cos 𝜃 = √ --------
  16 − x2∕4 to obtain

I = x-√16--−-x2 + 8arcsin(x∕4) + C.
    2
(67)

This same integral also measures the area under a circular arc and is not merely an algebraic curiosity.

10 Example 5: a definite integral and transformed limits

Evaluate

    ∫ 2    x2
I =     √-------dx.
     0    4 − x2
(68)

Set x = 2 sin 𝜃 and choose 0 ≤ 𝜃 ≤ π∕2. The bounds become

x =  0 =⇒   𝜃 = 0,     x = 2  =⇒   𝜃 = π∕2.
(69)

Because dx = 2 cos 𝜃 d𝜃 and √ -------
  4 − x2 = 2 cos 𝜃 inside the interval,

I = ∫ 0π∕2     2
4-sin--𝜃
 2cos 𝜃(2 cos 𝜃) d𝜃 (70)
= 4 ∫ 0π∕2 sin 2𝜃 d𝜃 (71)
= 2 ∫ 0π∕2(1 − cos 2𝜃) d𝜃 (72)
= 2[     1      ]
  𝜃 − -sin 2𝜃
      20π∕2 (73)
= π. (74)

The endpoint x = 2 is an integrable singularity of the original integrand. The substitution makes the corresponding angle integral finite. For definite integrals, one may transform the limits and finish in 𝜃 without back-substituting an antiderivative.

PIC

Figure 6. The substitution x = 2sin𝜃 maps the interval [0,2] to [0,π∕2]. A singular algebraic endpoint can become a regular trigonometric endpoint.

11 A physics connection: a finite line of charge

Trigonometric substitutions are useful in Electromagnetism, gravity, and field integrals. Consider a straight line of uniform charge density λ extending from z = −L to z = L. A field point lies a perpendicular distance b > 0 from the center. Symmetry cancels the component parallel to the line. The perpendicular electric-field component is

           ∫
      -λ---  L ----bdz----
Eb =  4π𝜀      (b2 + z2)3∕2.
         0  −L
(75)

Set z = b tan 𝜃. Then

dz = b sec 2𝜃 d𝜃, (76)
(b2 + z2)3∕2 = b3 sec 3𝜃, (77)

using b > 0 and −π∕2 < 𝜃 < π∕2. Thus the geometric integral becomes

∫ ----bdz----
(b2 + z2)3∕2 = 1-
b∫ cos 𝜃 d𝜃 (78)
=      z
-√--2----2
b  b  + z + C. (79)

Evaluate at the two endpoints to obtain

      -λ------2L-----
Eb =  4π𝜀0 b√b2--+-L2-.
(80)

For L →∞, this tends to the familiar infinite-line result

       --λ---
Eb −→  2π 𝜀0b.
(81)

This is a useful physical check on both the algebra and the final dimensions.

PIC

Figure 7. In the field of a finite uniformly charged line, the distance √ -------
  b2 + z2 generates the same sum-of-squares structure handled by the tangent substitution.

12 Recognizing a hidden quadratic

The square may not be obvious. For example,

√ -------------  ∘ ------------
  x2 + 6x + 13 =   (x + 3)2 + 4.
(82)

First put u = x + 3. Then du = dx and the expression becomes √ -2-----
  u + 4. A tangent substitution u = 2 tan 𝜃 is now natural.

By contrast, ∫ x√ -------
  9 − x2 dx is easier with the direct substitution u = 9 − x2 than with a trigonometric substitution. Choose the simplest valid method rather than applying trig substitution automatically.

13 Useful trigonometric antiderivatives

After substituting, several elementary results appear often:

∫ sec 2𝜃 d𝜃 = tan 𝜃 + C, (83)
∫ cos 𝜃 d𝜃 = sin 𝜃 + C, (84)
∫ sin 2𝜃 d𝜃 = 𝜃
--
2 −sin 2𝜃
------
  4 + C, (85)
∫ cos 2𝜃 d𝜃 = 𝜃-
2 + sin-2𝜃-
  4 + C, (86)
∫ sec 𝜃 d𝜃 = ln | sec 𝜃 + tan 𝜃| + C. (87)

The less immediate result

∫            1              1
  sec3𝜃 d𝜃 = --sec𝜃 tan 𝜃 + -ln |sec 𝜃 + tan𝜃| + C
             2              2
(88)

can be derived by integration by parts; it occurs in integrals such as ∫ √--2----2
 x  + a dx. It will be worked in greater detail in the separate problem-solutions companion.

14 Common mistakes

  1. Replacing x but forgetting the corresponding differential dx.
  2. Treating √ ---2--
  cos 𝜃 as cos 𝜃 without declaring the angle interval.
  3. Replacing (a2 sec 2𝜃)3∕2 with a2 sec 3𝜃 instead of a3| sec 𝜃|3.
  4. Using x = a sec 𝜃 on both real branches of √ --------
  x2 − a2 without tracking signs.
  5. Forgetting to transform the limits of a definite integral.
  6. Returning an answer in 𝜃 when the original problem asks for an antiderivative in x.
  7. Treating a diagram’s side lengths as signed coordinates without explaining the convention.
  8. Using a complicated trigonometric substitution when ordinary u-substitution immediately works.
  9. Applying the same integration constant across disconnected real domains without justification.
  10. Failing to differentiate the final answer as a check.

15 Practice problems for the forthcoming companion

The theory article is intentionally distinct from the dedicated worked-problem entry INT01E1: Trigonometric Substitution, Worked Problems and Solutions. The following problems provide a progression for that companion.

  1. Determine which substitution is most natural for each of √ ------2-
  25 − x, √ --2-----
  x  + 36, and √ --------
  x2 − 16.
  2. Evaluate ∫ dx∕(25 − x2)3∕2 and check by differentiation.
  3. Evaluate ∫ dx∕(x2 + 16)3∕2, showing every step in the 3∕2 power conversion.
  4. Evaluate ∫ x2∕√ -------2
  16 − x dx.
  5. Evaluate ∫ √ --------
  x2 − 16∕xdx for x > 4.
  6. Evaluate ∫ √ -------
  x2 + 9 dx, deriving the integral of sec 3𝜃 when needed.
  7. Evaluate ∫ 03x2∕√9--−-x2- dx with transformed limits.
  8. Complete the square and evaluate ∫ dx∕√ --2---------
  x  + 4x + 8.
  9. Derive a finite-line gravitational-field or electrostatic-field component using a tangent substitution.
  10. Explain what changes on the negative-x branch of an integral containing   --------
√ x2 − a2.

16 Summary

The essential substitutions are

√ --------
  a2 − x2 : x = a sin 𝜃, (89)
√ --------
  a2 + x2 : x = a tan 𝜃, (90)
√x2--−-a2- : x = a sec 𝜃. (91)

Their purpose is to transform an algebraic radical into a trigonometric expression using a Pythagorean identity. Proper angle intervals make the signs unambiguous. Every occurrence of the variable and differential must be replaced, and indefinite-integral results must be returned to the original variable. The procedure is most effective when the underlying quadratic is recognized before the calculation begins.

References

References

[1]   G. Strang and E. Herman, Calculus, OpenStax, Vol. 2, Sec. 3.3, “Trigonometric Substitution.”

[2]   Mathematics LibreTexts, Calculus (OpenStax), Sec. 7.3, “Trigonometric Substitution.”

[3]   J. Stewart, Calculus: Early Transcendentals, section on trigonometric substitution.


"Trigonometric Substitution for Integration" is owned by bloftin.
(view preamble)
View style:
Also defines:  trigonometric substitution, inverse substitution, reference triangle, domain restriction, back substitution, trigonometric identity, completing the square
Keywords:  trigonometric substitution, integration, sine substitution, tangent substitution, secant substitution, radicals, inverse trigonometric functions, integration techniques

Cross-references: diagram's, dimensions, charge density, Electromagnetism, regular, formula, theorem, power, work, identities, domain, function, Pythagorean identity, square, algebraic
There are 7 references to this object.

This is version 1 of Trigonometric Substitution for Integration, born on 2026-11-22.
Object id is 1593, canonical name is TrigonometricSubstitutionForIntegration.
Accessed 12 times total.

Classification:
Physics Classification: 02.30.-f (Function theory, analysis)

Pending Errata and Addenda

None.

Discussion

No messages.

Interact