Real analysis: simple second order ODE I'm studying real analysis at the moment (just covered the mean value theorem, constancy theorem, applications to DEs etc.) and have run across this question that I'm stuck on. Any help would be much appreciated - I have no idea where to start! 
"$f$ is an infinitely differentiable function $\mathbb{R}\to\mathbb{R}$ with $f(0) = f'(0) = 0$, satisfying $f''(x) = -f(x)$ for all $x$. Show that $f$ is identically zero."
Thanks! 
 A: Simple way is to recall the general solution:
$$f(x)=A\cos{x}+B\sin{x}$$
Substituting $f(0)=0$ we get $A=0$ and now $f'(0)=B\cos{0}=0$ and we have the result.
A: you have $$y'' + y = 0 \to -\int_0^x y\cos x = \int_0^x y'' \cos x \,dx= y'\cos x\Big|_0^x+\int_0^xy'\sin x=y'\cos x+y\sin x\Big|_0^x - \int_0^xy\cos x$$  which gives $$y'\cos x + y\sin x=0\to  \frac{dy}{y} - \frac{d\cos x}{\cos x} = 0$$ on integration, we get $$y = A\cos x $$  using the fact that at $x = 0, y = 0$ gives you $$y = 0$$ identically.
A: This can be done without assuming a certain solution (which would have to be proven as unique first). 
Consider $v=y'$ and write
$$ \frac{\mathrm{d}v}{\mathrm{d}x} =-y \\
\frac{\mathrm{d}v}{\mathrm{d}y} v =-y \\
\int v \mathrm{d}v = -\int y \mathrm{d}y \\
\frac{1}{2} (y')^2 = \frac{1}{2} y^2 + \frac{C}{2} \\
y' = \sqrt{C-y^2}
$$
Given that $y=0$ and $y'=0$ it means that $C=0$. We are going to apply this later so we don't end up with complex numbers. Now:
$$ \frac{\mathrm{d}y}{\mathrm{d}x} =\sqrt{C-y^2} \\
\int \frac{\mathrm{d}y}{\sqrt{C-y^2}} = \int \mathrm{d}x \\
\arctan\left(\frac{y}{\sqrt{C-y^2}}\right) = x+K
$$
Given that $x=0$ and $y=0$ it means that $K=0$.
$$ \frac{y}{\sqrt{C-y^2}} = \tan(x) \\
\frac{y^2}{C-y^2}+1 = \frac{C}{C-y^2}= \sec^2(x) \\
y = \sqrt{C} \sin(x)
$$
Since $C=0$, then $y(x)=0$ and consequently $y'(x)=0$
