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
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
, try x = a sin 𝜃. Its radicand then becomes a2 cos 2𝜃. If it
contains
, try x = a tan 𝜃. Its radicand becomes a2 sec 2𝜃. The third pattern,
, 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.
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)
|
 | = 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)
|
 | = 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)
|
 | = 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
not a cos 𝜃 for every angle. Likewise,
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)
|
| = 3 | (17)
|
| = a| sec 𝜃| 3 | (18)
|
| = a3| sec 𝜃|3. | (19) |
On the chosen interval, this reduces to
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.
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
(for the illustrated case 0 ≤ x < a). Thus
| sin 𝜃 | = , | (21)
|
| cos 𝜃 | = , | (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.
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 𝜃 | = , | (24)
|
| cos 𝜃 | = , | (25)
|
| sec 𝜃 | = , | (26)
|
| 𝜃 | = arctan(x∕a). | (27) |
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
:
| tan 𝜃 | = , | (28)
|
| sec 𝜃 | = , | (29)
|
| 𝜃 | = arccos(a∕x). | (30) |
Some texts write 𝜃 = arcsec(x∕a), but arccos(a∕x) avoids ambiguity between conventions for the
inverse secant function.
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:
- Rewrite the quadratic in a recognizable form, completing the square if necessary.
- Choose one of x = a sin 𝜃, x = a tan 𝜃, or x = a sec 𝜃; if the radical involves bx, first set
u = bx.
- State the substitution interval, particularly when a square root or inverse secant is
involved.
- Compute dx by differentiation.
- Replace every appearance of x and dx before simplifying.
- Simplify the radical using the appropriate trigonometric identity, retaining absolute
values unless the interval removes them.
- Integrate in 𝜃 using trigonometric identities, substitution, or integration by parts.
- Back-substitute with an inverse trigonometric function or a reference triangle.
- Differentiate the result to check the original integrand.
6 Example 1: a difference of squares
Evaluate
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 | = ∫
d𝜃 | (35)
|
| = ∫
sec 2𝜃 d𝜃 | (36)
|
| = tan 𝜃 + C. | (37) |
The reference triangle gives tan 𝜃 = x∕
. Thus
Differentiate to verify:
 ![[ x ]
-√--------
9 9 − x2](https://images.physicslibrary.org/cache/objects/1593/make4ht/TrigonometricSubstitutionForIntegration31x.png) | =  ![[ ]
(9 − x2 )− 1∕2 + x2(9 − x2)−3∕2](https://images.physicslibrary.org/cache/objects/1593/make4ht/TrigonometricSubstitutionForIntegration33x.png) | (39)
|
| =  | (40)
|
| = (9 − x2)−3∕2. | (41) |
7 Example 2: a sum of squares and a 3∕2 power
Evaluate
Set x = 2 tan 𝜃. Then
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 | = ∫
d𝜃 | (47)
|
| = ∫
cos 𝜃 d𝜃 | (48)
|
| = sin 𝜃 + C. | (49) |
From the tangent triangle,
so
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
Set x = 3 sec 𝜃 with 0 < 𝜃 < π∕2. Then
| dx | = 3 sec 𝜃 tan 𝜃 d𝜃, | (53)
|
 | = 3 tan 𝜃. | (54) |
Therefore
| I | = ∫
 d𝜃 | (55)
|
| = 3 ∫
tan 2𝜃 d𝜃 | (56)
|
| = 3 ∫
(sec 2𝜃 − 1) d𝜃 | (57)
|
| = 3 tan 𝜃 − 3𝜃 + C. | (58) |
From the triangle,
Hence
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
Set x = 4 sin 𝜃. Then
so
| I | = 16 ∫
cos 2𝜃 d𝜃 | (63)
|
| = 16 ∫
d𝜃 | (64)
|
| = 8𝜃 + 4 sin 2𝜃 + C | (65)
|
| = 8𝜃 + 8 sin 𝜃 cos 𝜃 + C. | (66) |
Use sin 𝜃 = x∕4 and cos 𝜃 =
∕4 to obtain
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
Set x = 2 sin 𝜃 and choose 0 ≤ 𝜃 ≤ π∕2. The bounds become
Because dx = 2 cos 𝜃 d𝜃 and
= 2 cos 𝜃 inside the interval,
| I | = ∫
0π∕2 (2 cos 𝜃) d𝜃 | (70)
|
| = 4 ∫
0π∕2 sin 2𝜃 d𝜃 | (71)
|
| = 2 ∫
0π∕2(1 − cos 2𝜃) d𝜃 | (72)
|
| = 2 0π∕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.
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
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
∫
 | = ∫
cos 𝜃 d𝜃 | (78)
|
| = + C. | (79) |
Evaluate at the two endpoints to obtain
For L →∞, this tends to the familiar infinite-line result
This is a useful physical check on both the algebra and the final dimensions.
Figure 7. In the field of a finite uniformly charged line, the distance
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,
First put u = x + 3. Then du = dx and the expression becomes
. A tangent substitution
u = 2 tan 𝜃 is now natural.
By contrast, ∫
x
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𝜃 | = − + C, | (85)
|
| ∫
cos 2𝜃 d𝜃 | = + + C, | (86)
|
| ∫
sec 𝜃 d𝜃 | = ln | sec 𝜃 + tan 𝜃| + C. | (87) |
The less immediate result
can be derived by integration by parts; it occurs in integrals such as ∫
dx. It will be
worked in greater detail in the separate problem-solutions companion.
14 Common mistakes
- Replacing x but forgetting the corresponding differential dx.
- Treating
as cos 𝜃 without declaring the angle interval.
- Replacing (a2 sec 2𝜃)3∕2 with a2 sec 3𝜃 instead of a3| sec 𝜃|3.
- Using x = a sec 𝜃 on both real branches of
without tracking signs.
- Forgetting to transform the limits of a definite integral.
- Returning an answer in 𝜃 when the original problem asks for an antiderivative in x.
- Treating a diagram’s side lengths as signed coordinates without explaining the
convention.
- Using a complicated trigonometric substitution when ordinary u-substitution
immediately works.
- Applying the same integration constant across disconnected real domains without
justification.
- 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.
- Determine which substitution is most natural for each of
,
, and
.
- Evaluate ∫
dx∕(25 − x2)3∕2 and check by differentiation.
- Evaluate ∫
dx∕(x2 + 16)3∕2, showing every step in the 3∕2 power conversion.
- Evaluate ∫
x2∕
dx.
- Evaluate ∫
∕xdx for x > 4.
- Evaluate ∫
dx, deriving the integral of sec 3𝜃 when needed.
- Evaluate ∫
03x2∕
dx with transformed limits.
- Complete the square and evaluate ∫
dx∕
.
- Derive a finite-line gravitational-field or electrostatic-field component using a tangent
substitution.
- Explain what changes on the negative-x branch of an integral containing
.
16 Summary
The essential substitutions are
: | x = a sin 𝜃, | (89)
|
: | x = a tan 𝜃, | (90)
|
: | 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.