<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] If $f(x)+2=ax^5+bx^4+cx^3+2=(x^3+3x^2+3x+1)(dx^2+ex+f)$,
then multiplying out and equating coefficients yields
$a=d, b=e+3d, c=f+3e+3d, 0=d+3e+3f, 0=e+3f,$ and $ 2=f$.
This system is easy to solve for $a, b, c, d, e, $ and $f, $
and then the answer is $f(x)=ax^5+bx^4+cx^3$.
</s>