Two coupled second order differential equations I have two coupled equations in the form:
$$f''(x) + g'(x) + f(x) = 0$$
$$g''(x) + f'(x) + g(x) = 0$$
Looking at the form, i can guess a relation of the form $g(x) = \lambda f(x)$.
where $\lambda$ is some constant. I can find the constant by replacing $g(x)$ in the above equations and comparing the coefficients of every derivative. Finally i'm left with a single equation which is easily solvable. 
The question is: is this procedure legal? and is the solution that i get is the most general one?
Thanks
 A: Hint
Make a substitute
$$
f' = p \\
g' = q
$$
then you get a system
\begin{align}
f' &= p \\
g' &= q \\
p' &= -f - q \\
q' &= -g - p
\end{align}
or in matrix form
$$
\left[ \begin{array}{c}
f \\ g \\ p \\ q
\end{array}\right ]' = \left [ \begin{array}{cccc}
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \\
-1 & 0 & 0 & -1 \\
0 & -1 & -1 & 0
\end{array}\right ] \cdot 
\left[ \begin{array}{c}
f \\ g \\ p \\ q
\end{array}\right ]
$$
which is in form of
$$
\mathbf y' = \mathbf A \cdot \mathbf y
$$
Can you take it from here?
A: Setting
$$
u=f+g,\quad v=f-g,
$$
we have
$$\tag{1}
\left\{
\begin{array}{lcl}
u''+u'+u&=&0\\
v''-v'+v&=&0
\end{array}\right..
$$
The solutions of the first and second equations of (1) is given respectively by
\begin{eqnarray}
u(x)&=&e^{-\frac{x}{2}}\left[a_1\cos\left(\frac{\sqrt{3}}{2}x\right)+a_2\sin\left(\frac{\sqrt{3}}{2}x\right)\right],\\
v(x)&=&e^{\frac{x}{2}}\left[b_1\cos\left(\frac{\sqrt{3}}{2}x\right)+b_2\sin\left(\frac{\sqrt{3}}{2}x\right)\right],
\end{eqnarray}
where $a_1,a_2,b_1,b_2$ are real constants.
Since
$$
f=\frac{u+v}{2},\quad g=\frac{u-v}{2},
$$
we deduce that
\begin{eqnarray}\
f(x)&=&\frac12\left(a_1e^{-\frac{x}{2}}+b_1e^{\frac{x}{2}}\right)\cos\left(\frac{\sqrt{3}}{2}x\right)+\frac12\left(a_2e^{-\frac{x}{2}}+b_2e^{\frac{x}{2}}\right)\sin\left(\frac{\sqrt{3}}{2}x\right),\\
g(x)&=&\frac12\left(a_1e^{-\frac{x}{2}}-b_1e^{\frac{x}{2}}\right)\cos\left(\frac{\sqrt{3}}{2}x\right)+\frac12\left(a_2e^{-\frac{x}{2}}-b_2e^{\frac{x}{2}}\right)\sin\left(\frac{\sqrt{3}}{2}x\right).
\end{eqnarray}
A: Numerical answer :
Given the IC $f(0)$, $f'(0)$, $g(0)$, $g'(0)$ we get the approximations
$$ 
f_n= 2f_{n-1} -f_{n-2} - dx^2\{ g'_{n-1}+f_{n-1} \} ,~~ n=2,3,4...\\
g_n= 2g_{n-1} -g_{n-2} - dx^2\{f'_{n-1}+g_{n-1} \}   ,~~ n=2,3,4...
$$
where
$$
    f'_{n-1} = ( f_{n-1}-f_{n-2} )/dx\\
    g'_{n-1} = ( g_{n-1}-g_{n-2} )/dx      
$$
