# Integral of 1/x²: Formula, Derivation and Examples

> The integral of 1/x² is -1/x + C. Rewrite it as x^(-2), check by differentiating, and see improper integrals like 1 to infinity and the classic -1 to 1 trap.

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

$$ \int \frac{1}{x^2}\,dx = -\frac{1}{x} + C $$

## At a glance

- **Antiderivative:** $-\dfrac{1}{x} + C$
- **Rewrite first:** $\dfrac{1}{x^2} = x^{-2}$
- **Valid for:** $x \ne 0$
- **Improper integral:** $\int_1^\infty \dfrac{1}{x^2}\,dx = 1$
- **Check:** $\dfrac{d}{dx}\left(-\dfrac{1}{x}\right) = \dfrac{1}{x^2}$

## Key takeaways

- The integral of $\frac{1}{x^2}$ is $-\frac{1}{x} + C$. It is a power, not a log.
- Rewrite as $x^{-2}$, raise the power to $-1$, and divide by $-1$.
- The improper integral $\int_1^\infty \frac{1}{x^2}\,dx$ converges to $1$.
- You cannot integrate $\frac{1}{x^2}$ across $x = 0$. $\int_{-1}^{1}\frac{1}{x^2}\,dx$ diverges.

The **integral of $\dfrac{1}{x^2}$ is $-\dfrac{1}{x} + C$**. Unlike $\frac{1}{x}$, this one is handled by the ordinary reverse power rule.

$$\int \frac{1}{x^2}\,dx = \int x^{-2}\,dx = -\frac{1}{x} + C$$

## Graph of 1/x² and the area under it

```graph
title: 'Area under y = 1/x² from 1 to 3, with the antiderivative y = -1/x'
caption: 'The shaded area is $-\frac{1}{3} - (-1) = \frac{2}{3}$. The dashed curve $y = -\frac{1}{x}$ always rises, because $\frac{1}{x^2}$ is always positive.'
x: [-0.5, 5]
y: [-2.5, 3]
functions:
  - expr: 1/x^2
    label: y = 1/x²
    domain: [0.58, 5]
  - expr: -1/x
    label: y = -1/x (antiderivative)
    dashed: true
    domain: [0.4, 5]
shade: {expr: 1/x^2, from: 1, to: 3}
points:
  - [1, 1, '(1, 1)']
  - [3, -0.333, '(3, -1/3)']
```

## Derivation, step by step

1. Rewrite as a power: $\frac{1}{x^2} = x^{-2}$.
2. Apply the [reverse power rule](/rules/reverse-power-rule) with $n = -2$.
3. Add one to the exponent: $-2 + 1 = -1$.
4. Divide by $-1$: $\frac{x^{-1}}{-1} = -\frac{1}{x}$.
5. Add $C$.

## Check by differentiating

$$\frac{d}{dx}\left(-x^{-1}\right) = -(-1)x^{-2} = \frac{1}{x^2} \checkmark$$

The forward rule is on the [derivative of 1/x²](/derivatives/1-over-x-squared) page, and the [derivative of 1/x](/derivatives/1-over-x) page shows that $\frac{d}{dx}\frac{1}{x} = -\frac{1}{x^2}$, which is the same fact read the other way.

## Improper integrals

The area under $\frac{1}{x^2}$ out to infinity is finite:

$$\int_1^\infty \frac{1}{x^2}\,dx = \lim_{b\to\infty}\left[-\frac{1}{x}\right]_1^b = \lim_{b\to\infty}\left(1 - \frac{1}{b}\right) = 1$$

Compare this with $\int_1^\infty \frac{1}{x}\,dx$, which diverges because $\ln b \to \infty$. This contrast is the start of the $p$-test for integrals and series. The lesson on [infinite limits of integration](/learn/calculus-2/improper-integrals-and-applications/infinite-limits-of-integration) covers it in detail.

Near zero the story flips: $\int_0^1 \frac{1}{x^2}\,dx = \lim_{a\to 0^+}\left(\frac{1}{a} - 1\right) = \infty$.

## The classic trap: integrating across zero

Plugging into the antiderivative gives

$$\left[-\frac{1}{x}\right]_{-1}^{1} = -1 - 1 = -2$$

But $\frac{1}{x^2}$ is positive everywhere, so its integral cannot be negative. The error is that $\frac{1}{x^2}$ has a vertical asymptote at $x = 0$, so the [Fundamental Theorem of Calculus](/theorems/fundamental-theorem-of-calculus-part-2) does not apply on $[-1, 1]$. Split the integral at $0$: each half diverges, so the whole integral diverges.

## Substitution variant

With $u = ax + b$:

$$\int \frac{1}{(ax + b)^2}\,dx = -\frac{1}{a(ax + b)} + C$$

For example, $\int \frac{1}{(2x + 1)^2}\,dx = -\frac{1}{2(2x + 1)} + C$. Check: the derivative is $\frac{1}{2}(2x + 1)^{-2}\cdot 2 = \frac{1}{(2x + 1)^2}$.

## Worked examples

**Example 1.** $\int \frac{3}{x^2}\,dx = -\frac{3}{x} + C$.

**Example 2.** $\int \frac{x + 1}{x^2}\,dx = \int\left(\frac{1}{x} + \frac{1}{x^2}\right)dx = \ln\lvert x\rvert - \frac{1}{x} + C$. Split first, then use the [integral of 1/x](/integrals/1-over-x) for the first piece.

**Example 3.** $\int_2^4 \frac{1}{x^2}\,dx = -\frac{1}{4} + \frac{1}{2} = \frac{1}{4}$.

**Example 4.** $\int \frac{1}{x^3}\,dx = \frac{x^{-2}}{-2} + C = -\frac{1}{2x^2} + C$.

## Common mistakes

1. **Writing $\ln(x^2)$.** The log only appears for $\frac{1}{x}$.
2. **Writing $-\frac{1}{x^3}$ or $\frac{1}{x}$.** Exponents go up by one ($-2 \to -1$), and you divide by $-1$, which flips the sign.
3. **Integrating across an asymptote.** Always check for division by zero inside the interval.
4. **Writing $\frac{1}{3x^3}$** by treating $\frac{1}{x^2}$ as $(x^2)$ and integrating that. Rewrite as $x^{-2}$ first.

Try [improper integral problems](/practice-problems/improper-integrals) to practise the infinite case.

## Frequently asked questions

### What is the integral of 1/x²?

The integral of $\frac{1}{x^2}$ is $-\frac{1}{x} + C$.

### What is the integral of 1/x² from 1 to infinity?

It is $1$. The antiderivative $-\frac{1}{x}$ goes from $-1$ at $x = 1$ to $0$ as $x \to \infty$, a change of $1$.

### Why is the integral of 1/x² from -1 to 1 not -2?

Plugging in gives $-1 - 1 = -2$, but that is wrong. $\frac{1}{x^2}$ blows up at $x = 0$, so the Fundamental Theorem does not apply. The integral actually diverges to infinity.

### Is the integral of 1/x² equal to ln(x²)?

No. $\ln$ only appears for $\frac{1}{x}$. For $\frac{1}{x^2}$ the reverse power rule works, giving $-\frac{1}{x} + C$.
