I've been trying to solve the Cauchy problem \begin{align}&u_{tt}-u_{xx}+u=0~; x \in \mathbb{R},t>0 \tag{1}\\&u(x,0)=\cos x ~\text{for}~x\in \mathbb{R}\\&u_t(x,0)=\sin x~\text{for}~x\in \mathbb{R}\end{align} I've seen the class of problems of the form
\begin{align}&u_{tt}-c^2u_{xx}=f(x,t)~; (x,t) \in \mathbb{R}\times (0,\infty)\\&u(x,0)=\varphi(x)~\text{for}~x\in \mathbb{R}\\&u_t(x,0)=\psi(x)~\text{for}~x\in \mathbb{R}\end{align}But in the problem (1) the vector field is dependent of $u$, how to solve these kind of problems? I don't think separation of variable makes sense without boundary conditions, also changing coordinates from $u$ to $w$ by $u(x,t) \to w(\xi,\eta)$ gives me : $w_{\xi\eta}=\frac{1}{4}w$ which is again hard to solve without further knowledge. Is there any other clever change of coordintes applicable? or Cauchy-Kovalevskaya Theorem could be of any help to find an explicit solution? Appreciate any suggestions!
This is a case of the Klein-Gordon equation. Since the initial conditions are periodic in the spatial variable, the solution should also be periodic in space. So you can instead pose this problem with the spatial domain replaced by $[0,2\pi)$ and impose periodic boundary conditions. Then you can solve via separation of variables and using Fourier series.