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.
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
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:
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
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
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\),
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
Using the symmetry before doing any algebra saves effort and eliminates the risk of an arithmetic slip in the endpoint values.
A Reliable Procedure
Take \(u=\arctan x\) and \(dv=dx\). The remaining pieces are \(du=\frac{dx}{1+x^2}\) and \(v=x\).
Write \(x\arctan x-\int\frac{x}{1+x^2}\,dx\).
Let \(w=1+x^2\), \(dw=2x\,dx\), and integrate \(\frac12\int\frac{dw}{w}\).
Replace \(w\) by \(1+x^2\) and keep the factor \(\frac12\).
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
| Integrand | Antiderivative | Valid 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\) |
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.
- 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\)
- Find an antiderivative of \(3\arctan x\). Hint: pull out the constant \(3\). Answer: \(3x\arctan x-\frac32\ln(1+x^2)\)
- Evaluate \(\int_0^{\sqrt3}\arctan x\,dx\). Hint: \(\arctan\sqrt3=\frac\pi3\) and \(\frac12\ln4=\ln2\). Answer: \(\frac{\pi\sqrt3}{3}-\ln2\)
- 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.
- Why is \(\arctan x\) chosen as \(u\) rather than \(dv\)?
- Evaluate \(\int_0^{1/\sqrt3}\arctan x\,dx\).
- Explain why \(\int_{-1}^{1}\arctan x\,dx=0\) without computing the antiderivative.
- What substitution evaluates \(\int\frac{x}{1+x^2}\,dx\), and why is no absolute value needed?
- Verify by differentiation that \(x\arctan x-\frac12\ln(1+x^2)\) is an antiderivative of \(\arctan x\).