I am doing calculus exercises but I'm in trouble with this
$$\frac{ 2x}{x-1} + \frac{3x +1}{ x-1} - \frac{1 + 9x + 2x^2}{x^2-1}$$
the solution is
$$ 3x\over x+1$$
The only advance that I have done is factor $ x^2-1$ = $( x-1)$ $ (x+1)$.
I do not know how can I factor $1 + 9x + 2x^2$, can someone please guide me in how to solve this exercise.
Notice that $$\frac{A}{B} + \frac{A'}{BC} = \frac{C}{C}\frac{A}{B} + \frac{A'}{BC} = \frac{AC + A'}{BC}$$
Then
$$\begin{align}\frac{(x+1)}{(x+1)}\frac{2x}{(x-1)}+&\frac{(x+1)}{(x+1)}\frac{3x+1}{(x-1)}+\frac{1 + 9x + 2x^2}{(x-1)(x+1)}\\&=\frac{2x(x+1) + (3x+1)(x+1) - (1+9x + 2x^2)}{(x-1)(x+1)} \\&= \frac{2x^2 + 2x + 3x^2+3x + x + 1 - 1-9x - 2x^2}{(x-1)(x+1)}\\&=\frac{3x^2 - 3x}{(x-1)(x+1)}\end{align}$$