<s>[INST] Method of partial fractions when denumerator cannot be factorized? Suppose I'm given an expression: \begin{align*} P(x) = \frac{1+x}{1-2x-x^2}. \end{align*} The denumerator cannot be readily factorized, so I found the zeros, which are \begin{align*} \lambda_1 = -1 - \sqrt{2} \qquad \lambda_2 = -1 + \sqrt{2}. \end{align*}
I want to apply the method of partial fraction to $P(x)$ now. I wanted to write \begin{align*} P(x) = \frac{1+x}{1-2x-x^2} = \frac{A}{(x- \lambda_1)} + \frac{B}{(x- \lambda_2)} \end{align*} but this equality does not hold. Since $(x-\lambda_1) (x- \lambda_2) = x^2 + 2x -1 \neq 1-2x-x^2$. So what denumerators should I choose to go with $A$ and $B$? 
 [/INST] In general when you have some factors in denumerator which is not factor-able you have to get its numerator as $ax+b$ and then equate the fractions and compute $a$ and $b$ and so on. 
</s>