<s>[INST] Finding a polynomial $f(x)$ of degree 5 such that $f(x)$ is divisible by $x^3$ and $f(x)+2$ is divisible by $(x+1)^3.$ There is some polynomial $f(x)$ of degree $5$ such that both of these properties hold:
$f(x)$ is divisible by $x^3$.
$f(x)+2$ is divisible by $(x+1)^3.$
Find that polynomial.
I know that because $f(x)$ is divisible by $x^3$ our polynomial is in the form of $ax^5+bx^4+cx^3.$ However, I'm not very sure how our second condition comes into use. Any help?
 [/INST] Consider the equality
$$(x - (x+1) )^5 = -1$$
and expand getting
$$x^5 - 5 x^4 (x+1) +10 x^3 (x+1)^2- 10 x^2 (x+1)^3 +5 x (x+1)^4 - (x+1)^5 = -1$$
or
$$x^5 - 5 x^4 (x+1) + 10 x^3 (x+1)^2 = -1 + (x+1)^3 Q(x)$$
Therefore the  polynomial is
$$2 x^3( x^2 - 5 x(x+1) + 10 (x+1)^2)$$
</s>