∫Yoboa Math
Home / Guides / Trigonometric Substitution

Trigonometric Substitution

Trig substitution handles square roots of quadratics. The substitution turns the root into a single trig function using a Pythagorean identity.

Which substitution?

ExpressionSubstituteIdentity used
\(\sqrt{a^2-x^2}\)\(x = a\sin\theta\)\(1-\sin^2\theta=\cos^2\theta\)
\(\sqrt{a^2+x^2}\)\(x = a\tan\theta\)\(1+\tan^2\theta=\sec^2\theta\)
\(\sqrt{x^2-a^2}\)\(x = a\sec\theta\)\(\sec^2\theta-1=\tan^2\theta\)

The method

  1. Substitute for \(x\) and \(dx\). For example, \(x = a\sin\theta\) gives \(dx = a\cos\theta\,d\theta\).
  2. Simplify the root with the identity.
  3. Solve the trig integral in \(\theta\).
  4. Draw a right triangle from the substitution to convert back to \(x\).

Check first: if the derivative of the quadratic is sitting outside the root, as in \(x\sqrt{1+x^2}\), a plain u-substitution is faster.

Example: \(\sqrt{1 - x^{2}}\)

This is the area under a semicircle. Use \(x=\sin\theta\).

\[\int \sqrt{1 - x^{2}}\,dx = \frac{x \sqrt{1 - x^{2}} + \arcsin{\left(x \right)}}{2} + C\]
1Trigonometric substitutiontechnique▶

The integrand contains \(\sqrt{1 - x^{2}}\). Let \(x = \sin{\left(\theta \right)}\), so \(dx = \cos{\left(\theta \right)}\,d\theta\) and, using \(1-\sin^2\theta = \cos^2\theta\), \(\sqrt{1 - x^{2}} = \cos{\left(\theta \right)}\).

\[\int \sqrt{1 - x^{2}}\,dx = \int \cos^{2}{\left(\theta \right)}\,d\theta\]
1Trig identitytechnique▶

Rewrite using trigonometric identities:

\[\cos^{2}{\left(\theta \right)} = \frac{\cos{\left(2 \theta \right)}}{2} + \frac{1}{2}\]
1Split into separate integrals▶

The integral of a sum is the sum of the integrals. Integrate each term:

\[\int \frac{\cos{\left(2 \theta \right)}}{2} + \frac{1}{2}\,d\theta = \int \frac{\cos{\left(2 \theta \right)}}{2}\,d\theta + \int \frac{1}{2}\,d\theta\]
1Pull out the constant▶

Constants factor out of an integral: move \(\frac{1}{2}\) outside.

\[\int \frac{\cos{\left(2 \theta \right)}}{2}\,d\theta = \frac{1}{2}\int \cos{\left(2 \theta \right)}\,d\theta\]
1Substitution (u-sub)technique▶

Let \(u = 2 \theta\). Then \(du = 2\,d\theta\). Rewriting the integral in terms of \(u\):

\[\int \cos{\left(2 \theta \right)}\,d\theta = \int \frac{\cos{\left(u \right)}}{2}\,du\]
1Pull out the constant▶

Constants factor out of an integral: move \(\frac{1}{2}\) outside.

\[\int \frac{\cos{\left(u \right)}}{2}\,du = \frac{1}{2}\int \cos{\left(u \right)}\,du\]
1Integral of cosine▶

The antiderivative of cosine is sine.

\[\int \cos{\left(u \right)}\,du = \sin{\left(u \right)}\]
2Multiply back by the constant▶
\[\frac{1}{2}\cdot\left(\sin{\left(u \right)}\right) = \frac{\sin{\left(u \right)}}{2}\]
2Substitute back▶

Replace \(u\) with \(2 \theta\):

\[\frac{\sin{\left(u \right)}}{2}\;\to\;\frac{\sin{\left(2 \theta \right)}}{2}\]
2Multiply back by the constant▶
\[\frac{1}{2}\cdot\left(\frac{\sin{\left(2 \theta \right)}}{2}\right) = \frac{\sin{\left(2 \theta \right)}}{4}\]
2Integrate a constant▶

The integral of a constant is the constant times \(\theta\).

\[\int \frac{1}{2}\,d\theta = \frac{\theta}{2}\]
3Add the results▶
\[\int \frac{\cos{\left(2 \theta \right)}}{2} + \frac{1}{2}\,d\theta = \frac{\theta}{2} + \frac{\sin{\left(2 \theta \right)}}{4}\]
2Return to x▶

From \(\sin\theta = x\), draw a right triangle (or use inverse trig) to rewrite in terms of x:

\[\frac{\theta}{2} + \frac{\sin{\left(2 \theta \right)}}{4}\;\to\;\frac{x \sqrt{1 - x^{2}} + \arcsin{\left(x \right)}}{2}\]
Open this in the calculator →

Example: \(\frac{\sqrt{4 - x^{2}}}{x^{2}}\)

\[\int \frac{\sqrt{4 - x^{2}}}{x^{2}}\,dx = - \arcsin{\left(\frac{x}{2} \right)} - \frac{\sqrt{4 - x^{2}}}{x} + C\]
1Trigonometric substitutiontechnique▶

The integrand contains \(\sqrt{4 - x^{2}}\). Let \(x = 2 \sin{\left(\theta \right)}\), so \(dx = 2 \cos{\left(\theta \right)}\,d\theta\) and, using \(1-\sin^2\theta = \cos^2\theta\), \(\sqrt{4 - x^{2}} = 2 \cos{\left(\theta \right)}\).

\[\int \frac{\sqrt{4 - x^{2}}}{x^{2}}\,dx = \int \cot^{2}{\left(\theta \right)}\,d\theta\]
1Trig identitytechnique▶

Rewrite using trigonometric identities:

\[\cot^{2}{\left(\theta \right)} = \csc^{2}{\left(\theta \right)} - 1\]
1Split into separate integrals▶

The integral of a sum is the sum of the integrals. Integrate each term:

\[\int \csc^{2}{\left(\theta \right)} - 1\,d\theta = \int \csc^{2}{\left(\theta \right)}\,d\theta + \int -1\,d\theta\]
1Integral of csc²▶

Since \(\frac{d}{dx}\cot x = -\csc^2 x\).

\[\int \csc^{2}{\left(\theta \right)}\,d\theta = - \cot{\left(\theta \right)}\]
2Integrate a constant▶

The integral of a constant is the constant times \(\theta\).

\[\int -1\,d\theta = - \theta\]
3Add the results▶
\[\int \csc^{2}{\left(\theta \right)} - 1\,d\theta = - \theta - \cot{\left(\theta \right)}\]
2Return to x▶

From \(\sin\theta = \frac{x}{2}\), draw a right triangle (or use inverse trig) to rewrite in terms of x:

\[- \theta - \cot{\left(\theta \right)}\;\to\;- \arcsin{\left(\frac{x}{2} \right)} - \frac{\sqrt{4 - x^{2}}}{x}\]
Open this in the calculator →

Example: \(\frac{1}{x^{2} \sqrt{x^{2} + 4}}\)

\(\sqrt{{x^2+4}}\) calls for \(x = 2\tan\theta\).

\[\int \frac{1}{x^{2} \sqrt{x^{2} + 4}}\,dx = - \frac{\sqrt{x^{2} + 4}}{4 x} + C\]
1Trigonometric substitutiontechnique▶

The integrand contains \(\sqrt{x^{2} + 4}\). Let \(x = 2 \tan{\left(\theta \right)}\), so \(dx = 2 \sec^{2}{\left(\theta \right)}\,d\theta\) and, using \(1+\tan^2\theta = \sec^2\theta\), \(\sqrt{x^{2} + 4} = 2 \sec{\left(\theta \right)}\).

\[\int \frac{1}{x^{2} \sqrt{x^{2} + 4}}\,dx = \int \frac{\cot^{2}{\left(\theta \right)} \sec{\left(\theta \right)}}{4}\,d\theta\]
1Trig identitytechnique▶

Rewrite using trigonometric identities:

\[\frac{\cot^{2}{\left(\theta \right)} \sec{\left(\theta \right)}}{4} = \frac{\cos{\left(\theta \right)}}{4 \sin^{2}{\left(\theta \right)}}\]
1Pull out the constant▶

Constants factor out of an integral: move \(\frac{1}{4}\) outside.

\[\int \frac{\cos{\left(\theta \right)}}{4 \sin^{2}{\left(\theta \right)}}\,d\theta = \frac{1}{4}\int \frac{\cos{\left(\theta \right)}}{\sin^{2}{\left(\theta \right)}}\,d\theta\]
1Substitution (u-sub)technique▶

Let \(u = \sin{\left(\theta \right)}\). Then \(du = \cos{\left(\theta \right)}\,d\theta\). Rewriting the integral in terms of \(u\):

\[\int \frac{\cos{\left(\theta \right)}}{\sin^{2}{\left(\theta \right)}}\,d\theta = \int \frac{1}{u^{2}}\,du\]
1Power rule▶

Use \(\int x^{n}\,dx = \frac{x^{n+1}}{n+1}\) with \(n = -2\).

\[\int \frac{1}{u^{2}}\,du = - \frac{1}{u}\]
2Substitute back▶

Replace \(u\) with \(\sin{\left(\theta \right)}\):

\[- \frac{1}{u}\;\to\;- \frac{1}{\sin{\left(\theta \right)}}\]
2Multiply back by the constant▶
\[\frac{1}{4}\cdot\left(- \frac{1}{\sin{\left(\theta \right)}}\right) = - \frac{1}{4 \sin{\left(\theta \right)}}\]
2Return to x▶

From \(\tan\theta = \frac{x}{2}\), draw a right triangle (or use inverse trig) to rewrite in terms of x:

\[- \frac{1}{4 \sin{\left(\theta \right)}}\;\to\;- \frac{\sqrt{x^{2} + 4}}{4 x}\]
Open this in the calculator →

Example: \(\frac{1}{\sqrt{x^{2} - 4}}\)

\(\sqrt{{x^2-4}}\) calls for \(x = 2\sec\theta\).

\[\int \frac{1}{\sqrt{x^{2} - 4}}\,dx = \ln{\left(x + \sqrt{x^{2} - 4} \right)} + C\]
1Trigonometric substitutiontechnique▶

The integrand contains \(\sqrt{x^{2} - 4}\). Let \(x = 2 \sec{\left(\theta \right)}\), so \(dx = 2 \tan{\left(\theta \right)} \sec{\left(\theta \right)}\,d\theta\) and, using \(\sec^2\theta - 1 = \tan^2\theta\), \(\sqrt{x^{2} - 4} = 2 \tan{\left(\theta \right)}\).

\[\int \frac{1}{\sqrt{x^{2} - 4}}\,dx = \int \sec{\left(\theta \right)}\,d\theta\]
1Multiply by a clever form of 1technique▶

The standard trick: multiply top and bottom by \(\sec \theta + \tan \theta\). The numerator becomes the derivative of the denominator:

\[\sec{\left(\theta \right)} = \frac{\tan{\left(\theta \right)} \sec{\left(\theta \right)} + \sec^{2}{\left(\theta \right)}}{\tan{\left(\theta \right)} + \sec{\left(\theta \right)}}\]
1Substitution (u-sub)technique▶

Let \(u = \tan{\left(\theta \right)} + \sec{\left(\theta \right)}\). Then \(du = \left(\tan^{2}{\left(\theta \right)} + \tan{\left(\theta \right)} \sec{\left(\theta \right)} + 1\right)\,d\theta\). Rewriting the integral in terms of \(u\):

\[\int \frac{\tan{\left(\theta \right)} \sec{\left(\theta \right)} + \sec^{2}{\left(\theta \right)}}{\tan{\left(\theta \right)} + \sec{\left(\theta \right)}}\,d\theta = \int \frac{1}{u}\,du\]
1Reciprocal rule▶

The integral of \(\frac{1}{u}\) is \(\ln\left|u\right|\).

\[\int \frac{1}{u}\,du = \ln\left|u\right|\]
2Substitute back▶

Replace \(u\) with \(\tan{\left(\theta \right)} + \sec{\left(\theta \right)}\):

\[\ln{\left(\left|{u}\right| \right)}\;\to\;\ln{\left(\left|{\tan{\left(\theta \right)} + \sec{\left(\theta \right)}}\right| \right)}\]
2Return to x▶

From \(\sec\theta = \frac{x}{2}\), draw a right triangle (or use inverse trig) to rewrite in terms of x:

\[\ln{\left(\tan{\left(\theta \right)} + \sec{\left(\theta \right)} \right)}\;\to\;\ln{\left(\frac{x}{2} + \frac{\sqrt{x^{2} - 4}}{2} \right)}\]
Open this in the calculator →

Try your own

Paste any integral into the integral calculator to get the full step-by-step solution and a graph.

More techniques