# Integral with trig substitution

1. Mar 10, 2013

### hahaha158

1. The problem statement, all variables and given/known data

∫(x+1)/((x^2+1)^2)

2. Relevant equations

3. The attempt at a solution

I have been able to seperate this into 2

∫x/(x^2+1)^2 dx which i found to be equal to (1/2)arctanx

and

∫1/(x^2+1)^2 dx which i am unable to find

What i did was sub in x=tanθ and dx=sec^2(θ)dθ, and with this i was able to get the integral to the form

∫1/sec^2(θ)dθ=∫cos^2(θ)dθ =

∫(1+cos2θ)/2

I then seperated this into two integrals

∫1/2=θ/2

and

∫cos2θ/2 = sin2θ/4

However, the answer given is (x-1)/(2(x^2+1)+C

I am not sure how to get to this answer from

θ/2+sin2θ/4+C, i tried subbing in θ=arctanx and i get a very messy equation

arctanx/2+sin(2arctanx)/4+C

I was able to simplify it to

cosx/2sinx+sin(2cosx/sinx)/4+C, and i can't get any farther twoards the answer.

Can anyone please explain how i get there or did i make a mistake somewhere in my work?

Thanks very much

Last edited: Mar 10, 2013
2. Mar 10, 2013

### LCKurtz

For what it's worth, their answer is certainly wrong because it surely must have an arctan(x) term. Maple gives:

[(1/4)(4x-2)/(x^2+1)] + arctan(x)

3. Mar 10, 2013

### hahaha158

oops i entered the original question incorrectly, it should be 1+x on the top rather than 2+x, also the answer i wrote was for one part of the integral only, not the ansewr to the whole question, i should have clariified sorry.

4. Mar 10, 2013

### SammyS

Staff Emeritus
$\displaystyle \int \frac{x}{(x^2+1)^2}\,dx\ne\frac{1}{2}\arctan(x)$

Use substitution to evaluate this integral. Let u = x2 + 1 ...

For $\displaystyle \int \frac{1}{(x^2+1)^2}\,dx\,,\$ write the integrand as $\displaystyle \frac{x^2+1}{(x^2+1)^2}-\frac{x^2}{(x^2+1)^2}\ .\$

The first term gives the arctan part of the result. For the second term, do integration by parts, with u = x, dv = ...