Tutorials › Calculus II › Common Errors With Completed-Square Integrals

Completing the Square Techniques · Tutorial 273 of 998

Common Errors With Completed-Square Integrals

Use domain and derivative checks to catch common errors in antiderivatives built from completed squares.

Intermediate 9 min read

What You'll Learn

  • Track scale factors when factoring a quadratic denominator
  • Check signs in antiderivatives for difference-of-squares forms
  • Know when logarithmic antiderivatives need absolute values
  • State the real domains of square-root integrands
  • Include the arbitrary constant in every indefinite integral
  • Verify candidate antiderivatives by differentiation

Why small errors change the answer

A completed square makes many quadratic integrals easier to recognize, but recognizing a familiar form is only part of the work. A factor pulled out of a denominator can change the coefficient of the answer. A sign error can produce a function whose derivative is the negative of the integrand. A logarithm can fail on part of the real domain if its absolute value is omitted, and a square root may not be real for every value of \(x\).

The reliable habit is to check an answer against the original integral. For an indefinite integral, differentiate the proposed antiderivative and compare it with the integrand on its domain. Also state the intervals on which the integrand is real and defined. This tutorial focuses on these checks for quadratic denominators and radicands.

Definition: An antiderivative of \(f\) on an interval \(I\) is a function \(F\) such that \(F'(x)=f(x)\) for every \(x\in I\). On an interval, all antiderivatives of the same function differ by an additive constant.

Keep track of every scale factor

Suppose \(a>0\). The standard completed-square forms include

$$ \int \frac{du}{u^2+a^2} = \frac{1}{a}\arctan\left(\frac{u}{a}\right)+C, \qquad \int \frac{du}{\sqrt{u^2+a^2}} = \ln\left|u+\sqrt{u^2+a^2}\right|+C. $$

Here \(u=x-h\) when the square is \((x-h)^2\), and \(du=dx\). If a constant factor is also present, it must remain in the calculation. For example, a denominator of \(A((x-h)^2+a^2)\) contributes a factor \(1/A\) to the integral. It does not disappear just because the expression inside the parentheses matches a standard form.

Worked Example: Retaining the denominator scale

Evaluate \(\int \frac{dx}{4(x-2)^2+36}\). First factor the coefficient \(4\) from the denominator:

$$ 4(x-2)^2+36 = 4\big((x-2)^2+9\big). $$

Thus the integrand is \(\frac14\frac{1}{(x-2)^2+3^2}\). With \(u=x-2\), \(du=dx\), and the positive-sign quadratic formula,

$$ \int \frac{dx}{4(x-2)^2+36} = \frac14\cdot\frac13 \arctan\left(\frac{x-2}{3}\right)+C = \frac{1}{12}\arctan\left(\frac{x-2}{3}\right)+C. $$

Check by differentiating. The derivative is

$$ \frac{1}{12}\cdot \frac{1/3}{1+\big((x-2)/3\big)^2} = \frac{1}{36}\cdot\frac{9}{(x-2)^2+9} = \frac{1}{4\big((x-2)^2+9\big)} = \frac{1}{4(x-2)^2+36}. $$

This matches the original integrand. If the outside factor \(1/4\) were dropped, differentiation would give four times the required result.

Check the sign for a difference form

A positive-sign quadratic, \(u^2+a^2\), has no real zeros. A difference form, \(u^2-a^2\), has real zeros at \(u=a\) and \(u=-a\). Its logarithmic antiderivative is

$$ \int \frac{du}{u^2-a^2} = \frac{1}{2a}\ln\left|\frac{u-a}{u+a}\right|+C, \qquad a>0,\quad u\ne \pm a. $$

The order of the numerator and denominator inside the logarithm matters: reversing the ratio changes the sign of its logarithmic derivative. The formula applies on any interval that does not contain either zero of the denominator.

Worked Example: Catching a reversed logarithmic ratio

Evaluate \(\int \frac{dx}{(x+1)^2-4}\). Set \(u=x+1\), so the denominator is \(u^2-2^2\), and \(du=dx\). Substituting \(a=2\) into the difference-form formula gives

$$ \int \frac{dx}{(x+1)^2-4} = \frac14\ln\left|\frac{x+1-2}{x+1+2}\right|+C = \frac14\ln\left|\frac{x-1}{x+3}\right|+C. $$

The denominator is zero at \(x=1\) and \(x=-3\), so this antiderivative is considered on intervals that avoid both points. To check its sign, differentiate on any such interval:

$$ \begin{aligned} \frac{d}{dx}\left[ \frac14\ln\left|\frac{x-1}{x+3}\right| \right] &= \frac14\left(\frac{1}{x-1}-\frac{1}{x+3}\right)\\ &= \frac14\cdot\frac{4}{(x-1)(x+3)}\\ &= \frac{1}{(x+1)^2-4}. \end{aligned} $$

If the ratio is reversed, differentiation instead gives \(-1/((x+1)^2-4)\). The derivative check detects this sign error immediately.

Why the logarithmic sign and scale are as stated

The difference-form formula can be justified directly by differentiation. For \(u\ne\pm a\), apply the derivative rule for \(\ln|g(u)|\), namely \(\frac{d}{du}\ln|g(u)|=g'(u)/g(u)\) wherever \(g(u)\ne0\). Then

$$ \begin{aligned} \frac{d}{du}\left[ \frac{1}{2a}\ln\left|\frac{u-a}{u+a}\right| \right] &= \frac{1}{2a}\left(\frac{1}{u-a}-\frac{1}{u+a}\right)\\ &= \frac{1}{2a}\cdot\frac{(u+a)-(u-a)}{(u-a)(u+a)}\\ &= \frac{1}{2a}\cdot\frac{2a}{u^2-a^2}\\ &= \frac{1}{u^2-a^2}. \end{aligned} $$

This calculation explains both the positive coefficient \(1/(2a)\) and the order of the ratio. It also shows why the formula cannot be evaluated at \(u=\pm a\): the original integrand is undefined there, and the logarithm’s argument is zero or undefined.

Use absolute values where the logarithm needs them

For a nonzero real number \(g(x)\), the real logarithm \(\ln(g(x))\) is defined only when \(g(x)>0\). By contrast, \(\ln|g(x)|\) is defined wherever \(g(x)\ne0\). In logarithmic antiderivatives, absolute values often allow one expression to apply on more than one interval of the integrand’s domain. They do not make a singularity part of the domain: if \(g(x)=0\), the logarithm is still undefined.

Worked Example: Keeping the absolute value on both branches

Evaluate \(\int \frac{dx}{\sqrt{(x-2)^2-9}}\). For a real, nonzero denominator, the radicand must be positive:

$$ (x-2)^2-9>0 \quad\Longleftrightarrow\quad |x-2|>3 \quad\Longleftrightarrow\quad x<-1\ \text{or}\ x>5. $$

On either of these intervals, use the difference-form radical antiderivative with \(u=x-2\) and \(a=3\):

$$ \int \frac{dx}{\sqrt{(x-2)^2-9}} = \ln\left|x-2+\sqrt{(x-2)^2-9}\right|+C. $$

To verify it, write \(u=x-2\) and \(s=\sqrt{u^2-9}\). On the stated domain, \(s>0\), \(ds/du=u/s\), and \(u+s\ne0\). Therefore

$$ \frac{d}{du}\ln|u+s| = \frac{1+u/s}{u+s} = \frac{(s+u)/s}{u+s} = \frac{1}{s} = \frac{1}{\sqrt{u^2-9}}. $$

On the branch \(u<-3\), the quantity \(u+\sqrt{u^2-9}\) is negative, so writing \(\ln(u+\sqrt{u^2-9})\) would not give a real logarithm there. The absolute value is essential for this formula to cover both branches. Differentiation verifies the result on each interval separately.

Check the real domain before integrating a radical

A square root of a real expression is real only when its radicand is nonnegative. If the root appears in a denominator, the radicand must be strictly positive, because division by zero is undefined. The domain should be found before selecting an antiderivative; otherwise a formula may be applied where the original integrand has no real value.

For example, \(\sqrt{a^2-(x-h)^2}\) is real when \(|x-h|\le a\), but the reciprocal \(1/\sqrt{a^2-(x-h)^2}\) is defined only when \(|x-h|<a\). The corresponding standard antiderivative is

$$ \int\frac{dx}{\sqrt{a^2-(x-h)^2}} = \arcsin\left(\frac{x-h}{a}\right)+C, \qquad |x-h|<a,\quad a>0. $$

Worked Example: Respecting the bounded-radicand domain

Evaluate \(\int \frac{dx}{\sqrt{16-(x-1)^2}}\). The radicand must be strictly positive because it is under a square root in the denominator:

$$ 16-(x-1)^2>0 \quad\Longleftrightarrow\quad (x-1)^2<16 \quad\Longleftrightarrow\quad -3<x<5. $$

Here \(a=4\) and \(h=1\), so the antiderivative is

$$ \arcsin\left(\frac{x-1}{4}\right)+C, \qquad -3<x<5. $$

Differentiate on this interval. Since \(\left|\frac{x-1}{4}\right|<1\), the inverse-sine derivative applies:

$$ \begin{aligned} \frac{d}{dx}\arcsin\left(\frac{x-1}{4}\right) &= \frac{1/4}{\sqrt{1-\big((x-1)/4\big)^2}}\\ &= \frac{1/4}{\sqrt{(16-(x-1)^2)/16}}\\ &= \frac{1/4}{\sqrt{16-(x-1)^2}/4}\\ &= \frac{1}{\sqrt{16-(x-1)^2}}. \end{aligned} $$

At \(x=6\), the radicand is \(16-25=-9\), so the original integrand is not real there. Extending this real-valued antiderivative formula to \(x=6\) would ignore the domain restriction.

Do not omit the arbitrary constant

When an indefinite integral is written as a general antiderivative, \(+C\) is part of the answer. Differentiation removes constants, so it cannot distinguish among antiderivatives that differ by a constant. On a single interval, omitting \(+C\) gives one antiderivative but not the full family. If a domain consists of separate intervals, the constants can be chosen independently on those intervals.

Worked Example: Restoring the constant of integration

Find the general antiderivative of \(\frac{2x}{x^2+1}\). The denominator is positive for every real \(x\), and the numerator is the derivative of \(x^2+1\). Thus

$$ \int \frac{2x}{x^2+1}\,dx = \ln(x^2+1)+C. $$

Check by differentiation:

$$ \frac{d}{dx}\big(\ln(x^2+1)+C\big) = \frac{2x}{x^2+1}+0 = \frac{2x}{x^2+1}. $$

The expression \(\ln(x^2+1)\) is one antiderivative, but the general answer must allow every additive constant. For instance, \(\ln(x^2+1)+7\) has the same derivative. The \(+C\) records this family.

A practical error-checking sequence

Before accepting a completed-square antiderivative, check each feature against the original integrand. A tidy-looking standard form is not enough: the constants, signs, domain, and logarithm must all survive the algebra.

1
Write the completed square exactly.
Keep any factor outside the square, for example \(A((x-h)^2+a^2)\), visible.
2
State where the integrand is defined.
Exclude zeros of denominators, and require a nonnegative radicand—or a positive one when the square root is in a denominator.
3
Choose the matching sign pattern.
Distinguish \(u^2+a^2\), \(u^2-a^2\), and \(a^2-u^2\); they do not share the same antiderivative.
4
Differentiate the proposed answer.
Check that the result is the original integrand, including its scale and sign.
5
Complete the general answer.
Include \(+C\) for an indefinite integral and retain absolute values where the real logarithm requires them.

Common mistakes and their corrections

Several incorrect answers can look plausible because they resemble a familiar formula. The derivative and domain checks provide a concrete way to distinguish them.

MistakeWhy it failsCorrection
Dropping an outside factor such as \(1/4\)Differentiation gives a multiple of the original integrand.Factor the denominator first and carry the reciprocal factor through the integral.
Reversing the ratio in a difference-form logarithmThe derivative changes sign.Differentiate the logarithm to confirm the numerator order.
Writing \(\ln(g(x))\) when \(g(x)\) can be negativeThe real logarithm is undefined for negative inputs.Use \(\ln|g(x)|\) wherever \(g(x)\ne0\), and still exclude its zeros.
Using a radical formula outside its real domainThe radicand is negative, or the reciprocal denominator is zero.Solve the radicand inequality before integrating.
Leaving off \(+C\)The result gives only one member of the family of antiderivatives.Include an arbitrary additive constant in the general indefinite integral.

Summary

Completed-square integration is especially sensitive to details that can be checked directly. Keep scale factors, use the sign pattern that matches the quadratic, include absolute values in real logarithms when needed, and restrict radical formulas to their real domains. Finally, differentiate the proposed answer and compare it with the original integrand. That single check often reveals a missing factor or sign before it becomes part of a longer calculation.

Check Your Understanding

For each question, state any domain restrictions and use differentiation where appropriate.

  1. What coefficient is required in an antiderivative of \(1/[5((x-1)^2+4)]\), and how can you verify it?
  2. Why does reversing the ratio in the logarithmic antiderivative for \(1/(u^2-a^2)\) change the answer?
  3. For which real \(x\) is \(1/\sqrt{25-(x+2)^2}\) defined?
  4. Why can \(\ln|g(x)|\) be defined on a branch where \(\ln(g(x))\) is not real?
  5. What does \(+C\) represent in an indefinite integral?

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