Tutorials › Calculus II › Definite Integrals Involving The Inverse Tangent

Integration by Parts I · Tutorial 46 of 998

Definite Integrals Involving The Inverse Tangent

Use integration by parts to evaluate definite inverse-tangent integrals, keep track of both endpoints, and verify exact results.

Beginner 9 min read

What You'll Learn

  • Apply integration by parts directly to definite integrals involving arctan(x).
  • Evaluate the endpoint terms for arctan(x) and x arctan(x).
  • Simplify the remaining rational integral using x²/(1+x²).
  • Obtain exact values on intervals including [0, 1], [0, 2], and [-1, 1].
  • Check antiderivatives by differentiation and identify a common logarithm-factor error.

Why the endpoints matter

Integration by parts is often introduced as a way to find an antiderivative. For a definite integral, the same method has an additional feature: it keeps track of the contributions from both endpoints. That is especially useful when the integrand contains the inverse tangent, since differentiating the inverse tangent produces a simple rational function.

In this tutorial, \(\arctan x\) denotes the principal inverse tangent, whose values lie between \(-\pi/2\) and \(\pi/2\). We will evaluate definite integrals of \(\arctan x\) and \(x\arctan x\) over finite real intervals. The goal is not only to obtain an answer, but to show where each endpoint term comes from and how to check the result.

Key derivative: For every real \(x\), \(\displaystyle \frac{d}{dx}\arctan x=\frac{1}{1+x^2}\). The denominator is positive for every real \(x\), so this derivative is defined throughout the real line.

Integration by parts for a definite integral

If \(u\) and \(v\) are differentiable functions on a finite interval \([a,b]\), the product rule gives \((uv)'=u'v+uv'\). Integrating this identity from \(a\) to \(b\), and rearranging, gives the definite integration-by-parts formula:

$$ \int_a^b u(x)v'(x)\,dx = \bigl[u(x)v(x)\bigr]_a^b - \int_a^b v(x)u'(x)\,dx. $$

Here \(\bigl[u(x)v(x)\bigr]_a^b\) means \(u(b)v(b)-u(a)v(a)\). The formula applies when the functions and derivatives involved are continuous on the interval, as they are for the functions used below. This bracket notation is important: a definite integral requires evaluating the endpoint expression at the upper limit and subtracting its value at the lower limit.

Endpoint reminder: In \(\bigl[F(x)\bigr]_a^b\), always calculate \(F(b)-F(a)\). Do not omit the lower endpoint unless its value has been checked to be zero.

Deriving a formula for the inverse-tangent integral

To integrate \(\arctan x\), choose \(u=\arctan x\) and \(v'=1\). Then \(u'=1/(1+x^2)\) and \(v=x\). Substitution into integration by parts gives the definite formula below for any finite real endpoints \(a\) and \(b\):

$$ \int_a^b \arctan x\,dx = \bigl[x\arctan x\bigr]_a^b - \int_a^b \frac{x}{1+x^2}\,dx. $$

The remaining integral can be evaluated using the derivative of \(\ln(1+x^2)\). The chain rule gives \(\frac{d}{dx}\ln(1+x^2)=\frac{2x}{1+x^2}\), so the factor of \(2\) must be accounted for:

$$ \int_a^b \frac{x}{1+x^2}\,dx = \frac12\bigl[\ln(1+x^2)\bigr]_a^b. $$

Combining these expressions yields the endpoint formula. It gives an exact value whenever the endpoint values of \(\arctan\) and the logarithms can be stated exactly.

$$ \int_a^b \arctan x\,dx = \left[ x\arctan x-\frac12\ln(1+x^2) \right]_a^b. $$

This formula can also be checked directly. Differentiating its bracketed expression gives

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

Thus the expression is an antiderivative, and the Fundamental Theorem of Calculus gives the stated definite-integral formula.

Worked Example: Integrating arctan x from 0 to 1

Evaluate \(\displaystyle \int_0^1 \arctan x\,dx\). Use the endpoint formula and substitute both limits:

$$ \begin{aligned} \int_0^1 \arctan x\,dx &= \left[ x\arctan x-\frac12\ln(1+x^2) \right]_0^1\\ &= \left(1\cdot\frac{\pi}{4}-\frac12\ln 2\right) - \left(0\cdot 0-\frac12\ln 1\right)\\ &= \frac{\pi}{4}-\frac12\ln 2. \end{aligned} $$

The lower endpoint is zero because \(\arctan 0=0\) and \(\ln 1=0\). To check, differentiate \(x\arctan x-\frac12\ln(1+x^2)\); the two rational terms cancel, leaving \(\arctan x\), the original integrand.

Integrating x times the inverse tangent

For the product \(x\arctan x\), use \(u=\arctan x\) and \(v'=x\). Then \(u'=1/(1+x^2)\) and \(v=x^2/2\). Applying definite integration by parts gives

$$ \int_a^b x\arctan x\,dx = \left[\frac{x^2}{2}\arctan x\right]_a^b - \frac12\int_a^b \frac{x^2}{1+x^2}\,dx. $$

The remaining fraction can be simplified by writing its numerator as \(x^2=(1+x^2)-1\). This produces an expression whose two terms have straightforward antiderivatives:

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

Substituting this result into the definite formula gives an endpoint expression for the full integral:

$$ \begin{aligned} \int_a^b x\arctan x\,dx &= \left[ \frac{x^2}{2}\arctan x -\frac12\bigl(x-\arctan x\bigr) \right]_a^b\\ &= \left[ \frac{x^2+1}{2}\arctan x-\frac{x}{2} \right]_a^b. \end{aligned} $$

To verify this formula, let \(G(x)=\frac{x^2+1}{2}\arctan x-\frac{x}{2}\). The product rule and the derivative of \(\arctan x\) give

$$ \begin{aligned} G'(x) &= x\arctan x +\frac{x^2+1}{2}\cdot\frac{1}{1+x^2} -\frac12\\ &= x\arctan x+\frac12-\frac12\\ &= x\arctan x. \end{aligned} $$

This check confirms that the endpoint expression differentiates to the required integrand.

Worked Example: Integrating x arctan x from 0 to 1

Evaluate \(\displaystyle \int_0^1 x\arctan x\,dx\). Substituting the endpoints into \(G(x)\) gives

$$ \begin{aligned} \int_0^1 x\arctan x\,dx &= \left[ \frac{x^2+1}{2}\arctan x-\frac{x}{2} \right]_0^1\\ &= \left(\frac{2}{2}\cdot\frac{\pi}{4}-\frac12\right) - \left(\frac{1}{2}\cdot 0-0\right)\\ &= \frac{\pi}{4}-\frac12. \end{aligned} $$

As a check, the derivative of the expression in brackets is \(x\arctan x\), as shown above. The zero endpoint contributes zero, so the upper endpoint alone gives the value in this particular example.

A second interval and exact endpoint evaluation

The same formulas work when an endpoint is not a familiar special angle. The result can still be exact: it may simply contain \(\arctan 2\), rather than a rational multiple of \(\pi\). Substituting the endpoint carefully is the main task.

Worked Example: Integrating both functions from 0 to 2

First evaluate \(\displaystyle \int_0^2 \arctan x\,dx\). At \(x=2\), the endpoint expression is \(2\arctan 2-\frac12\ln 5\); at \(x=0\), it is zero. Therefore,

$$ \int_0^2 \arctan x\,dx = \left[ x\arctan x-\frac12\ln(1+x^2) \right]_0^2 = 2\arctan 2-\frac12\ln 5. $$

Next evaluate \(\displaystyle \int_0^2 x\arctan x\,dx\). The value of \(G(2)\) is \(\frac{4+1}{2}\arctan 2-\frac22=\frac52\arctan 2-1\), while \(G(0)=0\). Hence

$$ \int_0^2 x\arctan x\,dx = \left[ \frac{x^2+1}{2}\arctan x-\frac{x}{2} \right]_0^2 = \frac52\arctan 2-1. $$

Both values are exact. For a derivative check, differentiating the first bracketed expression gives \(\arctan x\), and differentiating the second gives \(x\arctan x\). Thus each endpoint evaluation corresponds to the intended integrand.

Using symmetry without losing the endpoints

The inverse tangent is an odd function: \(\arctan(-x)=-\arctan x\). Since \(x\) is also odd, their product \(x\arctan x\) is even. These properties can help with symmetric intervals, but the endpoint formulas still provide a direct check.

Worked Example: Evaluating the integrals from -1 to 1

For \(\arctan x\), evaluate the endpoint expression at \(1\) and at \(-1\):

$$ \begin{aligned} \int_{-1}^{1}\arctan x\,dx &= \left[ x\arctan x-\frac12\ln(1+x^2) \right]_{-1}^{1}\\ &= \left(\frac{\pi}{4}-\frac12\ln 2\right) - \left(\frac{\pi}{4}-\frac12\ln 2\right)\\ &=0. \end{aligned} $$

This agrees with odd symmetry: contributions at opposite points cancel. For the product, use \(G(x)=\frac{x^2+1}{2}\arctan x-\frac{x}{2}\):

$$ \begin{aligned} \int_{-1}^{1}x\arctan x\,dx &= G(1)-G(-1)\\ &= \left(\frac{\pi}{4}-\frac12\right) - \left(-\frac{\pi}{4}+\frac12\right)\\ &= \frac{\pi}{2}-1. \end{aligned} $$

The lower endpoint has been subtracted, including its negative value. As a check, \(G'(x)=x\arctan x\), and the answer is twice the value from 0 to 1 because the integrand is even: \(2(\frac{\pi}{4}-\frac12)=\frac{\pi}{2}-1\).

A common factor-of-two mistake

When evaluating \(\int \frac{x}{1+x^2}\,dx\), it is easy to overlook the factor of \(2\) produced by differentiating the denominator. For instance, the incorrect calculation \(\int \frac{x}{1+x^2}\,dx=\ln(1+x^2)\) would lead to the wrong result for the first example:

$$ \text{Incorrect:}\qquad \int_0^1\arctan x\,dx = \frac{\pi}{4}-\ln 2. $$

This answer fails a derivative check: differentiating \(x\arctan x-\ln(1+x^2)\) gives \(\arctan x-\frac{x}{1+x^2}\), not \(\arctan x\). The correction is to include the factor of \(\frac12\), because \(\frac{d}{dx}\ln(1+x^2)=\frac{2x}{1+x^2}\). Therefore, the correct calculation is

$$ \int_0^1\frac{x}{1+x^2}\,dx = \frac12\bigl[\ln(1+x^2)\bigr]_0^1 = \frac12\ln 2, \qquad \int_0^1\arctan x\,dx = \frac{\pi}{4}-\frac12\ln 2. $$

The broader lesson is to check the derivative of a proposed antiderivative, especially when a chain rule introduces a constant factor.

Choosing and checking the method

For these two integrands, the useful choices in integration by parts are consistent: take the inverse tangent as \(u\), so that differentiating it produces \(1/(1+x^2)\), and integrate the remaining factor. For \(\arctan x\), the remaining factor is \(1\); for \(x\arctan x\), it is \(x\). The second choice leads to \(x^2/(1+x^2)\), which simplifies by splitting the numerator.

On a definite integral, write the endpoint bracket explicitly before simplifying. This makes the subtraction at the lower endpoint visible and reduces sign errors. An exact answer may involve familiar constants such as \(\pi\) and logarithms, or an unevaluated exact value such as \(\arctan 2\), depending on the endpoints. In either case, differentiate the antiderivative to check the integrand, then check the endpoint substitution separately.

Check Your Understanding

Use the endpoint formulas and show the upper- and lower-endpoint contributions in each calculation.

  1. Evaluate \(\displaystyle \int_0^1\arctan x\,dx\) and verify the antiderivative by differentiation.
  2. Evaluate \(\displaystyle \int_0^1 x\arctan x\,dx\) by definite integration by parts.
  3. Write the exact value of \(\displaystyle \int_0^2\arctan x\,dx\) in terms of \(\arctan 2\) and logarithms.
  4. Evaluate \(\displaystyle \int_{-1}^{1}\arctan x\,dx\) using the endpoint formula.
  5. What factor is needed in an antiderivative of \(\frac{x}{1+x^2}\), and how can differentiation check it?

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