<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] A degree $5$ polynomial divisible by $(x+1)^3$ is of the form
$$(x+1)^3(ax^2+bx+c)$$
Expand, subtract $2$, and see when this is a multiple of $x^3$.
</s>