Integral of x arctan(x) (Parts Integration Guide)
To evaluate (\int x\arctan(x)\,dx), use integration by parts with (u=\arctan x) and (dv=x\,dx). This gives (\frac{x^2}{2}\arctan x-\frac12\int\frac{x^2}{1+x^2}\,dx). Rewrite the fraction as (1-\frac1{1+x^2}), then integrate. The result is (\frac{x^2+1}{2}\arctan x-\frac{x}{2}+C).
Why does this integral need more than a power rule? Because its integrand combines (x) with (\arctan x), and neither factor alone tells you how to integrate the product directly. Integration by parts separates the factors and turns the problem into simpler pieces. I’ll show each step, explain the sign-sensitive algebra, and check the answer by differentiating it.
Prerequisites and method selection
Before starting, know that (\arctan x) is the inverse tangent function, its derivative is (\frac{1}{1+x^2}), and (\int x\,dx=\frac{x^2}{2}). These facts make integration by parts a natural choice: differentiating (\arctan x) gives a simple fraction, while integrating (x) is straightforward.
Integration by parts follows the product rule in reverse:
[ \int u\,dv=uv-\int v\,du. ]
The method works best when one factor becomes simpler after differentiation and the other is easy to integrate. Here, differentiating (\arctan x) removes the inverse-function notation and produces a familiar rational expression. Integrating (x) only requires the power rule.
Why choose (u=\arctan x)?
The choice of (u) matters because it determines what you differentiate. For this integral, set
[ u=\arctan x,\qquad dv=x\,dx. ]
Then
[ du=\frac{1}{1+x^2}\,dx,\qquad v=\frac{x^2}{2}. ]
A common alternative is to assign (u=x) and (dv=\arctan x\,dx). That makes the second part harder, since integrating (\arctan x) requires another integration-by-parts calculation. The first choice leads to a shorter route.
| Choice | What happens next? | Practical result |
|---|---|---|
| (u=\arctan x,\;dv=x\,dx) | Differentiate (\arctan x); integrate (x) | A simple rational integral remains |
| (u=x,\;dv=\arctan x\,dx) | First, find an antiderivative of (\arctan x) | Adds work before the original product is reduced |
Key takeaway: Choose the factor that becomes simpler when differentiated as (u). Here, that factor is (\arctan x).
Integration-by-parts setup and algebra
Substituting (u), (dv), (du), and (v) into the formula gives (\frac{x^2}{2}\arctan x-\frac12\int\frac{x^2}{1+x^2}\,dx). The remaining fraction is the key step: rewrite it as (1-\frac1{1+x^2}) before integrating, so each term has a familiar antiderivative.
Start with the formula:
[ \int x\arctan x\,dx =u v-\int v\,du. ]
Now substitute the chosen values:
[ \int x\arctan x\,dx =\frac{x^2}{2}\arctan x -\int \frac{x^2}{2}\cdot\frac{1}{1+x^2}\,dx. ]
Move the constant (\frac12) outside the integral:
[ \int x\arctan x\,dx =\frac{x^2}{2}\arctan x -\frac12\int\frac{x^2}{1+x^2}\,dx. ]
The fraction does not match a basic integral at first glance. Rewrite its numerator using the denominator:
[ x^2=(1+x^2)-1. ]
Therefore,
[ \frac{x^2}{1+x^2} =\frac{(1+x^2)-1}{1+x^2} =1-\frac{1}{1+x^2}. ]
This is the key algebra step. It turns the remaining integral into two standard pieces:
[ \int\frac{x^2}{1+x^2}\,dx =\int\left(1-\frac{1}{1+x^2}\right)\,dx =x-\arctan x. ]
So the expression becomes
[ \int x\arctan x\,dx =\frac{x^2}{2}\arctan x-\frac12(x-\arctan x)+C. ]
Distribute the negative sign and collect the (\arctan x) terms:
[ \boxed{\int x\arctan x\,dx =\frac{x^2+1}{2}\arctan x-\frac{x}{2}+C.} ]
Here, (C) is the constant of integration. It is included because the derivative of any constant is zero, so many antiderivatives share the same form.
Key takeaway: The rewrite (\frac{x^2}{1+x^2}=1-\frac{1}{1+x^2}) makes the leftover integral manageable. Keep the minus sign in front of the remaining integral as you simplify.
Worked solution, verification, and common errors
The antiderivative is not complete until you include (+C) and check that its derivative returns the original integrand. Differentiating the boxed result confirms the answer: the extra terms cancel, leaving (x\arctan x). This check also helps catch errors in the sign or coefficient.
Let
[ F(x)=\frac{x^2+1}{2}\arctan x-\frac{x}{2}. ]
Differentiate the product in the first term using the product rule:
[ F'(x) =x\arctan x +\frac{x^2+1}{2}\cdot\frac{1}{1+x^2} -\frac12. ]
The middle term simplifies:
[ \frac{x^2+1}{2}\cdot\frac{1}{1+x^2}=\frac12. ]
Thus,
[ F'(x)=x\arctan x+\frac12-\frac12=x\arctan x. ]
The derivative matches the original integrand, so the antiderivative is verified.
Errors to watch for
I find it useful to check three points before moving on:
- Using the wrong derivative: (\frac{d}{dx}\arctan x=\frac{1}{1+x^2}), not (\frac1x).
- Losing the minus sign: The formula includes (-\int v\,du). That minus sign carries through the remaining integral.
- Skipping the fraction rewrite: Integrating (\frac{x^2}{1+x^2}) as if it were simply (1) drops a term. The correct expression is (1-\frac1{1+x^2}).
- Forgetting (C): An indefinite integral needs a constant of integration.
A useful way to catch a sign error is to differentiate your final expression. If the leftover terms do not cancel, revisit the algebra or the integration-by-parts formula.
Definite integral: apply the bounds afterward
For a definite integral, first use the antiderivative, then substitute the upper and lower limits. If the limits are (a) and (b), then
[ \int_a^b x\arctan x\,dx=F(b)-F(a), ]
where
[ F(x)=\frac{x^2+1}{2}\arctan x-\frac{x}{2}. ]
The constant (C) is not needed in the final difference because it cancels:
[ [F(b)+C]-[F(a)+C]=F(b)-F(a). ]
For example, on the interval ([0,1]),
[ \int_0^1 x\arctan x\,dx=F(1)-F(0). ]
Since (\arctan(1)=\frac{\pi}{4}) and (\arctan(0)=0),
[ F(1)=\frac{2}{2}\cdot\frac{\pi}{4}-\frac12 =\frac{\pi}{4}-\frac12, \qquad F(0)=0. ]
Therefore,
[ \int_0^1 x\arctan x\,dx=\frac{\pi}{4}-\frac12. ]
Key takeaway: For a definite integral, find the antiderivative first, then evaluate upper limit minus lower limit.
Applying the method to related integrals
The same reasoning can help with other products that pair a polynomial with an inverse trigonometric function. The exact choice of (u) depends on the integrand, but the general test stays the same: look for a factor that becomes simpler when differentiated and another that is easy to integrate.
For example, in (\int x^3\arctan x\,dx), choosing (u=\arctan x) and (dv=x^3\,dx) again gives a simple derivative for (u). The remaining integral is different, but the setup follows the same formula. This example illustrates the method; it does not mean every related integral will reduce in one step.
When you face a new product, use this short plan:
- Identify two factors and choose which one to differentiate.
- Compute (du) and (v) before substituting.
- Apply (\int u\,dv=uv-\int v\,du), keeping the minus sign.
- Simplify the new integrand before trying to integrate it.
- Differentiate your result to check it.
The method is a process, not a trick. Showing the setup makes it easier to spot where an error begins and to reuse the same reasoning on the next problem.
Key takeaway: Integration by parts is most useful when the new integral is simpler than the original one. Always judge the choice by what remains after substitution.
Frequently asked questions
These answers summarize the main steps for integrating (x\arctan x), including the correct parts setup, the needed algebra, and the final check. Use them to review a calculation or identify the step that may have caused an error.
What is (\int x\arctan x\,dx)?
[ \int x\arctan x\,dx =\frac{x^2+1}{2}\arctan x-\frac{x}{2}+C. ]
The constant (C) is required for an indefinite integral.
Which parts should I choose?
Choose (u=\arctan x) and (dv=x\,dx). Then (du=\frac{1}{1+x^2}\,dx) and (v=\frac{x^2}{2}). This choice makes the remaining integral easier to simplify.
Why is (du=\frac{1}{1+x^2}\,dx)?
The derivative of (\arctan x) is (\frac{1}{1+x^2}). Including (dx) gives its differential, (du), for use in the integration-by-parts formula.
How do you simplify (\frac{x^2}{1+x^2})?
Write (x^2=(1+x^2)-1). Then
[ \frac{x^2}{1+x^2}=1-\frac{1}{1+x^2}. ]
This turns the expression into terms with direct antiderivatives.
Why does the answer include (\arctan x) twice during the work?
One (\arctan x) appears in the product term from (uv). Another comes from integrating (\frac{1}{1+x^2}). Combining them produces the factor (\frac{x^2+1}{2}\arctan x).
How can I check the antiderivative?
Differentiate (\frac{x^2+1}{2}\arctan x-\frac{x}{2}). The product rule creates a (\frac12) term, which cancels with the derivative of (-\frac{x}{2}). What remains is (x\arctan x).
Do I include (+C) in a definite integral?
No. A constant cancels when you subtract the antiderivative at the lower limit from its value at the upper limit. You should include (+C) when writing an indefinite integral.
What is the most common mistake?
A frequent mistake is to treat (\frac{x^2}{1+x^2}) as (1). It is (1-\frac{1}{1+x^2}). Dropping the second term changes the answer; differentiating the final expression can reveal the error.
(This article was written by one of our staff writers, Alan Westbrook. Visit our Meet the Team page.)
