How to solve for polynomial fractions? I'm self-studying. I have this problem I can't wrap my head around.
$\frac{x}{x+1} + \frac{4}{1-x} + \frac{x^2-5x-8}{x^2-1}$
The answer is $\frac{2\left(x-6\right)}{x-1}$
How do I get that answer? I keep getting $2(x^2-5x-2)$...
This is how I solved it:
$\frac{x}{x+1}-\frac{4}{x+1}+\frac{x^2-5x-8}{x^2-1}$
$=\frac{x-4+x^2-5x-8}{(x+1)(x-1)}$
$=\frac{x(x-1)-4(x-1)+x^2-5x-8}{(x+1)(x-1)}$
= $2(x^2−5x−2)$
I see the problem now!
$\frac{4}{1-x}$ = $\frac{4}{x-1}$   ...not $\frac{4}{x+1}$
because when I multiply the denominator by -1, the result is...
$-(1-x) = -1+x = x-1$ 
_thus_$\,\, \frac{4}{1-x}$ _becomes_$ \frac{4}{x-1}$
and then I changed the sign of the fraction from plus to minus $-\frac{4}{x-1}$ to keep the fraction equal to the original.
Solved!

Find the common denominator, and simplify. (You'll be able to utilize the fact that $x^2-1$ is a difference of squares: $$x^2 - 1= (x+1)(x-1)$$
$$\begin{align} \frac{x}{x+1} + \frac{4}{1-x} + \frac{x^2-5x-8}{x^2-1}& = \dfrac {x}{x+1}  -\frac{4}{x-1} + \frac{x^2 - 5x-8}{x^2-1}\\ \\& =\dfrac{x(x-1)-4(x+1) +x^2 - 5x -8}{x^2-1}\\ \\ &= \dfrac{x^2 - x + -4x - 4 + x^2  +x^2 -5x - 8}{x^2-1} \\ \\ &= \dfrac{2x^2 -10x -12}{(x^2-1)}\\ \\ &= \dfrac{2(x^2 - 5x-6)}{(x+1)(x-1)}\\ \\ &= \dfrac{2(x+1)(x-6)}{(x + 1)(x-1)}\\ \\ & = \dfrac{2(x-6)}{x-1}, \quad x\neq -1\end{align}$$
