Find a polynomial f(x) of degree 5 such that both of these properties hold: f(x) is divisible by x^3.
and f(x)+2 is divisible by (x+1)^3
Write your answer in expanded form (that is, do not factor f(x)
\(f(x)=x^3(ax^2+bx+c)\\ g(x)=f(x)+2=x^3(ax^2+bx+c)+2\\ g(-1)=0\quad so\\ -1(a-b+c)+2=0\\ -a+b-c+2=0\\ \boxed {c=2+b-a}\\ g(x)=x^3(ax^2+bx+2+b-a)+2\\ g(x)=ax^5+bx^4+(2+b-a)^3+2\\ \)
Next I divided that by x+1 and got
\(h(x)=ax^4+(b-a)x^3+2x^2-2x+2\)
I know h(x) must also be diviasable by (x+1) so h(-1)=0
h(-1)=a(1)+(b-a)(-1)+2(1)-2(-1)+2
h(-1)=a+(-b+a)+2+2+2
h(-1)=2a-b+6 =0
b=2a+6
\(h(x)=ax^4+(2a+6-a)x^3+2x^2-2x+2\\ h(x)=ax^4+(a+6)x^3+2x^2-2x+2\\\)
Now I divided that by (x+1)^2 = x^2+2x+1
And put the remainder = 0 hence solving for a.
I will leave you do the grunt work and some of the finishing up.
Note: This method does work but there may be a quicker way.