Tutorials › Calculus II › Integrating the Reciprocal Square Root of a^2 + x^2

Trigonometric Substitution · Tutorial 172 of 998

Integrating the Reciprocal Square Root of a^2 + x^2

Use tangent substitution to evaluate this family of integrals, then confirm the logarithmic antiderivative directly by differentiating it.

Intermediate 9 min read

What You'll Learn

  • Choose the tangent substitution for a radicand of the form a² + x².
  • Set the angle range so the square root and secant have consistent signs.
  • Derive the logarithmic antiderivative and convert it back to x.
  • Explain why the logarithm’s argument is positive for positive a.
  • Check candidate antiderivatives by differentiating them.
  • Identify the scale-factor error that can arise in the substitution.

Why This Reciprocal Radical Has a Logarithmic Antiderivative

The integral of \(1/\sqrt{a^2+x^2}\) is a useful example of how trigonometric substitution turns a radical into a trigonometric expression that can be integrated directly. The final answer is logarithmic, but the substitution and its inverse must be handled with care: the scale factor \(a\) appears in both \(x\) and \(dx\), and the chosen angle range determines the sign of the square root.

Throughout, assume \(a>0\) is a constant and \(x\in\mathbb{R}\). This assumption ensures \(a^2+x^2>0\) for every real \(x\), so the integrand is defined on the whole real line. The earlier material on tangent substitution uses \(x=a\tan\theta\) for this type of radicand. Here we carry that substitution through the reciprocal radical and return the result to \(x\).

Result: For any fixed \(a>0\), $$ \int \frac{dx}{\sqrt{a^2+x^2}} = \ln\left|x+\sqrt{a^2+x^2}\right|+C. $$ Because \(a>0\), the expression inside the absolute value is positive for every real \(x\). Thus the absolute value may be omitted in this particular formula.

Deriving the Formula by Tangent Substitution

Set \(x=a\tan\theta\), choosing \(-\pi/2<\theta<\pi/2\). On this interval, \(\cos\theta>0\), and therefore \(\sec\theta>0\). The angle range matters because it gives a definite sign when simplifying the square root.

1
Substitute for \(x\).
Let \(x=a\tan\theta\). Differentiating gives \(dx=a\sec^2\theta\,d\theta\).
2
Simplify the radical.
Since \(1+\tan^2\theta=\sec^2\theta\) and \(\sec\theta>0\), \(\sqrt{a^2+x^2}=a\sec\theta\).
3
Integrate in \(\theta\).
The factors of \(a\) and one factor of \(\sec\theta\) cancel, leaving \(\int\sec\theta\,d\theta\).
4
Return to \(x\).
Use \(\tan\theta=x/a\) and \(\sec\theta=\sqrt{a^2+x^2}/a\) in the logarithmic result.

The substitution reduces the integral as follows:

$$ \begin{aligned} \int \frac{dx}{\sqrt{a^2+x^2}} &=\int \frac{a\sec^2\theta\,d\theta}{a\sec\theta}\\ &=\int \sec\theta\,d\theta. \end{aligned} $$

To integrate \(\sec\theta\), multiply the integrand by \((\sec\theta+\tan\theta)/(\sec\theta+\tan\theta)\). On the chosen angle interval, \(\sec\theta+\tan\theta>0\), so the logarithm is well-defined; the absolute-value form also expresses the standard antiderivative.

$$ \begin{aligned} \int\sec\theta\,d\theta &=\int \frac{\sec\theta(\sec\theta+\tan\theta)} {\sec\theta+\tan\theta}\,d\theta\\ &=\int \frac{\sec^2\theta+\sec\theta\tan\theta} {\sec\theta+\tan\theta}\,d\theta\\ &=\ln|\sec\theta+\tan\theta|+C. \end{aligned} $$

The last equality follows from the chain rule: the derivative of \(\sec\theta+\tan\theta\) is \(\sec\theta\tan\theta+\sec^2\theta\), exactly the numerator in the preceding fraction. Now substitute back:

$$ \begin{aligned} \ln|\sec\theta+\tan\theta|+C &=\ln\left|\frac{\sqrt{a^2+x^2}}{a}+\frac{x}{a}\right|+C\\ &=\ln\left|\frac{x+\sqrt{a^2+x^2}}{a}\right|+C\\ &=\ln\left|x+\sqrt{a^2+x^2}\right|+C_1. \end{aligned} $$

The final step absorbs \(-\ln a\), which is constant with respect to \(x\), into the arbitrary constant of integration. This explains why equivalent answers may show a factor of \(1/a\) inside the logarithm or may omit it.

Why the Logarithm Is Defined for Every Real \(x\)

For \(a>0\), the square root is strictly greater than \(|x|\), because \[ a^2+x^2>x^2 \] and both square roots are nonnegative. Hence \[ \sqrt{a^2+x^2}>|x|\ge -x. \] Adding \(x\) to the first and last terms gives \(x+\sqrt{a^2+x^2}>0\). Thus the logarithm’s argument is positive on all of \(\mathbb{R}\). Writing an absolute value is conventional, but it is not needed to make this particular logarithm defined.

This also clarifies why the condition \(a>0\) is convenient. If a problem gives a nonzero real constant that is not known to be positive, the radicand depends on its square, and the positive scale in the substitution is \(|a|\). One may state the formula using \(\sqrt{a^2}\) or first replace the parameter by its positive magnitude. The case \(a=0\) is different: the integrand \(1/\sqrt{x^2}=1/|x|\) is undefined at \(x=0\), so it does not have an antiderivative across the whole real line.

Worked Examples

Worked Example: Integrate \(1/\sqrt{9+x^2}\)

Here \(a=3\), which is positive. Use \(x=3\tan\theta\). Then \(dx=3\sec^2\theta\,d\theta\), and, with \(-\pi/2<\theta<\pi/2\), \[ \sqrt{9+x^2} =\sqrt{9+9\tan^2\theta} =3\sqrt{1+\tan^2\theta} =3\sec\theta. \] Therefore, \[ \begin{aligned} \int\frac{dx}{\sqrt{9+x^2}} &=\int\frac{3\sec^2\theta}{3\sec\theta}\,d\theta\\ &=\int\sec\theta\,d\theta\\ &=\ln|\sec\theta+\tan\theta|+C\\ &=\ln\left|\frac{\sqrt{9+x^2}}{3}+\frac{x}{3}\right|+C\\ &=\ln|x+\sqrt{9+x^2}|+C_1. \end{aligned} \] Check by differentiating. Let \(S=\sqrt{9+x^2}\), so \(S'=x/S\). Then \[ \frac{d}{dx}\ln(x+S) =\frac{1+x/S}{x+S} =\frac{(S+x)/S}{x+S} =\frac{1}{S} =\frac{1}{\sqrt{9+x^2}}. \] The logarithm’s argument is positive, so the absolute value does not affect this calculation.

Worked Example: Integrate \(1/\sqrt{25+x^2}\) and Keep the Scale Clear

Take \(a=5\), and set \(x=5\tan\theta\). The differential and radical become \[ dx=5\sec^2\theta\,d\theta, \qquad \sqrt{25+x^2} =\sqrt{25(1+\tan^2\theta)} =5\sec\theta. \] Substituting both expressions gives \[ \begin{aligned} \int\frac{dx}{\sqrt{25+x^2}} &=\int\frac{5\sec^2\theta}{5\sec\theta}\,d\theta\\ &=\int\sec\theta\,d\theta\\ &=\ln|\sec\theta+\tan\theta|+C. \end{aligned} \] Since \(\tan\theta=x/5\) and \(\sec\theta=\sqrt{25+x^2}/5\), \[ \begin{aligned} \int\frac{dx}{\sqrt{25+x^2}} &=\ln\left|\frac{x+\sqrt{25+x^2}}{5}\right|+C\\ &=\ln|x+\sqrt{25+x^2}|+C_1. \end{aligned} \] For a derivative check, put \(S=\sqrt{25+x^2}\). Then \(S'=x/S\), and \[ \frac{d}{dx}\ln(x+S) =\frac{1+x/S}{x+S} =\frac{S+x}{S(x+S)} =\frac{1}{S} =\frac{1}{\sqrt{25+x^2}}. \] The factor \(1/5\) in the logarithm changes the expression only by the constant \(-\ln 5\). It does not change the derivative.

Worked Example: Integrate \(1/\sqrt{4+x^2}\) and Check at a Negative Input

For \(a=2\), the tangent substitution is \(x=2\tan\theta\). It gives \(dx=2\sec^2\theta\,d\theta\) and \(\sqrt{4+x^2}=2\sec\theta\) on \(-\pi/2<\theta<\pi/2\). Thus \[ \begin{aligned} \int\frac{dx}{\sqrt{4+x^2}} &=\int\frac{2\sec^2\theta}{2\sec\theta}\,d\theta\\ &=\ln|\sec\theta+\tan\theta|+C\\ &=\ln\left|\frac{\sqrt{4+x^2}+x}{2}\right|+C\\ &=\ln(x+\sqrt{4+x^2})+C_1. \end{aligned} \] The last logarithm is valid without absolute values: \(\sqrt{4+x^2}>|x|\), including when \(x<0\). For a specific check at \(x=-1\), the integrand has value \[ \frac{1}{\sqrt{4+(-1)^2}}=\frac{1}{\sqrt{5}}. \] The derivative of the proposed antiderivative is \((1+x/\sqrt{4+x^2})/(x+\sqrt{4+x^2})\). At \(x=-1\), this is \[ \frac{1-1/\sqrt{5}}{-1+\sqrt{5}} =\frac{(\sqrt{5}-1)/\sqrt{5}}{\sqrt{5}-1} =\frac{1}{\sqrt{5}}, \] which agrees with the integrand. This check also confirms that the formula behaves correctly for a negative input.

A General Derivative Check

The examples verify particular parameter values. The same check proves that the formula works for every \(a>0\) and every real \(x\). Define \(S(x)=\sqrt{a^2+x^2}\). Since \(S>0\), differentiation gives \(S'(x)=x/S(x)\). Also, as shown above, \(x+S(x)>0\), so the derivative of its logarithm is valid everywhere.

Verification: For fixed \(a>0\), let \(F(x)=\ln(x+\sqrt{a^2+x^2})\). Then $$ \begin{aligned} F'(x) &=\frac{1+\dfrac{x}{\sqrt{a^2+x^2}}} {x+\sqrt{a^2+x^2}}\\ &=\frac{\dfrac{\sqrt{a^2+x^2}+x}{\sqrt{a^2+x^2}}} {x+\sqrt{a^2+x^2}}\\ &=\frac{1}{\sqrt{a^2+x^2}}. \end{aligned} $$ Therefore \(F\) is an antiderivative of the integrand on \(\mathbb{R}\). Any two antiderivatives on this interval differ by a constant.

This derivative check is an efficient way to confirm a result obtained by substitution. The substitution explains how the logarithm arises; differentiation independently verifies that converting back to \(x\) produced the right expression.

Common Pitfall: Losing the Scale Factor

A frequent error is to set \(x=a\tan\theta\) but write \(dx=\sec^2\theta\,d\theta\). That differential is missing a factor of \(a\). Differentiating the substitution shows exactly what is required:

$$ x=a\tan\theta \quad\Longrightarrow\quad dx=a\sec^2\theta\,d\theta. $$

For example, with \(a=3\), the incorrect differential would lead to \[ \frac{\sec^2\theta\,d\theta}{3\sec\theta} =\frac{1}{3}\sec\theta\,d\theta, \] and hence to a result with an erroneous factor of \(1/3\). The correct calculation is \[ \frac{3\sec^2\theta\,d\theta}{3\sec\theta} =\sec\theta\,d\theta. \] The factor of \(a\) in \(dx\) cancels the factor of \(a\) in the radical. When checking a trigonometric substitution, write both \(dx\) and the transformed radical explicitly before simplifying.

When This Formula Is Useful

The result provides an antiderivative for a reciprocal quadratic radical that remains real and positive for every real \(x\). Its domain is especially simple compared with forms whose radicands vanish at finite endpoints. It is also a reminder that logarithms often appear after integrating a trigonometric expression: here, the secant integral becomes a logarithm, and the inverse substitution turns its argument into \(x+\sqrt{a^2+x^2}\).

A useful final check is to compare the derivative, not merely the appearance, of two proposed answers. For example, \(\ln((x+\sqrt{a^2+x^2})/a)\) and \(\ln(x+\sqrt{a^2+x^2})\) differ by the constant \(-\ln a\) when \(a>0\). They are therefore both valid antiderivatives. The constant \(C\) accounts for this difference.

Check Your Understanding

Answer these questions by using the substitution and verification steps from the derivation.

  1. For \(a>0\), what angle interval makes \(\sec\theta\) positive when \(x=a\tan\theta\)?
  2. What is \(dx\) under the substitution \(x=a\tan\theta\), and which factor cancels against the radical?
  3. Why is \(x+\sqrt{a^2+x^2}\) positive for every real \(x\)?
  4. Differentiate \(\ln(x+\sqrt{a^2+x^2})\) to verify the general antiderivative.
  5. Why do the answers with and without a factor \(1/a\) inside the logarithm differ only by a constant?

Test yourself: Calculus II final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon