<s>[INST] derive the Maclaurin series by using partial fractions. derive the Maclaurin series for the function
$(x^3+x^2+2x-2)/(x^2-1)$ by using partial fractions and a known Maclaurin series.
question.
how can I use partial fractions in this case?
Is this case the special one?
plz provide me a hint. thanks.
 [/INST] Using polynomial long division:
$$\frac{(x^3+x^2+2x-2)}{(x^2-1)}=x + 1 + \frac{3x-1}{x^2-1}$$
For partial fraction decomposition, think of it as the inverse of finding a common denominator for two fractions: first factor the denominator:
$$x + 1 + \frac{3x-1}{x^2-1} = x + 1 + \frac{3x-1}{(x - 1)(x+ 1)}$$ 
Then we split the fraction into the sum of two partial fractions, setting up the decomposition to solve for the constants $A$ and $B$: 
$$x + 1 + \frac{3x-1}{(x - 1)(x+ 1)} = \frac A{x-1} + \frac B{x + 1}$$
Now, we know that $$A(x+1) + B(x - 1) = (A + B)x + (A - B) = 3x - 1 $$ $$\iff A+ B = 3 \;\; \text{and}\;\; A - B = -1$$
So solving for the system of equations in $A, B$: $$A = B - 1 \implies 2B - 1 = 3 \iff B = 2 \implies A = 1$$
Using these values, we have that $$\frac{(x^3+x^2+2x-2)}{(x^2-1)}=x + 1 + \frac 1{x-1} + \frac 2{x + 1}$$
With practice, partial fraction decomposition becomes easier (as with any skill), and there are "short-cuts" you'll pick up along the way that can simplify the process.
</s>