practicecalculus
Inverse trig integrals

Integral of arctan x: Formula, Steps and Examples

The integral of arctan x is x arctan x − ½ ln(1+x²) + C. See the integration by parts steps, a check, definite integrals and examples.

Inverse trig integrals Updated 3 min read

At a glance

\int \arctan x\,dx = x\arctan x - \frac{1}{2}\ln(1+x^2) + C
Antiderivative
x\arctan x - \frac{1}{2}\ln(1+x^2) + C
Method
Integration by parts with u = \arctan x, dv = dx
From 0 to 1
\frac{\pi}{4} - \frac{1}{2}\ln 2 \approx 0.439
Related integral
\int \frac{dx}{1+x^2} = \arctan x + C
On this page
  1. Graph of arctan x and its antiderivative
  2. How to integrate arctan x step by step
  3. Check by differentiating
  4. Definite integrals
  5. Worked examples
  6. Common mistakes

The integral of \arctan x is x\arctan x - \dfrac{1}{2}\ln(1+x^2) + C. There is no basic rule that undoes arctan directly, so the standard route is integration by parts with a "hidden" factor of 1.

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

Graph of arctan x and its antiderivative

y = arctan x and its antiderivative
The shaded area from 0 to 1 equals \frac{\pi}{4} - \frac{1}{2}\ln 2 \approx 0.439. The dashed antiderivative has a minimum at x = 0, where \arctan x changes sign.

How to integrate arctan x step by step

The trick is to write \arctan x as \arctan x \cdot 1 and use integration by parts, \int u\,dv = uv - \int v\,du.

  1. Choose the parts. u = \arctan x and dv = dx. Then du = \frac{1}{1+x^2}\,dx and v = x.
  2. Apply the formula. \int \arctan x\,dx = x\arctan x - \int \frac{x}{1+x^2}\,dx
  3. Finish the leftover integral with w = 1 + x^2, dw = 2x\,dx: \int \frac{x}{1+x^2}\,dx = \frac{1}{2}\int\frac{dw}{w} = \frac{1}{2}\ln(1+x^2) + C
  4. Combine. \int \arctan x\,dx = x\arctan x - \frac{1}{2}\ln(1+x^2) + C

Why choose u = \arctan x? Its derivative \frac{1}{1+x^2} is algebraic and much easier to work with. In the LIATE order, inverse trig functions come near the front, so they are good choices for u.

Check by differentiating

\frac{d}{dx}\left(x\arctan x - \frac{1}{2}\ln(1+x^2)\right) = \arctan x + \frac{x}{1+x^2} - \frac{1}{2}\cdot\frac{2x}{1+x^2} = \arctan x

The two fractions cancel exactly, leaving \arctan x.

Definite integrals

From 0 to 1:

\int_0^1 \arctan x\,dx = \left(1\cdot\frac{\pi}{4} - \frac{1}{2}\ln 2\right) - (0 - 0) = \frac{\pi}{4} - \frac{\ln 2}{2} \approx 0.439

From −1 to 1: \arctan x is an odd function, so \int_{-1}^{1}\arctan x\,dx = 0. The area above the axis on the right cancels the area below on the left.

From 0 to √3: \sqrt{3}\cdot\frac{\pi}{3} - \frac{1}{2}\ln 4 = \frac{\pi\sqrt{3}}{3} - \ln 2 \approx 1.121.

Worked examples

Example 1: a scaled input. \int \arctan(2x)\,dx. Let u = 2x, so dx = \frac{du}{2}:

\frac{1}{2}\left(u\arctan u - \frac{1}{2}\ln(1+u^2)\right) + C = x\arctan(2x) - \frac{1}{4}\ln(1+4x^2) + C

Check: the derivative is \arctan 2x + \frac{2x}{1+4x^2} - \frac{1}{4}\cdot\frac{8x}{1+4x^2} = \arctan 2x.

Example 2: x times arctan x. Take u = \arctan x and dv = x\,dx, so v = \frac{x^2}{2}:

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

Write \frac{x^2}{1+x^2} = 1 - \frac{1}{1+x^2}, which integrates to x - \arctan x. So

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

Example 3: arctan of the square root. For \int\arctan\sqrt{x}\,dx, let x = t^2 first, then use parts. The result is (x+1)\arctan\sqrt{x} - \sqrt{x} + C, which you can confirm by differentiating.

Common mistakes

  1. Answering \frac{1}{1+x^2}. That is the derivative of \arctan x, not its integral. See the derivative of arctan x.
  2. Mixing up arctan and the reciprocal of tan. \tan^{-1}x is the inverse function. \frac{1}{\tan x} = \cot x is a different function; see the integral of cot x.
  3. Losing the factor \frac{1}{2}. In \int\frac{x}{1+x^2}\,dx, the substitution gives \frac{1}{2}\ln(1+x^2), not \ln(1+x^2).
  4. Swapping the roles. Picking u = 1 and dv = \arctan x\,dx needs the integral you are trying to find. Always differentiate the inverse trig function.

To get arctan as an answer rather than integrate it, see the integral of 1/(1+x²). The same parts trick is shown on the integral of ln x page, and the integration by parts guide has more practice.

Practice it now

Integration by parts

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 arctan x?

It is x\arctan x - \frac{1}{2}\ln(1+x^2) + C.

What is the integral of tan⁻¹ x?

\tan^{-1} x means \arctan x, so the integral is the same: x\tan^{-1} x - \frac{1}{2}\ln(1+x^2) + C. It is not \int\frac{1}{\tan x}\,dx, which equals \ln\lvert\sin x\rvert + C.

What is the integral of arctan(2x)?

It is x\arctan(2x) - \frac{1}{4}\ln(1+4x^2) + C. Substitute u = 2x and use the basic formula, or do parts directly.

What is the integral of x arctan x?

It is \frac{1}{2}(x^2+1)\arctan x - \frac{x}{2} + C, by parts with u = \arctan x and dv = x\,dx.

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.