Prove that the nth derivative of a function has two real solutions I have the function $f:\mathbb{R} \rightarrow \mathbb{R} f(x)=e^x(x^2-5x+7)$. I need to prove that $\forall n \in \mathbb{N}^*$, the equation $f^{(n)}$ has two real solutions. Where $f^{(n)}$ is the nth derivate of the function.
My idea is that this should be proved by induction but Im not sure.

Well, let's calculate a few derivatives of function $f$:


*

*$f'(x)=e^x(x^2-5x+7+2x-5)=e^x(x^2-3x+2)$,

*$f''(x)=e^x(x^2-3x+2+2x-3)=e^{x}(x^2-x-1)$,

*$f^{(3)}(x)=e^x(x^2-x-1+2x-1)=e^x(x^2+x-2)$,

*$f^{(4)}(x)=e^x(x^2+x-2+2x+1)=e^x(x^2+3x-1)$

*$f^{(5)}(x)=e^x(x^2+3x-1+2x+3)=e^x(x^2+5x+2)$


So, we can assume that
 $$f^{(k)}(x)=e^x\left(x^2+(2k-5)x+7+\sum\limits_{i=0}^{k-1}(2i-5)\right)$$
By induction, we have:


*

*From the above, it is obvious for $k=1$.

*Let us assume it is valid for $k$. Then:
$$\begin{align*}f^{(k+1)}(x)=&e^x\left(x^2+(2k-5)x+7+\sum_{i=0}^{k-1}(2i-5)+2x+2k-5\right)=\\
=&e^x\left(x^2+(2(k+1)-5)x+7+\sum_{i=0}^k(2i-5)\right)
\end{align*}$$


So, we have shown that $f^{(k)}(x)=e^xp_k(x)$, where $p_k(x)=x^2+(2k-5)x+7+\sum\limits_{i=0}^{k-1}(2i-5)$. Since $e^x>0$ for every $x\in\mathbb{R}$, we have to show that $p_k$ has two distinct roots for every $k\in\mathbb{N}$.
For that purpose, we calculate:
$$p_k'(x)=2x+2k-5$$
So:
$$p_k'(x)=0\Leftrightarrow2x+2k-5=0\Leftrightarrow x=-\frac{2k-5}{2}$$
and 
$$\begin{align*}p_k\left(\frac{2k-5}{2}\right)=&\frac{(2k-5)^2}{4}-\frac{(2k-5)^2}{2}+7+\sum_{i=0}^{k-1}(2i-5)=\\
=&-\frac{(2k-5)^2}{4}+7+2\sum_{i=0}^{k-1}i-5k=\\
=&-\frac{(2k-5)^2}{4}+7+2\frac{k(k-1)}{2}-5k=\\
=&-\frac{(2k-5)^2}{4}+k^2-6k+7=\\
=&\frac{-4k^2+20k-25}{4}+k^2-6k+4=\\
=&\frac{-4k^2+20k-25+4k^2-24k+16}{4}=\\
=&\frac{-4k-9}{4}<0
\end{align*}$$
Moreover, since $p_k''(x)=2>0$, it comes that $p_k(x)$ has exactly two distinct roots for every $k\in\mathbb{N}$, which was what requested.
Reviewing it, it was a little bit brute-force...
