$f(x)=e^x(x^2-5x+7)$.Prove $f^{(n)}(x)$ has 2 roots for any $n\in\mathbb N^*$. $f^{(n)}(x)$ means derivative of order n. $f(x)=e^x(x^2-5x+7)$.Prove $f^{(n)}(x)$ has 2 roots for any $n\in\mathbb N^*$. $f^{(n)}(x)$ means derivative of order n.  
I am really confused by this exercise. I have calculated first 10 derivatives and $\Delta$ for each to see if it is positive, and it is indeed. I thought that by doing this eventually I will be able to find a general form for the derivative of order n and then prove it is right by mathematical induction then calculate $\Delta$ and show it is >0. The first and second term are easy to find, first one never changes and second one is $(-5x+2*nx)$, but the third term changes based on the second and last terms of $f^{(n-1)}(x)$ so I am stuck here with this approach.  
Thanks in advance to anyone trying to help!
 A: The hint.
Let for $x^2+ax+b$ we have $a^2-4b>0$.
Thus, $$(e^x(x^2+ax+b))'=e^x(x^2+ax+b)+e^x(2x+b)=e^x(x^2+(a+2)x+a+b)$$
and we see that
$$(a+2)^2-4(a+b)=a^2-4b+4>0.$$
Now, use induction.
A full solution can be written so.
Easy to see that for all $n$ we can write $f^{(n)}$ in the following form: $$f^{(n)}(x)=e^x(x^2+a_nx+b_n).$$
Now, $$f'(x)=e^x(x-1)(x-2)$$ has two real root. It was a base of the induction.
Let $f^{(n)}(x)=e^x(x^2+a_nx+b_n)$ has two real roots.
Thus, $$a_n^2-4b_n>0.$$
We'll prove that $f^{(n+1)}$ has two real roots.
Indeed, $$f^{(n+1)}(x)=\left(e^x(x^2+a_nx+b_n)\right)'=e^x(x^2+a_nx+b_n)+e^x(2x+a_n)=$$
$$=e^x(x^2+(a_n+2)x+a_n+b_n).$$
Id est, $$a_{n+1}=a_n+2,$$ $$b_{n+1}=a_n+b_n$$ and it's enough to prove that:
$$a_{n+1}^2-4b_{n+1}>0$$ or
$$(a_n+2)^2-4(a_n+b_n)>0$$ or
$$a_n^2-4b_n+4>0,$$ which is true by the assumption of the induction.
Thus, by the induction $f^{(n)}$ has two real roots for all $n\geq1$ and we are done!
A: If you are looking for a more "explicit" demonstration I believe you will appreciate this answer. Let $g(x)=x^2-5x+7$. We have 
\begin{align}
g^{(1)}(x)=& 2x-5\\
g^{(2)}(x)=& 2\\
g^{(3)}(x)=& 0\\
\end{align}
and 
$$
g^{(n)}(x)= 0 \quad \mbox{ for all } n\geq 3
$$
We will derive the function $f(x)=e^xg(x)$ successively until we find a pattern of recall and then verify the existence of roots for $f(x)=e^xg(x)$. 
For $n=1$ we have
 $$
\begin{array}{rc rl}
f(x)=e^xg(x) & \implies &f^{(1)}(x)=&e^xg^{(1)}(x)+e^xg(x)
           \\
             &          &=          & e^x\Big(g(x)+g^{(1)}(x)\Big)
\end{array}
$$
For $n=2$ we have
 $$
\begin{array}{rc rl}
f^{(1)}(x)=e^x\Big(g(x)+g^{(1)}(x)\Big) & \implies &f^{(2)}(x)=&e^x\Big(g(x)+g^{(1)}(x)\Big)
\\
                                 &&&+e^x\Big(g^{(1)}(x)+g^{(2)}(x)\Big)
           \\
             &          &=          & e^x\Big(g(x)+2g^{(1)}(x)+g^{(2)}(x)\Big)
\end{array}
$$
For $n=3$ we have
 $$
\begin{array}{rc rl}
f^{(2)}(x)=e^x\Big(g(x)+2g^{(1)}(x)+g^{(2)}(x)\Big)
& 
\implies 
&f^{(3)}(x)=&e^x\Big(g(x)+2g^{(1)}(x)+g^{(2)}(x)\Big)
\\
                                 &&&+e^x\Big(g^{(1)}(x)+2g^{(2)}(x)\Big)
           \\
             &          &=          & e^x\Big(g(x)+3g^{(1)}(x)+3g^{(2)}(x)\Big)
\end{array}
$$
For $n=4$ we have
 $$
\begin{array}{rc rl}
f^{(3)}(x)=e^x\Big(g(x)+3g^{(1)}(x)+3g^{(2)}(x)\Big)
& 
\implies 
&f^{(4)}(x)=&e^x\Big(g(x)+3g^{(1)}(x)+3g^{(2)}(x)\Big)
\\
&           &&+e^x\Big(g^{(1)}(x)+3g^{(2)}(x)\Big)
           \\
             &          &=          & e^x\Big(g(x)+4g^{(1)}(x)+6g^{(2)}(x)\Big)
\end{array}
$$
For $n=5$ we have
 $$
\begin{array}{rc rl}
f^{(4)}(x)=e^x\Big(g(x)+4g^{(1)}(x)+6g^{(2)}(x)\Big)
& 
\implies 
&f^{(5)}(x)=&e^x\Big(g(x)+4g^{(1)}(x)+6g^{(2)}(x)\Big)
\\
&           &&+e^x\Big(g^{(1)}(x)+4g^{(2)}(x)\Big)
           \\
             &          &=          & e^x\Big(g(x)+5g^{(1)}(x)+10g^{(2)}(x)\Big)
\end{array}
$$
For $n=6$ we have
 $$
\begin{array}{rc rl}
f^{(5)}(x)=e^x\Big(g(x)+5g^{(1)}(x)+10g^{(2)}(x)\Big)
& 
\implies 
&f^{(6)}(x)=&e^x\Big(g(x)+5g^{(1)}(x)+10g^{(2)}(x)\Big)
\\
&           &&+e^x\Big(g^{(1)}(x)+5g^{(2)}(x)\Big)
           \\
             &          &=          & e^x\Big(g(x)+6g^{(1)}(x)+15g^{(2)}(x)\Big)
\end{array}
$$
For  $A_1=1$ e $B_1=0$ set 
$$
A_{k+1}=A_k+1 \quad \mbox{ and } \quad B_{k+1}= A_{k}+B_{k}
$$
and note that 
$$
A_{k}=k \quad \mbox{ and } \quad B_{k}= A_{k-1}+\ldots+A_1= \frac{k(k-1)}{2}
$$
Furthermore, by  pattern of recall above we can prove by induction that
\begin{align}
f^{(k)}(x)=& e^x\Big( g(x)+A_{k} \cdot g^{(1)}(x)+B_{k}\cdot g^{(2)}(x) \Big)\\
          =& e^x\Big( (x^2-5x+7)+A_{k} \cdot(2x-5)+B_{k}\cdot 2 \Big)\\
          =& e^x\Big( x^2+(-5+2A_{k})x+(7-5A_k+2B_k)\Big)\\
          =& e^x\Big( x^2+(-5+2k)x+(7-5k+k(k-1))\Big)\\
           =& e^x\Big( x^2+(2k-5)x+(k^2-6k+7)\Big)\\
\end{align}
Now notice that the $f^{(k)}(x)$ function is null if and only if $\Big( x^2+(2k-5)x+(k^2-6k+7)\Big)$ is null. And the expression
$$
\Big( x^2+(2k-5)x+(k^2-6k+7)\Big)
$$ 
will have real raises if, and only if, its discriminant 
$$
(2k-5)^2-4(k^2-6k+7)
$$
is greater than zero. In fact we have,
$$
(2k-5)^2-4(k^2-6k+7)=14k-3>0 \quad \mbox{ for all } \quad k>0.
$$
