<s>[INST] If $f(x)\mod (x-1)=5$, $f(x)\mod (x+1)=3$, $f(x)\mod (x+2)=5$ then find the remainder when $f(x)$ is divided by $x^3+2x^2-x-2$ 
If $f(x)\mod (x-1)=5$, $f(x)\mod (x+1)=3$, $f(x)\mod (x+2)=5$ then find the remainder when $f(x)$ is divided by $x^3+2x^2-x-2$    

I don't have any idea as to how to proceed with this question. I have figured out that $x^3+2x^2-x-2=(x-1)(x+1)(x+2)$.
But I don't know how to use this information to find the remainder $x^3+2x^2-x-2$ would give. A small hint as to how to proceed would be enough. 
 [/INST] The final condition implies that the divisor is of order $3$, so the remainder is of order $2$. We can write $$f(x)=(x-1)(x+1)(x+2)Q(x) +ax^2+bx+c$$ We have $f(1) =5$, so $$a+b+c=5...(1)$$ and similarly $f(-1)=3$ and $f(-2)=5$, so , $$a-b+c=3...(2)$$ and $$4a-2b+c=5$$ Solving for $a,b,c$, we get $a=1, b=1, c=3$. Hence our remainder is $$ax^2+bx+c = x^2+x+3.$$
</s>