Infinitely differentiable function with equation. The function $f: \mathbb{R} \rightarrow \mathbb{R}$ is twice differentiable, and satisfies the differential equation 
$ f''-f=0$ with $f(0)=A$, $ f'(0)=B$ . 
How can we show that $f$ is infinitely differentiable?

The differential equation 
$f'' - f = 0 \tag{1}$
has a unique solution for any initial conditions $f(0) = A$, $f'(0) = B$; this follows because its system of coefficients is Lipshcitz continuous.  To see this in more detail,
set
$g = f' \tag{2}$
and write (1) as the system/vector field
$\begin{pmatrix} f \\ g \end{pmatrix}' = \begin{pmatrix} g \\ f \end{pmatrix}. \tag{3}$
It is easy to see the vector field on the right satisfies the criterion for Lipschitz continuity, but to flesh things out, note that in the $f$-$g$ plane $\Bbb R^2$ we have
$\begin{pmatrix} f \\ g \end{pmatrix}' = \begin{pmatrix} g \\ f \end{pmatrix} = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}\begin{pmatrix} f \\ g \end{pmatrix}; \tag{4}$
since the norm of the coefficient matrix of this linear system is $1$, we have the global Lipschitz constant of the system is $1$ as well; I leave the easily verified details to my audience.  Since we have uniqueness, and
$f(x) = \dfrac{A + B}{2}e^x + \dfrac{A - B}{2}e^{-x} \tag{4}$
satisfies the initial conditions, it is the only such solution; it is manifestly infinitely differentiable; indeed, analytic.
Note: In response to our OP Asd's question, "how can we solve this" I must admit that I "guessed"; which means I already knew.  But the standard substitution $f(x) = e^{\mu x}$ yields the quadratic $\mu^2 - 1 = 0$ etc. etc. etc.  Or you can simply try $(f, g)^T = e^{Ax}(A, B)^T$ where $A$ is the coefficient matrix etc,. etc. etc.  End of Note.
Hope this helps.  Cheers,
and as always,
Fiat Lux!!!
