By using Laplace transforms find $x(t)$ from the coupled differential equations$$\frac{dx}{dt} = -kx+gy+E,$$$$\frac{dy}{dt} = -ky-gx,$$for some functions $x(t),$ and $y(t)$, where $E, k, g$ are real. And we have the condition $x(t) = y(t) = 0$ for $t \leq 0.$
Attempt:
I know that the solution must be:
$$x(t)=\frac{Ek}{k^2+g^2} \Big[ 1+ e^{-kt} \Big[ -\cos(gt)+ \frac{g}{k} \sin(gt) \Big] \Big]. \tag{1}$$
I am trying to arrive at equation (1). Do I need to be considering the steady-state of the system? If so, when I set the two equations to zero, how can I take the Laplace transform of both sides? Because we do not have an explicit expression given for the functions $x(t)$ and $y(t).$
Also we don't know if the Laplace transforms of $x(t)$ and $y(t)$ are convergent in the region $Real (s) > 0.$
Any explanation would be appreciated.
Denote the Laplace transform of $x(t)$ and $y(t)$ by $X(s)$ and $Y(s)$. Taking Laplace transform of the coupled ODEs yields the following: \begin{align} sX & = -kX + gY + \dfrac{E}{s} \tag{1}\\ sY & = -kY - gX \tag{2} \end{align} where we use the assumption that we have zero initial conditions. Rearranging (2) to get an expression for $Y(s)$: \begin{align*} (s+k)Y & = -gX\\ \implies Y & = -\dfrac{gX}{s+k}\\ \end{align*} Substituting this expression into (1) gives: \begin{align*} sX + kX & = g\left(-\dfrac{gX}{s+k}\right) + \dfrac{E}{s}\\ \left(s+k+\dfrac{g^2}{s+k}\right)X & = \dfrac{E}{s}\\ \left(\dfrac{(s+k)^2+g^2}{s+k}\right)X & = \dfrac{E}{s}\\ X(s) & = \dfrac{E(s+k)}{s[(s+k)^2+g^2]}\\ & = E\left(\dfrac{A}{s} + \dfrac{Bs+C}{(s+k)^2+g^2}\right)\\ & = EA\left\{\dfrac{1}{s}\right\} + EB\left\{\dfrac{s+k}{(s+k)^2+g^2}\right\} + \dfrac{E(C-Bk)}{g}\left\{\dfrac{g}{(s+k)^2+g^2}\right\} \end{align*} where \begin{equation} A = \dfrac{k}{k^2+g^2},\quad B = -\dfrac{k}{k^2+g^2},\quad C = \dfrac{g^2-k^2}{k^2+g^2} \end{equation} You should be able to figure out how to invert them; the frequency shifting theorem will be helpful.