# Integration by Parts of Inverse Tangent

1. Aug 27, 2009

### James98765

1. The problem statement, all variables and given/known data
I must evaluate the indefinite integral:
$$\int x \arctan{x} dx$$

2. Relevant equations
I am using the following format to perform the integration:
$$\int u dv = uv - \int v du$$

3. The attempt at a solution
I have tried working the problem substituting x in for u and arctan in for dv and here is my work:

$$Let \ u=x; \ du = dx$$
$$Let \ v = \arctan{x} - \frac{1}{2} \ln{(1 + x^2)}; \ dv = \arctan{x}$$
$$\int x \arctan{x} dx = x (x \arctan{x} - \frac{1}{2} \ln{(1 + x^2)}) - \int (x \arctan{x} - \frac{1}{2} \ln{(1 + x^2)}) dx$$
$$2 \int \arctan{x} dx = x (x \arctan{x} - \frac{1}{2} \ln{(1 + x^2)}) + \int \frac{1}{2} \ln{(1 + x^2)} dx$$

I then apply another integration by parts technique:

$$Let \ u = \frac{1}{2} \ln{(1 + x^2)}; \ Let \ du = \frac{x}{1 + x^2} dx$$
$$Let \ v = x; \ Let \ dv = dx$$
$$\int \frac{1}{2} \ln{(1 + x^2)} dx = \frac{1}{2} x \ln{(1 + x^2)} - \int \frac{x}{1 + x^2} dx$$
$$\int \frac{1}{2} \ln{(1 + x^2)} dx = \frac{1}{2} x \ln{(1 + x^2)} - \frac{1}{2} \ln{(1 + x^2)}$$

I then substitute the second integration into the first and obtain:

$$\int x \arctan{x} dx = x (x \arctan{x} - \frac{1}{2} \ln{(1 + x^2)}) - \frac{1}{2} x \ln{(1 + x^2)} - \frac{1}{2} \ln{(1 + x^2)}$$
$$2 \int x \arctan{x} dx = x^2 \arctan{x} - \frac{1}{2} \ln{(1 + x^2)}$$
$$\int x \arctan{x} dx = \frac{1}{2} x^2 \arctan{x} - \frac{1}{4} \ln{(1 + x^2)} + C$$

The answer in the back of the book is:

$$\int x \arctan{x} dx = \frac{1}{2} (x^2 + 1) \arctan{x} - \frac{1}{2} x + C$$

I just can't seem to find out what I am doing wrong with my integration. I graphed both the book's answer and my answer on a graphing calculator and found my answer to be wrong by a little but not by much. Could somebody show me where my technique is flawed? I don't see how the book's answer doesn't contain any natural logarthmic functions. Thank you!
-James

Last edited: Aug 27, 2009
2. Aug 27, 2009

### Дьявол

Ok, obviously you messed up the things.

First let u=arctan(x), and dv=x

What are du and v?

What do you think you should do next?

Regards.

Last edited: Aug 27, 2009
3. Aug 27, 2009

### James98765

Thanks for your help. Just after you responded I found my mistake. I have tried using the substitution you recommended before but I kept getting the wrong answer because of a small math error. Now I have found it. Thanks!
-James

4. Aug 27, 2009

### Cyosis

The mistake is not so obvious in fact although cumbersome his first partial integration was correct. Also using your suggestion you would get $\int \arctan x dx$ yet the integral he needs to solve is $\int x\arctan x dx$. The best way to do this would be u=arctan(x) and v=1/2 x^2.

That said the OPs method works as well it is just more difficult. This is where you made the error:
$$\int \frac{1}{2} \ln{(1 + x^2)} dx = \frac{1}{2} x \ln{(1 + x^2)} - \int \frac{x}{1 + x^2} dx$$

It should be:
$$\frac{1}{2} x \ln{(1 + x^2)} - \int \frac{x^2}{1 + x^2} dx$$

Last edited: Aug 27, 2009
5. Aug 27, 2009

### James98765

Thank you. That helps a lot. I have been looking at that for a long time and just couldn't find the mistake.

6. Aug 27, 2009

### Дьявол

Yep, sorry I made typo. I meant u=arctan(x) and dv=x, so that v=x^2/2

Regards.

You're welcome!