<s>[INST] Let $(x-1)^3$ divides $p(x)+1$ and $(x+1)^3$ divides $p(x)-1$. Find a polynomial $p(x)$ of degree 5. Let $(x-1)^3$ divides $p(x)+1$ and $(x+1)^3$ divides $p(x)-1$. Find a polynomial $p(x)$ of degree 5.
Here's what I have tried:—

As $(x-1)^3$ divides $p(x)+1$,
$p(1)+1=0$, $p(1)=-1$
$p(-1)=1$
Letting $p(x)=a_5x^{5} + a_4x^{4} + a_3x^{3} + a_2x^{2} + a_1x + a_0$

I don't know how to proceed any further.
I think the divisibility rule is gonna be used somewhere.
 [/INST] Let $p(x)$ be of degree 5. Since $(x-1)^3|(p(x)+1)$ and $(x+1)^3|(p(x)-1)$ there exists two polynomials $f(x)=ax^2+bx+c$ and $g(x)=a_1 x^2+b_1 x +c_1$ such that 
$$ (x-1)^3f(x)-1 = p(x) = (x+1)^3g(x)+1$$
$$ (x-1)^3f(x)- (x+1)^3g(x)-2 = 0$$
$$(x-1)^3(ax^2+bx+c)- (x+1)^3(a_1 x^2+b_1 x +c_1)-2 =0 \enspace  \cdots(\ast) $$
In equation $(\ast)$, put $x=0$, we get
$-c-c_2 -2 =0$ 
Take $x=1$, $-8(a_1+b_1+c_1)-2=0$.
Take $x=-1$, $-8(-a-b+c)-2=0$
Similarily, take $x=\pm2$, and $x=\pm 3$. Finally, we will obtain $6$ linear equations in $6$ variables $a,b,c,a_1,b_1,c_1$ which can be solved by Gaussian elimination method.
</s>