<s>[INST] Find the polynomial if remainder is given If $f$ is a quintic polynomial which leaves remainder $1$ when divided by $(x-1)^3$, and $-1$ when divided by $(x+1)^3$ , then find the value of first derivative of $f$ at $x=2$.
My approach
Let $$ f = A(x-1)^5 + B(x-1)^4 + C(x-1)^3 +1 $$
Also 
$$ f = A(x+1)^5 + D(x+1)^4 + E(x+1)^3 -1$$
Is this method correct? Also I want to discuss other methods to solve these kind of problems.
 [/INST] Another approach is the extended Euclidean algorithm to find the quintic $f,$ although there is now the possibility of fractions:
$$  \left(   x^{3}  + 3 x^{2}  + 3 x  + 1 \right)  \left(   \frac{ 3 x^{2}  - 9 x  + 8 }{ 16 }  \right)  -  \left(   x^{3}  - 3 x^{2}  + 3 x  - 1 \right)  \left(   \frac{ 3 x^{2}  + 9 x  + 8 }{ 16 }  \right)  =  \left( 1  \right)  $$ 
=================================================
$$  \left(   x^{3}  + 3 x^{2}  + 3 x  + 1 \right)  $$ 
$$  \left(   x^{3}  - 3 x^{2}  + 3 x  - 1 \right)  $$ 
$$  \left(   x^{3}  + 3 x^{2}  + 3 x  + 1 \right)  =  \left(   x^{3}  - 3 x^{2}  + 3 x  - 1 \right)  \cdot \color{magenta}{  \left( 1  \right) } +  \left(  6 x^{2}  + 2 \right)  $$ 
 $$  \left(   x^{3}  - 3 x^{2}  + 3 x  - 1 \right)  =  \left(  6 x^{2}  + 2 \right)  \cdot \color{magenta}{  \left(   \frac{  x  - 3 }{ 6 }  \right) } +  \left(   \frac{ 8 x  }{ 3 }  \right)  $$ 
 $$  \left(  6 x^{2}  + 2 \right)  =  \left(   \frac{ 8 x  }{ 3 }  \right)  \cdot \color{magenta}{  \left(   \frac{ 9 x  }{ 4 }  \right) } +  \left( 2  \right)  $$ 
 $$  \left(   \frac{ 8 x  }{ 3 }  \right)  =  \left( 2  \right)  \cdot \color{magenta}{  \left(   \frac{ 4 x  }{ 3 }  \right) } +  \left( 0 \right)  $$ 
 $$ \frac{ 0}{1} $$ 
 $$ \frac{ 1}{0} $$ 
 $$ \color{magenta}{  \left( 1  \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left( 1  \right) }{ \left( 1  \right) } $$ 
 $$ \color{magenta}{  \left(   \frac{  x  - 3 }{ 6 }  \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left(   \frac{  x  + 3 }{ 6 }  \right) }{ \left(   \frac{  x  - 3 }{ 6 }  \right) } $$ 
 $$ \color{magenta}{  \left(   \frac{ 9 x  }{ 4 }  \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left(   \frac{ 3 x^{2}  + 9 x  + 8 }{ 8 }  \right) }{ \left(   \frac{ 3 x^{2}  - 9 x  + 8 }{ 8 }  \right) } $$ 
 $$ \color{magenta}{  \left(   \frac{ 4 x  }{ 3 }  \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left(   \frac{  x^{3}  + 3 x^{2}  + 3 x  + 1 }{ 2 }  \right) }{ \left(   \frac{  x^{3}  - 3 x^{2}  + 3 x  - 1 }{ 2 }  \right) } $$ 
 $$  \left(   x^{3}  + 3 x^{2}  + 3 x  + 1 \right)  \left(   \frac{ 3 x^{2}  - 9 x  + 8 }{ 16 }  \right)  -  \left(   x^{3}  - 3 x^{2}  + 3 x  - 1 \right)  \left(   \frac{ 3 x^{2}  + 9 x  + 8 }{ 16 }  \right)  =  \left( 1  \right)  $$ 
</s>