arctan(x) has no obvious second factor, so integration by parts sets u = arctan(x) and dv = dx. The derivative of arctan eliminates the inverse trig and leaves a rational function.
Result
\[ \int \arctan(x)\,dx = x\arctan(x) - \frac{\ln(1+x^2)}{2} + C \]
Derivation
Set \(u = \arctan(x)\) and \(dv = dx\). Then \(du = \dfrac{1}{1+x^2}\,dx\) and \(v = x\).
\[ \int \arctan(x)\,dx = x\arctan(x) - \int \frac{x}{1+x^2}\,dx \]For the remaining integral, use \(u\)-substitution with \(w = 1 + x^2\), \(dw = 2x\,dx\):
\[ \int \frac{x}{1+x^2}\,dx = \frac{1}{2}\int \frac{dw}{w} = \frac{\ln|w|}{2} = \frac{\ln(1+x^2)}{2} \]Therefore:
\[ \int \arctan(x)\,dx = x\arctan(x) - \frac{\ln(1+x^2)}{2} + C \]Definite integral examples
\(\int_0^1 \arctan(x)\,dx\)
\[ \left[x\arctan(x) - \frac{\ln(1+x^2)}{2}\right]_0^1 = \frac{\pi}{4} - \frac{\ln 2}{2} \approx 0.439 \]Common variants
| Integral | Antiderivative | Notes |
|---|---|---|
| \(\int \frac{1}{1+x^2}\,dx\) | \(\arctan(x) + C\) | Standard derivative of arctan — the reverse of this page's result. |
| \(\int \frac{1}{a^2+x^2}\,dx\) | \(\dfrac{1}{a}\arctan\!\left(\dfrac{x}{a}\right) + C\) | Generalized form. |
Try it in the calculator
Paste any variant below into the step-by-step integral calculator for a full worked solution and graph.
Open in calculator →