## anonymous 4 years ago Integrate (x^2 - 2x -1) / ( (x-1)^2 * (x^2 +1) ).

1. TuringTest

factor the top and see what happens

2. anonymous

ok, let me try that...

3. anonymous

I dont think the top can be reduced any further

4. TuringTest

oh I read a plus... my mistake

5. anonymous

Partial fraction not helping?

6. TuringTest

yeah, I was trying to avoid it I completed the square on the top which let me split the integral into 1/(x^2+1)-2/[(x-1)^2(x^2+1)] I suppose you could do partial fractions on the second part, but it will be annoying

7. anonymous

I'm not sure how to begin splitting it for partial fractions. I'm wondering if I should write it as A/(x-1)^2 + B/(x^2 + 1) or A/(x-1) + B/(x-1) + C/(x^2 + 1).

8. anonymous

ok

9. TuringTest

I am trying A/(x-1) + B/(x-1)^2 + (Cx+D)/(x^2 + 1) you need the x on top for the squared x in the denom

10. TuringTest

do you see how I split the integral up in the first place by completing the square on top?

11. anonymous

yes

12. TuringTest

so then it's just this ugly PF thing... I'm gonna collect terms and give it to wolf to solve I think

13. anonymous

ok

14. anonymous

I'll be right back in 6 minutes.

15. TuringTest

ok I got A=1 B=-1 C=-1 D=0 so we should be able to do this now

16. anonymous

ok

17. TuringTest

yes, that works, I checked it with wolf. Want me to write out the whole thing or are you good?

18. anonymous

If you could write it out, i'd really appreciate it.

19. TuringTest

ok, but I'm not going to show all the partial fractions stuff... here we go:

20. anonymous

i'm still getting use to PF, so if u can, that would be great.

21. anonymous

but i understand the rest of what you wrote.

22. TuringTest

there are a few ways to do it, but here's the way I did it...

23. TuringTest

oh that was great everything I did just got erased. let's try that again...

24. TuringTest

$\int\frac{x^2-2x-1}{(x-1)^2(x^2+1)}dx=\int\frac{(x-1)-2}{(x-1)^2(x^2+1)}dx$$=\int\frac{1}{x^2+1}+\frac{-2}{(x-1)^2(x^2+1)}dx$$=\int\frac{1}{x^2+1}+\frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{Cx+D}{x^2+1}dx$just looking at the PF part:$\frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{Cx+D}{x^2+1}=\frac{-2}{(x-1)^2(x^2+1)}$multiply out by the denominator on the RHS to get rid of the fractions we obtain$A(x-1)(x^2+1)+B(x-1)^2+(Cx+D)(x-1)^2=-2$distribute the parentheses:$A(x^3-x^2+x-1)+B(x^2+1)+C(x^3-2x^2+x)+D(x^2-2x+1)$collect all like terms:$x^3(A+C)+x^2(-A+B-2C+D)+x(A+C-2D)+(-A+B+D)$now because this all equals -2 we know that the all the terms with x must have a coefficient of 0, so this leads us to the system$x^3:A+C=0$$x^2:-A+B-2C+D=0$$x:A+C-2D=0$$-A+B+D=-2$we can solve this in many ways, but here I will just give it to wolfram: http://www.wolframalpha.com/input/?i=A%2BC%3D0%2C-A%2BB-2C%2BD%3D0%2CA%2BC-2D%3D0%2C-A%2BB%2BD%3D-2 so now we know that$A=1,B=-1,C=-1,D=0$which leads to$=\int\frac{1}{x^2+1}+\frac{1}{x-1}-\frac{1}{(x-1)^2}-\frac{x}{x^2+1}dx$$=\tan^{-1}x+\ln|x-1|+\frac{1}{x-1}+\frac{1}{2}\ln|x^2+1|+C$

25. TuringTest

whew! that took a while. I bet there is a faster way to solve the system. For instance letting x=1 in the formula on the 5th line leads directly to$2B=-2\to B=-1$from which we can probably solve the system through substitution, but that was giving me a headache so I gave up. Better to use techniques from linear algebra like Gaussian elimination, or Cramer's rule, but you may not know those techniques yet.

26. anonymous

ok :). Thank you so much!

27. TuringTest

welcome :)

28. TuringTest

$\int\frac{x^2-2x-1}{(x-1)^2(x^2+1)}dx=\int\frac{(x-1)-2}{(x-1)^2(x^2+1)}dx$$=\int\frac{1}{x^2+1}+\frac{-2}{(x-1)^2(x^2+1)}dx$$=\int\frac{1}{x^2+1}+\frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{Cx+D}{x^2+1}dx$just looking at the PF part:$\frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{Cx+D}{x^2+1}=\frac{-2}{(x-1)^2(x^2+1)}$multiply out by the denominator on the RHS to get rid of the fractions we obtain$A(x-1)(x^2+1)+B(x^2+1)+(Cx+D)(x-1)^2=-2$distribute the parentheses:$A(x^3-x^2+x-1)+B(x^2+1)+C(x^3-2x^2+x)+D(x^2-2x+1)$collect all like terms:$x^3(A+C)+x^2(-A+B-2C+D)+x(A+C-2D)+(-A+B+D)$now because this all equals -2 we know that the all the terms with x must have a coefficient of 0, so this leads us to the system$x^3:A+C=0$$x^2:-A+B-2C+D=0$$x:A+C-2D=0$$-A+B+D=-2$we can solve this in many ways, but here I will just give it to wolfram: http://www.wolframalpha.com/input/?i=A%2BC%3D0%2C-A%2BB-2C%2BD%3D0%2CA%2BC-2D%3D0%2C-A%2BB%2BD%3D-2 so now we know that$A=1,B=-1,C=-1,D=0$which leads to$=\int\frac{1}{x^2+1}+\frac{1}{x-1}-\frac{1}{(x-1)^2}-\frac{x}{x^2+1}dx$$=\tan^{-1}x+\ln|x-1|+\frac{1}{x-1}+\frac{1}{2}\ln|x^2+1|+C$ (there was a small typo above the last time, so I fixed it so as not to confuse you.)