# 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.

Source: https://practicecalculus.com/integrals/1-over-x-squared-minus-1
Updated: 2026-11-06

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

## At a glance

- **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$

## Key takeaways

- The integral of $\frac{1}{x^2 - 1}$ is $\frac{1}{2}\ln\left\lvert\frac{x - 1}{x + 1}\right\rvert + C$.
- Factor the denominator as $(x - 1)(x + 1)$ and split into partial fractions.
- A minus sign makes all the difference: $\int\frac{1}{x^2 + 1}\,dx = \arctan x + C$, but $\frac{1}{x^2 - 1}$ gives logs.
- Never integrate across $x = 1$ or $x = -1$, where the function has vertical asymptotes.

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
title: 'Graph of y = 1/(x² - 1) with the area from x = 2 to x = 3 shaded'
caption: '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$.'
x: [-4, 4]
y: [-4, 4]
functions:
  - expr: 1/(x^2 - 1)
    label: y = 1/(x² - 1)
shade: {expr: 1/(x^2 - 1), from: 2, to: 3}
vertical:
  - {x: -1, label: 'x = -1'}
  - {x: 1, label: 'x = 1'}
```

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](/integrals/1-over-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$$

6. Combine the logs: $\frac{1}{2}\ln\left\lvert\frac{x - 1}{x + 1}\right\rvert + C$.

The guide to [partial fractions](/blog/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)](/integrals/x-over-x-squared-plus-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-problems/partial-fractions).

## 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.
