# Integrate using partial fractions, answer discrepancy

My attempt: \eqalign{ & \int {{{{x^2} + x + 2} \over {3 - 2x - {x^2}}}} dx \cr & {{ - 1( - {x^2} - 2x + 3) - 2x + 3 + x + 2} \over {3 - 2x - {x^2}}} \cr & = - 1 + {{ - x + 5} \over { - {x^2} - 2x + 3}} \cr & = - 1 + {{5 - x} \over { - {x^2} - 2x + 3}} \cr & = - 1 + {{x - 5} \over {{x^2} + 2x - 3}} \cr}

I think i've messed up somewhere here, when i've tried to manipulate the minus signs. Carrying on:

Finding ${{x - 5} \over {{x^2} + 2x - 3}}$ as a partial fraction:

\eqalign{ & {{x - 5} \over {{x^2} + 2x - 3}} \equiv {A \over {(x + 3)}} + {B \over {(x - 1)}} \cr & x - 5 = A(x - 1) + B(x + 3) \cr & x = 1: \cr & - 4 = 4B \cr & B = - 1 \cr & x = - 3: \cr & - 8 = - 4A \cr & A = 2 \cr & so: \cr & {{{x^2} + x + 2} \over {3 - 2x - {x^2}}} \equiv - 1 + {2 \over {(x + 3)}} - {1 \over {(x - 1)}} \cr & \int { - 1 + {2 \over {(x + 3)}} - {1 \over {(x - 1)}}dx} \cr & = - x + \ln |{(x + 3)^2}| - \ln |(x - 1)| + C \cr & = - x + \ln \left( {\left|{{{{(x + 3)}^2}} \over {(x - 1)}}\right|} \right) + C \cr}

$$\int {f(x)dx} = - x + \ln \left( {\left|{{{{(3 + x)}^2}} \over {(1 - x)}}\right|} \right) + C$$

-
Note that with the absolute values, you actually have the right answer: $\lvert x-1\rvert = \lvert 1 - x\rvert$. – Thomas May 7 '13 at 20:00
I second the comment made by @Thomas. Your answer and the one given are the same. – Suugaku May 7 '13 at 20:04
@Assad: You did everything beautifully. All they did was to distribute the negative in the term as $\frac{1}{1-x}$ before integrating. As mentioned by Thomas, this is the same. – Amzoti May 7 '13 at 20:09
Thank you everyone! – seeker May 7 '13 at 21:00

$$- x + \ln \left( {\left|{{{{(x + 3)}^2}} \over {(x - 1)}}\right|} \right) + C = - x + \ln \left( {\left|{{{{(3 + x)}^2}} \over {-(1 - x)}}\right|} \right) + C = - x + \ln \left( {\left|{{{{(3 + x)}^2}} \over {(1 - x)}}\right|} \right) + C =$$