Simultaneous Differential Equations

==],k]]n happens that two differential equations are expressed in terms of the same functions. I may be possible to find a single equation in terms of a single function, which may then be solved to find a solution.
Let
\[f''++2g=4\]
  (1)
\[f+g=0\]
  (2)
We can obtain a single equation in
\[f\]
  by differentiating in (2) and substituting into (1).
\[f''++2g=4\]
  (1)
\[f'+g'=0\]
  (3)
From (3)
\[f'=-g'\]
  then we can write (1) as
\[f''-2f'=4\]

This last equation can bee solved using the integrating factor method.
Multiply the equation throughout by
\[e^{\int{-2dx}}= e^{-2x}\]
.
We obtain
\[f' e^{-2x}-2f e^{-2x}=4e^{-2x} \]
.
We can rewrite the equation as
\[(fe^{-2x})'=4e^{-2x}\]
.
Integrate both sides.
\[fe^{-2x}=-2e^{{-2x}}+ C\rightarrow f=-2+Ce^{2x}\]
  then from (2)
\[g=2-Ce^{2x}\]
.