# Integral of x/(x² + 1): Formula, Steps and Examples

> The integral of x/(x² + 1) is ½ ln(x² + 1) + C. See the u-substitution step by step, why no absolute value is needed, and related integrals like 1/(x² + 1).

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

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

## At a glance

- **Antiderivative:** $\dfrac{1}{2}\ln\left(x^2 + 1\right) + C$
- **Method:** u-substitution with $u = x^2 + 1$
- **Absolute value:** Not needed, since $x^2 + 1 > 0$
- **Symmetric interval:** $\int_{-a}^{a}\dfrac{x}{x^2 + 1}\,dx = 0$
- **Compare:** $\int \dfrac{1}{x^2 + 1}\,dx = \arctan x + C$

## Key takeaways

- The integral of $\frac{x}{x^2 + 1}$ is $\frac{1}{2}\ln(x^2 + 1) + C$.
- The numerator $x$ is half the derivative of the denominator, so substitute $u = x^2 + 1$.
- No absolute value is needed because $x^2 + 1$ is always positive.
- Do not confuse it with $\int\frac{1}{x^2 + 1}\,dx = \arctan x + C$, which has no $x$ on top.

The **integral of $\dfrac{x}{x^2 + 1}$ is $\dfrac{1}{2}\ln\left(x^2 + 1\right) + C$**. It is the textbook example of a [u-substitution](/rules/u-substitution-rule) that turns into a log.

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

## Graph of x/(x² + 1) and its antiderivative

```graph
title: 'Area under y = x/(x² + 1) from 0 to 2, with the antiderivative y = ½ ln(x² + 1)'
caption: 'The shaded area is $\frac{1}{2}\ln 5 \approx 0.805$. The function is odd, and its antiderivative is even: the dashed curve is symmetric about the $y$-axis with a minimum at $x = 0$.'
x: [-4, 4]
y: [-1, 1.6]
functions:
  - expr: x/(x^2 + 1)
    label: y = x/(x² + 1)
  - expr: ln(x^2 + 1)/2
    label: y = ½ ln(x² + 1) (antiderivative)
    dashed: true
shade: {expr: x/(x^2 + 1), from: 0, to: 2}
points:
  - [1, 0.5, 'max (1, 1/2)']
```

## The substitution, step by step

1. Spot that the derivative of the denominator, $2x$, matches the numerator up to a constant.
2. Let $u = x^2 + 1$. Then $du = 2x\,dx$, so $x\,dx = \frac{1}{2}du$.
3. Rewrite: $\displaystyle\int \frac{x}{x^2 + 1}\,dx = \frac{1}{2}\int\frac{1}{u}\,du$.
4. Integrate with the [integral of 1/x](/integrals/1-over-x): $\frac{1}{2}\ln\lvert u\rvert + C$.
5. Substitute back: $\frac{1}{2}\ln\lvert x^2 + 1\rvert + C$.
6. Since $x^2 + 1 \ge 1 > 0$, drop the bars: $\frac{1}{2}\ln(x^2 + 1) + C$.

The general pattern is $\int\frac{f'(x)}{f(x)}\,dx = \ln\lvert f(x)\rvert + C$. Here the numerator is $\frac{1}{2}f'(x)$, which gives the factor $\frac{1}{2}$.

## Check by differentiating

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

## Definite integrals

**Example 1.** $\int_0^1 \frac{x}{x^2 + 1}\,dx = \frac{1}{2}\ln 2 \approx 0.347$.

**Example 2.** $\int_{-3}^{3}\frac{x}{x^2 + 1}\,dx = 0$. The integrand is odd, so the area on the left cancels the area on the right.

**Example 3: changing the limits.** With $u = x^2 + 1$, the limits $x = 0$ and $x = 2$ become $u = 1$ and $u = 5$:

$$\int_0^2 \frac{x}{x^2 + 1}\,dx = \frac{1}{2}\int_1^5\frac{du}{u} = \frac{1}{2}\ln 5$$

## Related integrals

Small changes to the integrand change the method completely:

| Integral | Method | Answer |
| --- | --- | --- |
| $\int\frac{x}{x^2 + 1}\,dx$ | $u = x^2 + 1$ | $\frac{1}{2}\ln(x^2 + 1) + C$ |
| $\int\frac{1}{x^2 + 1}\,dx$ | known formula | $\arctan x + C$ |
| $\int\frac{x}{(x^2 + 1)^2}\,dx$ | $u = x^2 + 1$ | $-\frac{1}{2(x^2 + 1)} + C$ |
| $\int\frac{x}{x^2 + a^2}\,dx$ | $u = x^2 + a^2$ | $\frac{1}{2}\ln(x^2 + a^2) + C$ |
| $\int\frac{x^3}{x^2 + 1}\,dx$ | divide first | $\frac{x^2}{2} - \frac{1}{2}\ln(x^2 + 1) + C$ |

For the last row, polynomial division gives $\frac{x^3}{x^2 + 1} = x - \frac{x}{x^2 + 1}$.

**Example 4: split the numerator.** 

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

The second piece uses the [integral of 1/(1 + x²)](/integrals/1-over-1-plus-x-squared).

## Common mistakes

1. **Forgetting the $\frac{1}{2}$.** $du = 2x\,dx$, so $x\,dx$ is only half of $du$.
2. **Answering $\arctan x$.** That is the integral of $\frac{1}{x^2 + 1}$, without the $x$ on top.
3. **Writing $\ln\lvert x\rvert\cdot\ln\lvert x^2 + 1\rvert$** or splitting the fraction as $\frac{x}{x^2} + \frac{x}{1}$. A fraction cannot be split over a sum in the denominator.
4. **Integrating $\frac{x}{x^2 - 1}$ the same way and dropping the bars.** That one gives $\frac{1}{2}\ln\lvert x^2 - 1\rvert + C$, and the absolute value matters.

More practice: [u-substitution problems](/practice-problems/u-substitution).

## Frequently asked questions

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

It is $\frac{1}{2}\ln(x^2 + 1) + C$. Use $u = x^2 + 1$, so $x\,dx = \frac{1}{2}du$.

### What is the integral of 2x/(x² + 1)?

It is $\ln(x^2 + 1) + C$. The numerator is exactly the derivative of the denominator, so the answer is the log of the denominator.

### What is the integral of x/(x² + 1) from 0 to 1?

It is $\frac{1}{2}\ln 2 - \frac{1}{2}\ln 1 = \frac{1}{2}\ln 2 \approx 0.347$.

### Does the integral of x/(x² + 1) from 0 to infinity converge?

No. $\frac{1}{2}\ln(b^2 + 1) \to \infty$ as $b \to \infty$, so the integral diverges. For large $x$ the integrand behaves like $\frac{1}{x}$.
