Tutorials › Calculus II › Integrating The Inverse Tangent

Integration by Parts I · Tutorial 40 of 998

Integrating The Inverse Tangent

Find ∫ arctan x dx by letting the inverse tangent be u and dv = dx, then handle the leftover x/(1+x²) with a substitution.

Intermediate 10 min read

What You'll Learn

  • Set up integration by parts for an inverse trigonometric function.
  • Use the derivative 1/(1+x²) of arctan x in the parts formula.
  • Evaluate the leftover integral with the substitution w = 1 + x².
  • Compute definite integrals of arctan x, including with symmetric limits.
  • Check the antiderivative by differentiation and by a geometric argument.

Why Inverse Tangent Needs Integration by Parts

The function \(\arctan x\) is a standard example of an integrand whose antiderivative cannot be found by a substitution alone. There is no inner function whose derivative sits alongside it. However, its derivative is simple and algebraic: \(\frac{d}{dx}\arctan x=\frac{1}{1+x^2}\). This is the signal to use integration by parts with \(u=\arctan x\). Differentiating transforms the inverse trigonometric function into a rational function, and the integral that remains is much easier.

The same strategy works for every inverse trigonometric function and for the logarithm. In each case the function is awkward to integrate but pleasant to differentiate, and the choice \(dv=dx\) supplies the factor \(v=x\) needed to complete the formula.

Result: For all real \(x\), \(\displaystyle\int\arctan x\,dx=x\arctan x-\frac12\ln(1+x^2)+C.\)

Deriving the Antiderivative

Let \(u=\arctan x\) and \(dv=dx\). Then \(du=\frac{dx}{1+x^2}\) and \(v=x\). The formula \(\int u\,dv=uv-\int v\,du\) becomes

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

The remaining integral is handled by a substitution. Let \(w=1+x^2\), so \(dw=2x\,dx\) and \(x\,dx=\frac12\,dw\). Since \(w=1+x^2>0\), no absolute value is needed:

$$ \int\frac{x}{1+x^2}\,dx=\frac12\int\frac{dw}{w}=\frac12\ln w+C=\frac12\ln(1+x^2)+C. $$

Substituting back gives the stated result. The antiderivative has two parts: a boundary term \(x\arctan x\) that carries the size of the function, and a logarithmic correction that accounts for the curvature.

Checking by Differentiation

By the product rule, \(\frac{d}{dx}\bigl[x\arctan x\bigr]=\arctan x+\frac{x}{1+x^2}\). The derivative of \(-\frac12\ln(1+x^2)\) is \(-\frac12\cdot\frac{2x}{1+x^2}=-\frac{x}{1+x^2}\). The two rational terms cancel, leaving exactly \(\arctan x\). This short calculation is the best defense against sign and coefficient errors, especially the factor \(\frac12\).

A Geometric Check Using the Inverse Function

The definite integral \(\int_0^1\arctan x\,dx\) is the area under the curve \(y=\arctan x\) from \(0\) to \(1\). Reflecting across the line \(y=x\) turns it into an area measured along the \(y\)-axis. The rectangle \([0,1]\times[0,\frac\pi4]\) has area \(\frac\pi4\), and the region under \(\arctan x\) is what remains after removing the area between the \(y\)-axis and the curve \(x=\tan y\), namely \(\int_0^{\pi/4}\tan y\,dy\). Since \(\int\tan y\,dy=-\ln\cos y\), that area equals \(-\ln\cos\frac\pi4=\frac12\ln2\). Therefore

$$ \int_0^1\arctan x\,dx=\frac\pi4-\frac12\ln2\approx0.439. $$

This agrees with the value obtained from the antiderivative, as computed in the first example below. Having two independent routes to the same number is a strong confirmation that the formula and its sign conventions are right.

Worked Examples

Worked Example: A Definite Integral from 0 to 1

Evaluate \(\int_0^1\arctan x\,dx\) using the antiderivative.

With \(F(x)=x\arctan x-\frac12\ln(1+x^2)\), we get \(F(1)=\frac\pi4-\frac12\ln2\) and \(F(0)=0\). Hence

$$ \int_0^1\arctan x\,dx=\frac\pi4-\frac12\ln2\approx0.785-0.347=0.439. $$

The integrand rises from \(0\) to \(\frac\pi4\approx0.785\) and is concave on this interval, so the area should be slightly more than half the maximum height. The computed \(0.439\) fits that description.

Worked Example: A Positive Region Beyond the Origin

Evaluate \(\int_0^{\sqrt3}\arctan x\,dx\).

At \(x=\sqrt3\), \(\arctan\sqrt3=\frac\pi3\), and \(1+x^2=4\). So \(F(\sqrt3)=\sqrt3\cdot\frac\pi3-\frac12\ln4=\frac{\pi\sqrt3}{3}-\ln2\). Since \(F(0)=0\),

$$ \int_0^{\sqrt3}\arctan x\,dx=\frac{\pi\sqrt3}{3}-\ln2\approx1.814-0.693=1.121. $$

The simplification \(\frac12\ln4=\ln2\) uses the power rule for logarithms, \(\ln4=2\ln2\). It is worth recognizing such simplifications at once so that the final answer is in its cleanest form.

Worked Example: Symmetric Limits

Evaluate \(\int_{-2}^{2}\arctan x\,dx\).

The function \(\arctan x\) is odd, so its integral over a symmetric interval is zero. The antiderivative agrees: \(F(x)=x\arctan x-\frac12\ln(1+x^2)\) is an even function, so \(F(2)-F(-2)=0\). Therefore

$$ \int_{-2}^{2}\arctan x\,dx=0. $$

Using the symmetry before doing any algebra saves effort and eliminates the risk of an arithmetic slip in the endpoint values.

A Reliable Procedure

1
Choose the parts.
Take \(u=\arctan x\) and \(dv=dx\). The remaining pieces are \(du=\frac{dx}{1+x^2}\) and \(v=x\).
2
Form the product.
Write \(x\arctan x-\int\frac{x}{1+x^2}\,dx\).
3
Substitute.
Let \(w=1+x^2\), \(dw=2x\,dx\), and integrate \(\frac12\int\frac{dw}{w}\).
4
Back-substitute.
Replace \(w\) by \(1+x^2\) and keep the factor \(\frac12\).
5
Check.
Differentiate and confirm that \(\frac{x}{1+x^2}\) cancels.

Common Mistake: Dropping the One-Half

The leftover integral \(\int\frac{x}{1+x^2}\,dx\) is half of a logarithm, not a full logarithm. Writing \(\ln(1+x^2)\) in place of \(\frac12\ln(1+x^2)\) is the most frequent error here. The derivative check catches it at once: the incorrect answer \(x\arctan x-\ln(1+x^2)\) differentiates to \(\arctan x+\frac{x}{1+x^2}-\frac{2x}{1+x^2}=\arctan x-\frac{x}{1+x^2}\), which is not the integrand.

Another slip is to write \(\int\frac{x}{1+x^2}\,dx=\arctan x\), mixing this integral with \(\int\frac{1}{1+x^2}\,dx\). The numerator \(x\) is what makes this a logarithmic integral; an arctangent needs a constant numerator.

Quick Reference

IntegrandAntiderivativeValid where
\(\arctan x\)\(x\arctan x-\frac12\ln(1+x^2)\)all real \(x\)
\(\arcsin x\)\(x\arcsin x+\sqrt{1-x^2}\)\(-1\le x\le1\)
\(\ln x\)\(x\ln x-x\)\(x>0\)
\(\frac{1}{1+x^2}\)\(\arctan x\)all real \(x\)
Takeaway: To integrate an inverse trigonometric function, put it in the role of \(u\), let \(dv=dx\), and handle the resulting rational integral by substitution. For \(\arctan x\), the answer is \(x\arctan x-\frac12\ln(1+x^2)\).

Interpreting the Result

The antiderivative \(F(x)=x\arctan x-\frac12\ln(1+x^2)\) is an even function with \(F(0)=0\) and a minimum at the origin, since \(F'(x)=\arctan x\) changes sign from negative to positive there. For large positive \(x\), \(\arctan x\) approaches \(\frac\pi2\), so \(F(x)\) behaves like \(\frac{\pi}{2}x-\ln x\): the area under the curve grows almost linearly, with slope \(\frac\pi2\), and the logarithm is a slowly growing correction. This explains why the definite integral over a long interval is close to \(\frac\pi2\) times its length, and why short intervals near the origin give much smaller areas than a rectangle of the maximum height.

In applications, arctangent integrals measure accumulated angle. For instance, if a signal's phase is \(\arctan t\) at time \(t\), the total phase accumulated over \([0,T]\) is \(\int_0^T\arctan t\,dt\), which the formula evaluates exactly.

Practice Problems with Answers

Try each problem before reading the answer. Every answer below was checked by differentiation or by numerical integration.

  1. Evaluate \(\int_0^1\arctan(x)\,dx\) and compare with \(\frac\pi4-\frac12\ln2\). Hint: apply the formula with \(F(1)-F(0)\). Answer: \(\frac\pi4-\frac12\ln2\approx0.439\)
  2. Find an antiderivative of \(3\arctan x\). Hint: pull out the constant \(3\). Answer: \(3x\arctan x-\frac32\ln(1+x^2)\)
  3. Evaluate \(\int_0^{\sqrt3}\arctan x\,dx\). Hint: \(\arctan\sqrt3=\frac\pi3\) and \(\frac12\ln4=\ln2\). Answer: \(\frac{\pi\sqrt3}{3}-\ln2\)
  4. Evaluate \(\int_1^{2}\arctan x\,dx\) in terms of \(\arctan2\) and logarithms. Hint: \(F(2)-F(1)\) with \(\arctan1=\frac\pi4\). Answer: \(2\arctan2-\frac\pi4-\frac12\ln5+\frac12\ln2\)

Why Substitution Alone Does Not Work

It is natural to wonder whether a substitution such as \(w=\arctan x\) could simplify the integral. Setting \(w=\arctan x\) gives \(x=\tan w\) and \(dx=\sec^2w\,dw\), so the integral becomes \(\int w\sec^2w\,dw\). That is still a product of a polynomial factor and a trigonometric factor, and it requires integration by parts anyway. The direct parts approach is shorter. In general, when a function is easy to differentiate but hard to integrate, and nothing outside it is its derivative, parts is the primary tool and substitution is a helper for the leftover integral.

The same reasoning explains why the antiderivative contains a logarithm even though the integrand is an inverse trigonometric function: the logarithm arises from integrating the rational function \(\frac{x}{1+x^2}\) that results from differentiating \(\arctan x\). Differentiation changes the type of function, and the type of the antiderivative reflects that change.

Where This Fits in the Course

This tutorial belongs to the module “Integration by Parts I”. The tutorial just before it is “Polynomial-Weighted Logarithms Of Quadratics,” and the one that follows is “Integrating The Inverse Sine And Cosine.” The method matches the logarithm integrals before it, with an inverse trigonometric function now playing the role of the logarithm.

Check Your Understanding

Use the derivation and examples above to answer these questions.

  1. Why is \(\arctan x\) chosen as \(u\) rather than \(dv\)?
  2. Evaluate \(\int_0^{1/\sqrt3}\arctan x\,dx\).
  3. Explain why \(\int_{-1}^{1}\arctan x\,dx=0\) without computing the antiderivative.
  4. What substitution evaluates \(\int\frac{x}{1+x^2}\,dx\), and why is no absolute value needed?
  5. Verify by differentiation that \(x\arctan x-\frac12\ln(1+x^2)\) is an antiderivative of \(\arctan x\).

Test yourself: Calculus II final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon