How to find factors of $g(x)$? Let $$f(x)=g(x) |x-1| |x-2| |x-3|^2 |x-4|^3.$$
If $g(x)=x^3+ax^2+bx+c$, $f(x)$ differentiable for all $x$ and
$f'(3)+f'''(4)=0$, then find the factors of $g(x)$.
So this is how I proceeded:
Since $f(x)$ is differentiable for all $x$ it can be verified by the first principle that $x-1$ and $x-2$ are factors of $g(x)$, otherwise $f(x)$ would become non-differentiable at $x=1$ and $x=2$.
I also found out that the value of $f'(3)$ should be $0$. So $f'''(4)=0$.
I don't know how to proceed after this.
How do I find the third factor?
 A: You already know that $g(x) = (x-1)(x-2)(x-\lambda)$ for some real $\lambda$. Now if you assume $\lambda \neq 4$ and differentiate $f$ three times at $4$, you get :
$$f'''(4) = 36 g(4) \neq 0 $$
But you know that $f'''(4) = 0$, so it is a contradiction. Therefore, you must have $4$ as last factor of $g$, and you can check that this $g$ fits.
EDIT : Actually, if $4$ is not a factor of $g$, you can't compute $f'''(4)$ ! My computation was, for $x \geq 4$ :
$$ f(x) = (x-4)^3 * \left( g(x) (x-1)(x-2)(x-3)^2 \right) $$
and then using Leibniz's formula :
$$ f'''(x) = 6 * \left( g(x) (x-1) (x-2) (x-3)^2 \right) + (x-4) * h(x) $$
for a certain function $h$. Therefore, the right-hand derivative at $4$ is indeed $f'''(4) = 6 g(4) * 3*2 = 36g(4)$.
You can do the same computation on the left side and find actually $f'''(4) = -36g(4)$. In any case, it is not $0$, but actually $f'''$ is even ill-defined at $x = 4$ unless $4$ is a factor of $g$.
A: In fact you can immediately conclude that the third factor is $x-4$:
$f(x) = g(x)h(x)$ where $g$ is polynomial and $h$ is a  function that is locally polynomial and not differentiable in $x=1,2$, once cont. diff. in $x=3$ and twice cont. diff. in $x=4$.
So since $f$ is supposed to be differentiable in $x=1,2$ we need to have $g(x) = 0$ (as else $g(y)h(y)$ would behave like $(g(x)+g'(x)(y-x)+R(y-x))h(y)$ with $g(x)\neq 0$, which would not be differentiable in $x$ as $\ldots / (y-x) \sim g(x)h(y) / (y-x)$).
But similarly we are assuming that $f$ is three times differentiable in $x=4$ (else the whole task does not make any sense). By a similar argument this implies that $g(4) = 0$ (obviously this reduces to $f''(x)g(x)$ being differentiable in $x=4$ as we know $f'(x)g'(x)$ and $f(x)g''(x)$ are diff. in $x=4$. But this allows us to use the same argumentation as before.).
