<s>[INST] Partial fraction when $N^r$ and $D^r$ are quadratic and cubic polynomials I need to find the nth derivative of the following function
$$y=\frac {x^2+4x+1}{x^3+2x^2-x-2}$$
The trouble is I don't know how to break a fraction like the above one. How do I break it into partial fractions? Or is there any other way to calculate it's nth derivative(leibnitz theorem?) without breaking it into partial fractions? Thanks in advance.
 [/INST] As $x^3+2x^2-x-2=x^2(x+2)-1(x+2)=(x+2)(x^2-1)=(x+2)(x-1)(x+1)$
and the order of the numerator is less than that of denominator
Using  Partial Fraction Decomposition,
$$\frac {x^2+4x+1}{x^3+2x^2-x-2}=\frac A{x+2}+\frac B{x-1} +\frac C{x+1}$$ where $A,B,C$ are arbitrary constants 
Multiply either sides by $x^3+2x^2-x-2$ and compare the constants and the coefficients of the different powers of $x$ to determine  $A,B,C$ 
</s>