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.
 A: Hint
The derivative of $f(x)=e^xp(x)$ is $f'(x)=e^x(p(x)+p'(x))$ for any polynomial.
So, consider $p_0(x)=x^2-5x+7$ and define $p_n(x)=p_{n-1}(x)+p_{n-1}'(x).$ Thus we have $f^{(n)}(x)=e^xp_n(x).$ It should be no difficult to get $p_n(x).$ Finally you only need to show that $p_n$ has two real roots.
(Note that $p_n(x)=x^2+a_nx+b_n\implies p_{n+1}(x)=x^2+(a_n+2)x+a_n+b_n.$ Thus you only need to solve $a_{n+1}=a_n+2$ with $a_0=-5$ and $b_{n+1}=b_n+a_n$ with $b_0=7.)$
A: $f^{(n)}$ is no equation but a function. You might mean $f^{(n)}(x)=0$ as an equation? In that case, you are right, it is a proof by induction. If $f(x)=e^{x}p(x)$ where $p$ is a polynomial, $f$ is infinity times differentiable and $f^{(n)}(x)=e^{x}p_n(x)$ for some polynomial $p_n$.
$n=1$:
You have to compute $0=f'(x)=e^{x}(x^2-3x+2)$ directly and you get
$$
f(x)=0\Leftrightarrow x^2-3x+2=0\Leftrightarrow x=1\vee x=2.
$$
$n\mapsto n+1$:
Consider $f^{(n)}$ has two roots $x_1<x_2$. The MVT yields that $f^{(n)}$ has an extrema at some $\xi_1\in(x_1,x_2)$. Therefore you get $0=(f^{(n)})'(\xi_1)=f^{(n+1)}(\xi_1)$.
Since $f^{(n)}(x)=e^{x}p_n(x)$ for some polynomial $p_n$, it holds $$
\lim_{x\to-\infty}f^{(n)}(x)=0.
$$
Using IVT and MVT yields a second extrema of $f^{(n)}$ at some $\xi_2\in(-\infty,x_1)$ and again $0=(f^{(n)})'(\xi_2)=f^{(n+1)}(\xi_2)$.
Finally we got two roots $\xi_1$ and $\xi_2$ of $f^{(n+1)}$ and are done.
A: 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...
A: Let $P_2(x)=x^2-5x+7.$ Note: $P_2^{(n)}=0, n\ge 3.$ Then:
$$f'=e^x(P_2+P_2').$$
$$f''=e^x(P_2+2P_2'+P_2'').$$
$$f'''=e^x(P_2+3P_2'+3P_2''+0).$$
$$\cdots$$
$$f^{(n)}=e^x(P_2+nP_2'+\frac{n(n-1)}{2}P_2''+0)=0 \Rightarrow$$
$$x^2-5x+7+n(2x-5)+n(n-1)=0 \Rightarrow$$
$$x^2-(5-2n)x+n^2-6n+7=0 \Rightarrow$$
$$D=(5-2n)^2-4(n^2-6n+7)=4n-3>0, n\ge 1.$$
A: Consider $f(x)=e^x \left(a x^2+b x+c\right)$
It can be proved by induction that the $n-$th derivative is
$$f^{(n)}(x)=e^x \left(x^2+x (2 a n+b)+a n^2-a n+b n+c\right)$$
to have two real roots must be
$$\Delta =4 a(a-1) n^2+4 n (a b+a-b)+b^2-4 c>0$$
In your example we have $a=1,\;b=-5,c=7$ thus
$\Delta=4n-3$, which is true for $n\geq 1$
