[Math] Integrate $\frac{x^2+1}{(x^2-2x+2)^2}$ using trigonometric substitutions

integrationtrigonometry

I've attempted to integrate the function $\frac{x^2+1}{(x^2-2x+2)^2}$ using several techniques, but none of them are solving it nicely.

I know there must be a way to do this using trig substitution (its from that chapter of my text book), just not sure how to do it..

I've tried substituting and simplifying till:

$$\frac{(1+u)^2+1}{(1+u^2)^2}$$

Then subbing $1+u^2$ for $\sec^2(u)$ but still no luck. Anything I'm missing?

I think it might be possible to rewrite the initial function to have a $\sqrt{\cdot}$ as the denominator but not sure how to work that out…

Best Answer

Here is the trigonometric approach

$$ \int \frac{x^2+1}{(x^2-2x+2)^2}dx = \int \frac{x^2+1}{((x-1)^2+1)^2}dx = \int\frac{(1+u)^2+1}{(u^2+1)^2}du .$$

Using the substitution $u=\tan(y)$ gives

$$ \int \!{\frac { \tan\left( y \right)^{2}+2\,\tan \left( y \right) +2}{ (1+\tan\left(y\right)^{2})^2 }}{dy}$$

$$ = 2\int(\sin \left( y \right) \cos \left( y \right) + \cos \left( y \right)^{2}+1)\,{dy} =\dots $$

Notes:

$$ (1)\,\, 1+\tan(y)^2=\sec(y)^2, $$

$$ (2)\,\, \cos(2y) = 2\cos(y)^2 - 1. $$