If $f(x) = (x-a)^3(x-b)^3$ then what is the nature of the roots of $f^{\prime\prime}(x) = f^\prime (x)$? If we try solving it by finding $f''(x)$ then it is very long and difficult to do, so my teacher suggested a way of doing it, he said find nature of all the roots of $f(x) =f'(x)$, and on finding nature of the roots we got them to be real(but not all distinct) and then he said as all the roots of $f(x) = f'(x)$ are real so all the roots of $f'(x)= f''(x)$ are real and distinct. I did not understand how to prove that if all the roots of $f(x) = f'(x)$ are real so all the roots of $f'(x)= f''(x)$ are real and distinct.Can anyone please help me to prove this?
Is this  statement (all roots of $f(x) = f'(x)$ are real so all roots of $f'(x)= f''(x)$ are real and distinct) true only for this question or is it true in general for all function $f(x)$ whose all roots of $f(x) = 0$ are real?
If instead of $f(x) = (x-a)^3(x-b)^3$ we had $f(x) = (x-a)^4(x-b)^4$ 
then would we say that as all roots of $f(x) = f'(x)$ are real so all the roots of $f'(x)= f''(x)$ are real and distinct or rather we would say that as  all roots of $f(x) = f'(x)$ are real so all roots of $f'(x)= f''(x)$ are real.
If anyone has any other way of solving this question
$f(x) = (x-a)^3(x-b)^3$ then what is the nature of the roots of $f''(x) = f'(x)$ please share it.
 A: Recall the Leibnitz differentiation formula
$$(fg)^{(n)}=\sum_{k=0}^n f^{(k)} g^{(n-k)}$$
Then 
$$\left( (x-a)^3(x-b)^3 \right)'=3(x-a)^2(x-b)^3+3(x-a)^3(x-b)^2=3(x-a)^2(x-b)^3[x-a+x-b]$$
$$\left( (x-a)^3(x-b)^3 \right)''=6(x-a)(x-b)^3+18(x-a)^2(x-b)^2+6(x-a)^3(x-b)=6(x-a)(x-b)[(x-a)^2+3(x-a)(x-b)+(x-b)^2] 
$$
Equating them, you get $x=a, x=b$ as solutions together with the roots of 
$$(x-a)(x-b)[x-a+x-b]=2[(x-a)^2+3(x-a)(x-b)+(x-b)^2] $$
This is a cubic equation, for which the nature of the roots can be easily studied.
Note that if you have instead $(x-a)^n (x-b)^m$ you would still end up with acubic, after canceling $(x-a)^{n-2} (x-b)^{m-2}$. If I didn't make any misatke, your cubic would be
$$(x-a)(x-b)[m(x-a)+n(x-b)]=2[m(m-1)(x-a)^2+2mn(x-a)(x-b)+n(n-1)(x-b)^2] $$ 
A: Proof the roots are real and distinct
We can scale the axes and translate the curve so that, without loss of generality, the function is $f(x)=(x-1)^3(x+1)^3$.
Then  $f'(x)=6x(x-1)^2(x+1)^2, f''(x)=6(x-1)(x+1)(5x^2-1)$.
Then the roots are $-1,1$ and the roots of $x^3-5x^2-x-1=0$ which are real and distinct as required.
A: Answer to subsidiary question
When you say $f'(x)=f(x)$ you simply mean that they are equal for some specific roots. That does not mean their derivatives are equal.
