In a book it is written the following:
Let $f \in C^2(\mathbb{R})$ be a function with $(\forall x\in\mathbb R):f''(x) + f(x) = 0$, $f(0) = 0$, and $f'(0) = \beta \in \mathbb{R}$ . It follows that $f \in C^\infty(\mathbb{R})$ and $f(x) = \beta \sin(x)$ for all $x \in \mathbb{R}$.
How can one prove that?
I thought about how $f^{(n)}(0)$ looks like and what follows for $R_n(x) \to 0$ for $n \to \infty$, but it doesn't help me.
Let $g(x)=f(x)-\beta\sin(x)$. Then $g(0)=0$, $g'(0)=0$ and $(\forall x\in\mathbb R):g''(x)=-g(x)$. But then$$(g^2+g'^2)'=2gg'+2g'g''=2g'(g+g'')=0.$$So, $g^2+g'^2$ is constant. Since $g(0)=g'(0)=0$, it follows that $g$ is the null function. In other words,$$(\forall x\in\mathbb R):f(x)=\beta\sin(x).$$