How prove : polynomial $P(x)=W^{\prime \prime}(x) +(W^\prime(x))^2$ have a real root. Let $W(x)$ be a polynomial of degree> 2 having at least three different real roots. How prove : polynomial $P(x)=W^{\prime \prime}(x) +(W^\prime(x))^2$ have a real root?

Whether the assumption of the theorem can be weakened?
 A: Consider the function $\phi\colon\mathbb{R}\to\mathbb{R}$, defined by $\phi(x)=e^{W(x)}$, and calculate
$$
\phi'=W'e^W, \qquad \phi''=(W''+(W')^2)e^W=Pe^W.
$$
Thus we have to prove that $\phi''(d)=0$ for some $d\in\mathbb{R}$.
We know that $\exists a<b<c\in\mathbb{R}$ such that $\phi(a)=\phi(b)=\phi(c)=1$.  Rolle's theorem gives that there exist $a_1\in[a,b]$ and $b_1\in[b,c]$ such that $\phi'(a_1)=\phi'(b_1)=0$. Applying the theorem again to $\phi'$ we get what we need.
A: Consider $f(x)=e^{W(x)}$ 
Then $f'(x)=W'(x)e^{W(x)}$  
$f''(x)=((W'(x))^2+W''(x))e^{W(x)}=P(x)e^{W(x)}$
Suppose $W(x)$ has roots $a<b<c \Rightarrow f(a)=f(b)=f(c)=1\\ \Rightarrow \exists k\in(a,b),j\in(b,c)\  \ f'(k)=f'(j)=0 \\ \Rightarrow \exists r \in (k,j) \ f''(r)=0 \\ \Rightarrow P(r)=0$
The proof is completed.
In fact, check the process of above proof , the condition '$W(x)$ is a polynomial' is useless. This assumption can be weaken by '$W(x)$  $\in C^2[a,c]$'
A: Hint: Suppose that $W(x)$ has at least 3 different real roots called $a,$ $b$ and $c$ so $W(x)= (x-a)(x-b)(x-c) g(x)$ where $\deg(g)=\deg(W)-3$ and $g(a),$ $g(b)$ and $g(c)$ is non zeros. Then, you can compute find the expression of $P(x)$ in terms of $(x-a),$ $(x-b)$ and $(x-c).$
A: By assumption (a,b,c being different reals)
$$W(x)=(x-a)(x-b)(x-c)Q(x)$$
then
$$W'(x)=((x-b)(x-c)+(x-a)(x-c)+(x-a)(x-b))Q(x)+(x-a)(x-b)(x-c)Q'(x) \\
=(3x^2-2(a+b+c)x+ab+bc+ac) Q(x)+(x^3-(a+b+c)x^2 + (ab+bc+ac)x -abc) Q'(x)$$
and
$$W''(x)=(2(x-c)+2(x-a)+2(x-b))Q(x)+(x-a)(x-b)(x-c)Q''(x)+2((x-b)(x-c)+(x-a)(x-c)+(x-a)(x-b)) Q'(x) \\
=(6x-2(a+b+c)) Q(x) + (x^3-(a+b+c)x^2 + (ab+bc+ac)x -abc) Q'' + 2 (3x^2-2(a+b+c)x+ab+bc+ac) Q'(x)$$
Since we do not know Q any root of $P(x)$ must be a root of the "prefactor" polynomials
$$ 3x^2-2(a+b+c)x+ab+bc+ac) = 0 \\
x^3-(a+b+c)x^2 + (ab+bc+ac)x -abc = 0\\
6x-2(a+b+c) = 0 $$
And here I ran out of time and motivation.. Also no guarantee that any of that is correct, but should suffice
