$f(x)=f^{\prime}(x)+f^{\prime\prime }(x)$ such that $f(a)=f(b)=0$ then prove that $f=0$

This is a refined version of your attempt. Try to see how it differs from yours.

You can suppose that $f$ is not constant (otherwise there is nothing to prove).

Let us suppose $f$ takes positive value somewhere in $(a, b) $. Then $f$ takes maximum value at some $c\in(a, b) $ where $f(c) >0,f'(c)=0$ so that $f''(c) >0$ whigh makes $c$ a local minimum. The contradiction completes the proof (as a similar contradiction can be achieved when $f$ takes negative values).


Your proof is fine. To make it more rigorous, for case 3 you can argue that for any $\epsilon \gt 0$, for all $x$, after finite amount of iteration, $\lvert f(x) \rvert \lt \epsilon$ as $f$ is continuous. The amount of iteration is finite is by Heine-Borel theorem.

Alternatively, you may just solve the ODE. The identity polynomial is $$x^2+x-1=0$$ Hence the general solution is $$f(x)=C_1e^{\frac {\sqrt 5 - 1} 2 x}+C_2e^{\frac {-\sqrt 5 - 1} 2 x}$$ By boundary conditions, $$f(x)=0$$.