# Show that $f''(x)=e^xf(x)$ with $f(a)=f(b)=0$ makes $f\equiv 0$ $\forall x \in [a,b]$

Define $$f \in C^{2}\left[a,b\right]$$ satisfying $$f''(x)=e^xf(x)$$. Show that $$f''(x)=e^xf(x)$$ with $$f(a)=f(b)=0$$ makes $$f\equiv 0$$ $$\forall x\in [a,b]$$.

Actually, I figure out a solution as follows: (just taking about the idea)

We can prove a general conclusion：if $$f \in C^{2}\left[a,b\right]$$ satisfying $$f''(x)=g(x)f(x)$$ where $$g(x) \in C^{0}\left[a,b\right]$$ satisfying $$g(x)>0$$, and $$f(a)=f(b)=0$$, we have $$f\equiv 0$$ $$\forall x \in [a,b]$$.

The idea is to prove that if there exists $$x_0\in (a,b)$$ such that $$f(x_0)\ne0$$ (let's assume that $$f(x_0)>0$$), we can prove that there exists $$x_1\in (a,b)$$ such that $$f(x_1)>0$$, $$f'(x_1)>0$$ and $$f''(x_1)>0$$. And through this conclusion we can easily get that $$f(x)$$ will be strictly monotonically increasing in the interval $$\left[x_1,b\right]$$.

So my questions are:

1. Is there any other solution of this problem?
2. Can we solve this differential equation problem?

Assume that $$f$$ is not identically zero on the interval, without loss of generality $$f(x_0) > 0$$ for some $$x_0 \in (a, b)$$. Then $$f$$ attains its maximum $$M>0$$ at some point $$x_1 \in (a, b)$$. At the maximum we necessarily have $$f'(x_1) = 0 \, , \quad f''(x_1) \le 0 \, ,$$ which is a contradiction to the assumption that $$f''(x_1) = e^{x_1} f(x_1) = e^{x_1} M > 0 \, .$$

The same solution works with the more general assumption that $$f''(x)=g(x)f(x)$$ with a strictly positive function $$g$$.

We can actually find a closed-form solution, sort of. Let $$y = 2 e^{x/2}$$. Then we have $$\frac{df}{dx} = \frac{dy}{dx} \frac{df}{dy} = e^{x/2} \frac{df}{dy} = \frac{y}{2} \frac{df}{dy}$$ and $$\frac{d^2f}{dx^2} = \frac{dy}{dx} \frac{d}{dy} \left( \frac{df}{dx} \right) = \frac{y}{2} \frac{d}{dy} \left( \frac{y}{2} \frac{df}{dy} \right) = \frac{y^2}{4} \frac{d^2f}{dy^2} + \frac{y}{4} \frac{df}{dy}.$$ The differential equation then becomes $$\frac{y^2}{4} \frac{d^2f}{dy^2} + \frac{y}{4} \frac{df}{dy} = \frac{y^2}{4} f,$$ or $$y^2 f'' + y f' - y^2 f = 0$$ which is a modified Bessel ODE with $$n = 0$$. The general solution is therefore $$f(y) = A I_0(y) + B K_0(y),$$ or $$f(x) = A I_0(2 e^{x/2}) + B K_0(2 e^{x/2}),$$ where $$I_0$$ and $$K_0$$ are the modified Bessel functions.

To show that the function $$f(x)$$ cannot vanish at two points, we note that $$I_0(2e^{x/2})$$ is strictly increasing while $$K_0(2e^{x/2})$$ is strictly decreasing, and that both functions are strictly positive everywhere. If the function $$f(x)$$ vanishes at one point, it must therefore be the case that either $$A$$ and $$B$$ both vanish, or that they are of opposite sign but non-zero. But if they are of opposite sign and non-zero, this means that the combined function $$f(x)$$ is either strictly increasing or strictly decreasing, and thus cannot vanish anywhere else. Thus, if the $$f(x)$$ vanishes at two points, it is zero everywhere.

Disclaimer: I wouldn't have come up with the above "closed-form" solution on my own; I ran the differential equation through Mathematica, saw the result, and reverse-engineered the solution.

If there is some $$x_0$$ with $$f(x)>0$$ then there is also some $$x_1$$ with $$f(x_1)=\max_{x\in[a,b]}f(x)$$. Because $$f$$ is differentiable, $$f'(x_1)=0$$. But then also $$f''(x_1)=g(x_1)f(x_1)>0$$ so that locally $$f(x_1+s)=f(x_1)+\frac12f''(x_1)s^2+o(s^2)$$, which provides values larger than $$f(x_1)$$, for instance using $$f(x_1+s)\ge f(x_1)+\frac14f''(x_1)s^2$$ for $$|s|<\delta$$ for some small $$δ>0$$, in contradiction to the construction. Thus the first assumption is wrong, there is no such $$x_0$$.

Then repeat the same argument for $$-f(x)$$ to find that only $$f=0$$ remains.