Number of solutions of $P(x)=e^{ax}$ if $P$ is a polynomial

In MSE question the equation $x^2-1=2^x$ is considered, this is a generalization:

Let $P_n(x)$ a polynomial of degree $n > 0$. It is well know that the equation $P_n(x)=0\;$ has at most $n$ real solutions. But consider the inhomogeneous equations $P_n(x)=2^x$ or even $$P_n(x)=e^{ax},\quad a\ne 0$$ Is it correct to say that the number of solutions is $\le n+1?$

Proof could be via induction on $n$ with $P_{n+1}'(x)/a=e^{ax},\;$ but at the moment I see no obvious way to get back to $P_{n+1}(x)=e^{ax}.$


Solution 1:

Almost, in fact $P_n(x)=e^{ax}$ has at most $n+1$ solutions.

First of all, notice that without loss of generality $a=0$ or $a=1$ (you can make the change of variable $y=ax$). Then we proceed by induction.

For $n=0$: Obviously $b=e^x$ has one solution if $b>0$ and no (real) solution if $b\le0$.

For $n>0$: If $f(x)$ is a smooth function, then we know that between two zeros of $f(x)$ we always have at least one extremum, corresponding to a zero of $f'(x)$. Let $g(x)=P_n(x)-e^x$, then: $$\#\{\mathrm{zeros\ of\ }g(x)\}\le\#\{\mathrm{zeros\ of\ }g'(x)\}+1$$ and $g'(x)=P_{n-1}(x)-e^x$, thus by induction we conclude that $g(x)$ has at most $n+1$ zeros, each corresponding to a solution of our equation.


Remark: An example where there are exactly $n+1$ zeros is: $$\alpha x=e^x$$ with $\alpha>1$. I wouldn't know a general formula for a polynomial of degree $n$ satisfying that property.

Solution 2:

Let $S(n)$ be the statement: for each polynomial $P_n(x)$ of degree $n>0$ and all $a\neq0$ the equation $P_n(x)=e^{ax}$ has at most $n+1$ solutions. We will prove by Induction. It is easy to see $S(1)$ is true. Now assume $S(n)$ true for some $n$. Take any polynomial $P_{n+1}(x)$ and $a\neq 0$ and define $f$ by $f(x)=P_{n+1}(x)-e^{ax}$. Note that $\lim_{x\to \pm\infty}f(x)=-\infty \ \textrm{or} +\infty$. The derivarive of $f$ is $f^\prime(x)=P_n(x)^*-ae^{ax}$ has at most $n+1$ roots since $S(n)$ is true let say by $x_1\leq \dots\leq x_m$ with $m\leq n+1$. Therefore, we can split the real line into $m+1$ sub intervals $\mathbb{R}=(-\infty,x_1]\cup\dots \cup (x_m,\infty)$. Since $x_i$ is statationary point for each $i$ then $f$ only has at most one root in every sub interval. So, $f$ has at most $m+1\leq n+2$ roots that shows $S(n+1)$ is also true.