Tutorials › Calculus II › Integrating Square Roots of Difference Forms

Completing the Square Techniques · Tutorial 268 of 998

Integrating Square Roots of Difference Forms

Use completed squares and domain-aware antiderivative formulas to integrate radicals of the forms square root of u squared minus a squared and square root of a squared minus u squared.

Intermediate 10 min read

What You'll Learn

  • Identify the real domains of both square-root difference forms
  • Apply antiderivative formulas for unbounded and bounded difference forms
  • Complete the square and account for linear changes of variable
  • Verify antiderivatives by differentiating, including their factors
  • Recognize why the logarithm requires an absolute value

Why Difference Forms Need Care

After completing the square, a quadratic under a square root may become a constant multiple of either \(u^2-a^2\) or \(a^2-u^2\). These two forms look similar, but their real domains and antiderivatives differ: one is defined outside a bounded interval, while the other is defined inside it.

The key is to keep track of three things at once: the completed-square substitution, the real values for which the radical exists, and the numerical factors introduced by the change of variable. In particular, the antiderivative of \(\sqrt{u^2-a^2}\) contains a factor of one-half. Differentiating the formula is a reliable way to check that factor.

Convention: Throughout, \(a>0\), and square roots denote the nonnegative real square root. Antiderivatives are considered on intervals where the integrand is real and continuous.

The Two Real Difference Forms

For the first form, the radicand is nonnegative precisely when \(u^2-a^2\ge 0\), or equivalently \(|u|\ge a\). Thus \(\sqrt{u^2-a^2}\) is real on \((-\infty,-a]\) and \([a,\infty)\). Since these are separate intervals, an antiderivative may have a different constant on each interval.

For the second form, \(a^2-u^2\ge 0\) precisely when \(|u|\le a\). The radical \(\sqrt{a^2-u^2}\) is real on \([-a,a]\), and its derivative-based antiderivative formula applies on the interior \((-a,a)\). The formula also extends continuously to the endpoints.

Definition: A difference form is a radicand expressed as the difference of two squares, in one of the forms \(u^2-a^2\) or \(a^2-u^2\), with \(a>0\). The order of the terms determines the real domain and the appropriate antiderivative.

Antiderivative Formulas

On either interval where \(|u|>a\), the antiderivative for the unbounded difference form is

$$ \int \sqrt{u^2-a^2}\,du = \frac12\left( u\sqrt{u^2-a^2} -a^2\ln\left|u+\sqrt{u^2-a^2}\right| \right)+C. $$

The absolute value is needed because \(u+\sqrt{u^2-a^2}\) is negative when \(u\le -a\). It is nonzero on the domain: for \(u\le -a\), the square root is strictly less than \(|u|\) except at the endpoint, where the sum is \(-a\), still nonzero. For \(u\ge a\), the sum is positive.

On \(-a<u<a\), the bounded difference form has antiderivative

$$ \int \sqrt{a^2-u^2}\,du = \frac12\left( u\sqrt{a^2-u^2} +a^2\arcsin\left(\frac{u}{a}\right) \right)+C. $$

Here \(\arcsin\) denotes the inverse sine with values in \([-\pi/2,\pi/2]\). Its argument \(u/a\) is in \((-1,1)\) on the open interval of validity.

Why the Formulas Work

The first formula follows from integration by parts and the reciprocal-square-root logarithmic form. Write \(R=\sqrt{u^2-a^2}\). On either open interval where \(|u|>a\), differentiation gives \(R'=u/R\). Let \(I=\int R\,du\). Integration by parts with the factors \(u\) and \(R\) gives

$$ I=uR-\int u\frac{u}{R}\,du =uR-\int\frac{u^2}{R}\,du. $$

Since \(u^2=R^2+a^2\), the last integral splits into \(\int R\,du+a^2\int du/R\). Also,

$$ \frac{d}{du}\ln|u+R| = \frac{1+u/R}{u+R} = \frac{1}{R}. $$

The last equality follows because \(R+u=u+R\), so \((1+u/R)/(u+R)=(R+u)/(R(u+R))=1/R\). Therefore \(I=uR-I-a^2\ln|u+R|\), and rearranging yields the stated one-half formula.

For the bounded form, write \(S=\sqrt{a^2-u^2}\), so \(S'=-u/S\) on \((-a,a)\). If \(J=\int S\,du\), integration by parts gives

$$ J=uS+\int\frac{u^2}{S}\,du =uS+a^2\int\frac{du}{S}-J, $$

because \(u^2=a^2-S^2\). Since

$$ \frac{d}{du}\arcsin\left(\frac{u}{a}\right) = \frac{1}{\sqrt{a^2-u^2}} = \frac{1}{S}, $$

we obtain \(2J=uS+a^2\arcsin(u/a)\), which proves the second formula.

Worked Example: A Linear Change of Variable in an Unbounded Form

Worked Example: A Linear Change of Variable in an Unbounded Form

Evaluate \(\int\sqrt{(2x-1)^2-9}\,dx\) on an interval where the radicand is nonnegative.

Set \(u=2x-1\). Then \(du=2\,dx\), so \(dx=du/2\), and let \(R=\sqrt{u^2-9}\). The real-domain condition is \(|u|\ge3\), which means \(x\le-1\) or \(x\ge2\).

Using the first formula with \(a=3\), and including the factor \(1/2\) from \(dx=du/2\), gives

$$ \begin{aligned} \int\sqrt{(2x-1)^2-9}\,dx &=\frac12\int\sqrt{u^2-9}\,du\\ &=\frac14\left( u\sqrt{u^2-9} -9\ln\left|u+\sqrt{u^2-9}\right| \right)+C\\ &=\frac14\left( (2x-1)\sqrt{(2x-1)^2-9} -9\ln\left|2x-1+\sqrt{(2x-1)^2-9}\right| \right)+C. \end{aligned} $$

To check, the bracket as a function of \(u\) has derivative \(2R\), as shown in the derivation. Since \(du/dx=2\), its derivative with respect to \(x\) is \(4R\). Multiplication by \(1/4\) gives \(R=\sqrt{(2x-1)^2-9}\), exactly the integrand.

Worked Example: A Bounded Difference Form

Worked Example: A Bounded Difference Form

Evaluate \(\int\sqrt{25-(2x-1)^2}\,dx\) on its real domain.

Set \(u=2x-1\), so \(dx=du/2\). The radicand is nonnegative when \(|u|\le5\), or \(-2\le x\le3\). Put \(S=\sqrt{25-u^2}\). The bounded-form formula gives

$$ \begin{aligned} \int\sqrt{25-(2x-1)^2}\,dx &=\frac12\int\sqrt{25-u^2}\,du\\ &=\frac14\left( u\sqrt{25-u^2} +25\arcsin\left(\frac{u}{5}\right) \right)+C\\ &=\frac14\left( (2x-1)\sqrt{25-(2x-1)^2} +25\arcsin\left(\frac{2x-1}{5}\right) \right)+C. \end{aligned} $$

For the derivative check, the expression inside parentheses has derivative \(2S\) with respect to \(u\), by the bounded-form derivation. Its derivative with respect to \(x\) is therefore \(2S\cdot2=4S\). Multiplying by \(1/4\) gives \(S=\sqrt{25-(2x-1)^2}\), as required.

Using a Completed Square

A quadratic radical often does not initially display either difference form. If its completed square is \(\alpha(x-h)^2-\beta\), with \(\alpha>0\) and \(\beta>0\), set \(u=\sqrt{\alpha}(x-h)\) and \(a=\sqrt{\beta}\). Then the radicand becomes \(u^2-a^2\), and \(dx=du/\sqrt{\alpha}\). For \(\beta-\alpha(x-h)^2\), the same substitution gives \(a^2-u^2\). The domain must still be stated in the original variable or translated carefully from \(|u|\ge a\) or \(|u|\le a\).

Worked Example: Completing the Square Before Integrating

Evaluate \(\int\sqrt{4x^2-8x-12}\,dx\) on its real domain.

Complete the square:

$$ 4x^2-8x-12 =4(x^2-2x-3) =4\bigl((x-1)^2-4\bigr). $$

The square root is \(2\sqrt{(x-1)^2-4}\). Set \(u=x-1\), so \(du=dx\), and write \(R=\sqrt{u^2-4}\). The domain condition \(|u|\ge2\) becomes \(x\le-1\) or \(x\ge3\). Thus

$$ \begin{aligned} \int\sqrt{4x^2-8x-12}\,dx &=2\int\sqrt{u^2-4}\,du\\ &=u\sqrt{u^2-4} -4\ln\left|u+\sqrt{u^2-4}\right|+C\\ &=(x-1)\sqrt{(x-1)^2-4} -4\ln\left|x-1+\sqrt{(x-1)^2-4}\right|+C. \end{aligned} $$

The bracket in the second line has derivative \(2R\) with respect to \(u\), by the first formula. Since \(du/dx=1\), the displayed antiderivative has derivative \(2R\), which is \(2\sqrt{(x-1)^2-4}=\sqrt{4x^2-8x-12}\). The derivative matches the original integrand.

A Common Factor-of-Two Mistake

A frequent error is to use the bracket from the unbounded-form formula without its factor of one-half. For example, with \(R=\sqrt{u^2-4}\), it is incorrect to claim that

$$ H(u)=uR-4\ln|u+R| $$

is an antiderivative of \(R\). In fact, the derivation shows \(H'(u)=2R\). Therefore the correct antiderivative is \(\frac12H(u)\), not \(H(u)\). A factor outside the bracket from a substitution must then be applied separately; it does not remove the need to verify the bracket’s derivative.

Takeaway: For \(\sqrt{u^2-a^2}\), the derivative of the full bracket \(u\sqrt{u^2-a^2}-a^2\ln|u+\sqrt{u^2-a^2}|\) is \(2\sqrt{u^2-a^2}\). The leading factor \(1/2\) is essential.

Choosing and Checking the Formula

Before integrating, identify the order of the squared terms. Use the logarithmic formula only for \(u^2-a^2\), where \(|u|\ge a\); use the inverse-sine formula for \(a^2-u^2\), where \(|u|\le a\). Then complete the square, transform the differential, substitute into the appropriate formula, and differentiate the result to check both the sign and the scale factor.

These checks are especially important when \(u\) is a scaled or shifted expression in \(x\). The formula is written in \(u\), but the requested antiderivative is with respect to \(x\). A correct formula in \(u\) can still produce an incorrect answer if the factor \(du/dx\) is omitted.

1
Complete the square.
Rewrite the radicand so its difference form and positive scale are visible.
2
Determine the real domain.
Translate \(|u|\ge a\) or \(|u|\le a\) into a condition on the original variable.
3
Apply the matching formula.
Include the differential factor from the substitution and keep the logarithmic absolute value.
4
Differentiate to check.
Confirm that the derivative equals the original radical, including all scale factors.

Check Your Understanding

Use the real-domain conditions and differentiate each proposed antiderivative to check its factors.

  1. For which real values of \(u\) is \(\sqrt{u^2-16}\) defined?
  2. For which real values of \(u\) is \(\sqrt{16-u^2}\) defined?
  3. Why does the antiderivative formula for \(\sqrt{u^2-a^2}\) contain a factor of one-half?
  4. Complete the square in \(9x^2-18x-27\), and state the real domain of its square root.
  5. Explain why the logarithm in the unbounded-form formula uses an absolute value.

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