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.
$f$ is our quintic polynomial, and we have the following: $$f=g \cdot (x-1)^3+1 \tag{1}$$ $$f = h \cdot (x+1)^3-1 \tag{2}$$ Where $g$ and $h$ are quadratic polynomials.
Now, since we require $f'(2)$, let's just differentiate these 2 descriptions of $f$, and let's note that since $f$ is quintic, $f'$ is biquadratic. Therefore, we get $$f'=(x-1)^2(g' \cdot (x-1)+3g) \tag{3}$$ $$f'=(x+1)^2(h' \cdot (x+1)+3h) \tag{4}$$ From $(3),(4)$ we see that $1$ and $-1$ are double roots of $f'(x)$. Therefore, necessarily $$f'(x)=K(x-1)^2(x+1)^2=K(x^2-1)^2=K(x^4 - 2x^2 +1) \tag{5}$$ $$\implies f(x)=K\left(\frac{x^5}{5}-\frac{2x^3}{3}+x\right)+C$$ $$(1) \implies 1=f(1)=K\left(\frac{1}{5}-\frac{2}{3}+1\right)+C=\frac{8K}{15}+C \tag{6}$$ $$(2) \implies -1=f(-1)=K\left(-\frac{1}{5}+\frac{2}{3}-1\right)+C=-\frac{8K}{15}+C \tag{7}$$
From $(6),(7)$, we get $$C=0,\ K = \frac{15}{8} \implies f'(x)=\frac{15}{8}(x^2-1)^2, \ \ f(x)=\frac{1}{8}(3x^5 - 10x^3 + 15x)$$
And from $(5)$, we get $$f'(2)=\frac{15\cdot 9}{8}$$