practicecalculus
Powers, roots and rational functions

Integral of 1/(x² - 1): Formula, Partial Fractions, Examples

The integral of 1/(x² - 1) is ½ ln|(x - 1)/(x + 1)| + C. See the partial fraction steps, the general 1/(x² - a²) formula and worked definite integrals.

Powers, roots and rational functions Updated 2 min read

At a glance

\int \frac{1}{x^2 - 1}\,dx = \frac{1}{2}\ln\left\lvert\frac{x - 1}{x + 1}\right\rvert + C
Antiderivative
\dfrac{1}{2}\ln\left\lvert\dfrac{x - 1}{x + 1}\right\rvert + C
Method
Partial fractions
Decomposition
\dfrac{1}{x^2 - 1} = \dfrac{1}{2}\left(\dfrac{1}{x - 1} - \dfrac{1}{x + 1}\right)
General form
\int\dfrac{dx}{x^2 - a^2} = \dfrac{1}{2a}\ln\left\lvert\dfrac{x - a}{x + a}\right\rvert + C
Undefined at
x = \pm 1
On this page
  1. Graph of 1/(x² - 1)
  2. Partial fractions, step by step
  3. Check by differentiating
  4. The general formula: 1/(x² - a²)
  5. Worked examples
  6. Common mistakes

The integral of \dfrac{1}{x^2 - 1} is \dfrac{1}{2}\ln\left\lvert\dfrac{x - 1}{x + 1}\right\rvert + C. It is the simplest integral that needs partial fractions.

\int \frac{1}{x^2 - 1}\,dx = \frac{1}{2}\ln\left\lvert\frac{x - 1}{x + 1}\right\rvert + C

Graph of 1/(x² - 1)

Graph of y = 1/(x² - 1) with the area from x = 2 to x = 3 shaded
The function has vertical asymptotes at x = -1 and x = 1. The shaded area is \frac{1}{2}\ln\frac{3}{2} \approx 0.203.

Between the asymptotes the function is negative, with a maximum of -1 at x = 0. Outside them it is positive and falls toward 0.

Partial fractions, step by step

  1. Factor the denominator: x^2 - 1 = (x - 1)(x + 1).
  2. Set up the split: \dfrac{1}{(x - 1)(x + 1)} = \dfrac{A}{x - 1} + \dfrac{B}{x + 1}.
  3. Clear denominators: 1 = A(x + 1) + B(x - 1).
  4. Put x = 1: 1 = 2A, so A = \frac{1}{2}. Put x = -1: 1 = -2B, so B = -\frac{1}{2}.
  5. Integrate each piece with the integral of 1/x:
\int\left(\frac{1/2}{x - 1} - \frac{1/2}{x + 1}\right)dx = \frac{1}{2}\ln\lvert x - 1\rvert - \frac{1}{2}\ln\lvert x + 1\rvert + C
  1. Combine the logs: \frac{1}{2}\ln\left\lvert\frac{x - 1}{x + 1}\right\rvert + C.

The guide to partial fractions covers repeated and quadratic factors too.

Check by differentiating

\frac{d}{dx}\left[\frac{1}{2}\ln\lvert x - 1\rvert - \frac{1}{2}\ln\lvert x + 1\rvert\right] = \frac{1}{2}\left(\frac{1}{x - 1} - \frac{1}{x + 1}\right) = \frac{1}{2}\cdot\frac{2}{x^2 - 1} = \frac{1}{x^2 - 1} \checkmark

The general formula: 1/(x² - a²)

The same steps with (x - a)(x + a) give A = \frac{1}{2a}, B = -\frac{1}{2a}, so

\int\frac{1}{x^2 - a^2}\,dx = \frac{1}{2a}\ln\left\lvert\frac{x - a}{x + a}\right\rvert + C

For example, \int\frac{1}{x^2 - 9}\,dx = \frac{1}{6}\ln\left\lvert\frac{x - 3}{x + 3}\right\rvert + C.

Worked examples

Example 1: definite integral. For the shaded region:

\int_2^3\frac{dx}{x^2 - 1} = \frac{1}{2}\ln\frac{2}{4} - \frac{1}{2}\ln\frac{1}{3} = \frac{1}{2}\ln\frac{3}{2} \approx 0.203

Example 2: improper integral. As x \to \infty, \frac{x - 1}{x + 1} \to 1 and the log goes to 0:

\int_2^\infty\frac{dx}{x^2 - 1} = 0 - \frac{1}{2}\ln\frac{1}{3} = \frac{1}{2}\ln 3 \approx 0.549

Example 3: inside the asymptotes. \int_0^{1/2}\frac{dx}{x^2 - 1} = \frac{1}{2}\ln\frac{1/2}{3/2} - 0 = -\frac{1}{2}\ln 3. Negative, as the graph predicts.

Example 4: the flipped sign. \int\frac{1}{1 - x^2}\,dx = -\int\frac{1}{x^2 - 1}\,dx = \frac{1}{2}\ln\left\lvert\frac{1 + x}{1 - x}\right\rvert + C.

Example 5: a substitution first. \int\frac{\cos x}{\sin^2 x - 1}\,dx with u = \sin x becomes \int\frac{du}{u^2 - 1} = \frac{1}{2}\ln\left\lvert\frac{\sin x - 1}{\sin x + 1}\right\rvert + C.

Common mistakes

  1. Answering \arctan x. That is for x^2 + 1. Check the sign in the denominator.
  2. Answering \ln\lvert x^2 - 1\rvert. The numerator is 1, not 2x, so the \frac{f'}{f} pattern does not apply. That pattern gives the integral of x/(x² + 1) instead.
  3. Getting the sign of B wrong. Plug values back in to check the decomposition.
  4. Integrating across x = \pm 1. Those integrals are improper and diverge.

Practise on partial fraction problems.

Practice it now

Partial fractions

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the integral of 1/(x² - 1)?

It is \frac{1}{2}\ln\lvert x - 1\rvert - \frac{1}{2}\ln\lvert x + 1\rvert + C, which combines to \frac{1}{2}\ln\left\lvert\frac{x - 1}{x + 1}\right\rvert + C.

What is the integral of 1/(1 - x²)?

It is the negative of the above: \frac{1}{2}\ln\left\lvert\frac{1 + x}{1 - x}\right\rvert + C. For \lvert x\rvert < 1 this equals \operatorname{artanh} x + C.

What is the integral of 1/(x² - a²)?

It is \frac{1}{2a}\ln\left\lvert\frac{x - a}{x + a}\right\rvert + C, found with the same partial fractions.

Why is it not arctan?

\arctan x comes from \frac{1}{x^2 + 1}, whose denominator never factors over the real numbers. x^2 - 1 does factor, so partial fractions and logs take over.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.