Prove that $f(x) = 0$ for all $x \in \mathbb{R}$ (Analysis)

The general solution to the ode is the sum $$ c_1e^x+c_2e^{-x}+c_3\sin x+c_4\cos x=f(x) $$ using the usual methods.

This gives us the system of equations $$ f(0)=c_1+c_2+c_4=0\\ f'(0)=c_1-c_2+c_3=0\\ f''(0)=c_1+c_2-c_4=0\\ f'''(0)=c_1-c_2-c_3 $$ which has unique solution $c_1=c_2=c_3=c_4=0$.


Here is one proof which avoids differential equations. Let us assume that $|x|\leq 2$. By Taylor's theorem we have $$f(x) =\frac{x^4}{4!}f^{(4)}(c_1)=\frac{x^4}{4!}f(c_1), x\neq 0$$ where $0<|c_1|<|x|$ and applying this repeatedly and noting that at each step we have $0<|c_n|<|x|$ we get $$|f(x)| \leq \left(\frac{x^4}{4!}\right)^{n}|f(c_n) |\leq \left(\frac{x^4}{24}\right)^{n}M$$ where $M$ is the maximum value of $|f|$ between $0$ and $x$. Since $|x|\leq 2$ by Squeeze Theorem we can see that $f(x) =0$ for all $x\in[-2,2]$. The proof is extended to other values of $x$ by using functions $g_1(x) =f(x-1),h_1(x)=f(x+1)$ and applying the above argument repeatedly to $g_1, h_1$ and their descendents $g_n, h_n$ given recursively as $$g_n(x) =g_{n-1}(x-1),h_n(x)=h_{n-1}(x+1)$$ One may also use the function $g(x) =f(kx) $ to extend the proof to all values of $x\in[-2k,2k]$ with much less effort.

Incidentally the same technique gives another proof of the following important theorem:

Theorem: If $f:\mathbb{R} \to\mathbb {R} $ is such that $f'(x) =f(x), f(0)=0$ then $f(x) =0$ for all $x \in\mathbb {R} $.


Update: As mentioned in my comment to the question, one can also use mean value theorem four times instead of Taylor's theorem to get the simpler inequality $|f(x) |\leq x^4|f(c)|$ for some $c$ between $0$ and $x$ and the proof can be continued with this inequality in a similar manner.