AP Calculus BC

Integral of 1/(x^2-4): A Log, Not an Arctangent

The integral of 1 over x squared minus 4 is one quarter times the natural log of the absolute value of x minus 2 over x plus 2, plus C. The minus sign lets the denominator factor into x minus 2 times x plus 2, which is what makes this a partial fractions problem and not an arctangent.

1x24dx=14lnx2x+2+C\int \frac{1}{x^{2}-4}\,dx = \frac{1}{4}\ln\left|\frac{x-2}{x+2}\right| + C

The denominator factors, so split it

x24x^{2}-4 is a difference of squares: (x2)(x+2)(x-2)(x+2). Distinct linear factors mean partial fractions, so set 1(x2)(x+2)=Ax2+Bx+2\frac{1}{(x-2)(x+2)} = \frac{A}{x-2} + \frac{B}{x+2} and clear denominators to get 1=A(x+2)+B(x2)1 = A(x+2) + B(x-2).

Substituting x=2x = 2 gives 4A=14A = 1, so A=14A = \frac{1}{4}. Substituting x=2x = -2 gives 4B=1-4B = 1, so B=14B = -\frac{1}{4}. The 44 is the gap between the two roots, which is where the coefficient in the final answer comes from.

dxx24=14lnx214lnx+2+C=14lnx2x+2+C\int \frac{dx}{x^{2}-4} = \frac{1}{4}\ln\left|x-2\right| - \frac{1}{4}\ln\left|x+2\right| + C = \frac{1}{4}\ln\left|\frac{x-2}{x+2}\right| + C

Compare it with 1/(x^2+4)

Change one sign and the problem changes species. x2+4x^{2}+4 has no real roots, so it does not factor over the reals and there is nothing for partial fractions to split. That integrand is an arctangent.

dxx2+4=12arctanx2+C\int \frac{dx}{x^{2}+4} = \frac{1}{2}\arctan\frac{x}{2} + C

Check the denominator before choosing a method

For a denominator shaped like x squared plus or minus a constant, the minus case factors into real linear pieces and gives a logarithm, and the plus case is irreducible and gives an arctangent. For any other quadratic the signs tell you nothing: check the discriminant. Real roots mean partial fractions, no real roots mean completing the square and an arctangent.

The mistakes students make

Each of these is a one-symbol slip that lands on a clean but incorrect answer, which is why they survive to the end of a free response.

  • Reaching for the arctangent pattern and writing 12arctanx2\frac{1}{2}\arctan\frac{x}{2}. That is the answer to dxx2+4\int\frac{dx}{x^{2}+4}, a different problem.
  • Losing the 14\frac{1}{4} and answering lnx2x+2\ln\left|\frac{x-2}{x+2}\right|, whose derivative is 4x24\frac{4}{x^{2}-4}, four times too big.
  • Guessing lnx24\ln\left|x^{2}-4\right| from the shape of the fraction. Its derivative is 2xx24\frac{2x}{x^{2}-4}, and there is no 2x2x in the numerator to justify it.

Every answer on this page is machine checked

An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.

Frequently asked questions

What is the integral of 1/(x^2-4)?

Because x24x^{2}-4 splits into (x2)(x+2)(x-2)(x+2), the answer is a difference of logs, written compactly as 14lnx2x+2+C\frac{1}{4}\ln\left|\frac{x-2}{x+2}\right| + C.

Why is 1/(x^2+4) an arctangent but 1/(x^2-4) a log?

Because x24x^{2}-4 factors into real linear pieces and x2+4x^{2}+4 does not. Real factors give partial fractions and logs; an irreducible quadratic under a constant numerator gives an arctangent.

Where does the 1/4 come from?

From the partial fractions coefficients. The roots are 22 and 2-2, which are 44 apart, and that gap becomes the 14\frac{1}{4} in front of both logs.