Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


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...

share|cite|improve this question
up vote 5 down vote accepted

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 $$


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

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

share|cite|improve this answer
You lost an exponent in the denominator. – Mike Feb 9 '13 at 6:51
@Mike: It is done. Thank you for the comment. – Mhenni Benghorbal Feb 9 '13 at 16:09

As a first step one can use partial fractions to express our integrand as $$\frac{A+Bu}{1+u^2}+\frac{C+Du}{(1+u^2)^2}.$$

Then the $Bu$ and $Cu$ yield to a simple substitution, and for the $A$ part we will get an arctan. It remains to integrate $\frac{C}{(1+u^2)^2}$. This can be done by a trigonometric substitution, or by using integration by parts.

The trigonometric substitution is the obvious $u=\tan\theta$. We then end up integrating $\cos^2\theta$. I somewhat prefer parts. The idea is to attempt to integrate $\frac{1}{1+u^2}$ (yes) by parts, letting $dv=du$ and $w=\frac{1}{1+u^2}$.

Another way: The first solution was generic, and intended to show that there is a general algorithmic procedure for such problems.

We can do it with much less machinery. The numerator is $1+u^2 +2u+1$. When we divide by $(1+u^2)^2$, we get $$\frac{1}{1+u^2}+\frac{2u}{1+u^2} +\frac{1}{(1+u^2)^2}.$$ Integrate. The first term gives $\arctan u$. The second, possibly after letting $1+u^2=v$, gives $\ln(1+u^2)$.

It remains to deal with the third term. Let $u=\tan t$. After the smoke clears, we want $\int \cos^2 t\,dt$, which is a standard integral.

share|cite|improve this answer
Thanks for the help, this was the only way I had found the right answer. Problem is, integration of partial fractions comes after trig sub in the text book, so there has to be another way still :p – RyanS Feb 9 '13 at 3:51
The first part of the answer above was the "generic" answer. For your particular problem, I have sketched a simpler way. If it is not explicit enough to follow, I will write the whole thing out. – André Nicolas Feb 9 '13 at 4:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.