Weβll follow the Laplace roadmap:
forward transform β solve in the Laplace domain β inverse transform. The step function form of
\(g(t)\) will guide us.
Setup β Write g(t) Using Step Functions.
First, express the piecewise forcing term in step function form:
\begin{gather*}
g(t) = 3(u_0(t) - u_2(t)) + 1(u_2(t) - u_4(t)) + (t-4)u_4(t)\\
= 3u_0(t) - 2u_2(t) + (t-4)u_4(t).
\end{gather*}
Step 1 β Into the Laplace Domain.
Apply \(\laplacesym\) to both sides:
\begin{equation*}
2\lap{y'} + \lap{y} = \lap{g(t)}.
\end{equation*}
With \(y(0)=0\) and the derivative rule:
\begin{equation*}
2(sY(s)) + Y(s) = \lap{g(t)}.
\end{equation*}
Transforming each piece of \(g(t)\text{:}\)
\begin{gather*}
\lap{3u_0(t)} = \frac{3}{s}, \quad
\lap{-2u_2(t)} = -\frac{2e^{-2s}}{s}, \quad
\lap{(t-4)u_4(t)} = e^{-4s}\frac{1}{s^2}.
\end{gather*}
The Laplace-domain equation becomes:
\begin{equation*}
2sY(s) + Y(s) = \frac{3}{s} - \frac{2e^{-2s}}{s} + \frac{e^{-4s}}{s^2}.
\end{equation*}
Step 2 β Solve in the Laplace Domain.
Isolate \(Y(s)\text{:}\)
\begin{gather*}
Y(s) = \frac{1}{2s + 1}\left(2 + \frac{3}{s} - \frac{2e^{-2s}}{s} + \frac{e^{-4s}}{s^2}\right).
\end{gather*}
Distribute and write \(Y(s)\) as pieces of the form \(F(s)e^{-cs}\text{:}\)
\begin{equation*}
Y(s) = \frac{2}{2s + 1} + \frac{3}{s(2s + 1)} - \frac{2}{s(2s + 1)}e^{-2s} + \frac{1}{s^2(2s + 1)}e^{-4s}\text{.}
\end{equation*}
Identify the rational parts:
\begin{equation*}
F_1(s) = \frac{2}{2s+1}, \quad
F_2(s) = \frac{1}{s(2s+1)}, \quad
F_3(s) = \frac{1}{s^2(2s+1)}\text{,}
\end{equation*}
which completes the prepared \(Y(s)\text{:}\)
\begin{equation*}
\text{(prepared)}\quad Y(s) = F_1(s) + 3F_2(s) - 2F_2(s)e^{-2s} + F_3(s)e^{-4s}\text{.}
\end{equation*}
The partial fractions decomposition of \(F_2(s)\) and \(F_3(s)\) needed for step 3 are:
\begin{equation*}
F_2(s) = \frac{1}{s} - \frac{2}{2s+1}, \qquad
F_3(s) = \frac{-2}{s} + \frac{1}{s^2} + \frac{4}{2s+1}.
\end{equation*}
Step 3 β Leave the Laplace Domain.
Apply \(\laplacesym^{-1}\) to both sides of the βpreparedβ \(Y(s)\text{:}\)
\begin{align*}
\ilap{Y(s)} = \ilap{F_1(s)} \amp + 3\ilap{F_2(s)}\\
\amp - 2\ilap{F_2(s)e^{-2s}} + \ilap{F_3(s)e^{-4s}}
\end{align*}
\begin{equation*}
y(t) = f_1(t) + 3f_2(t) - 2f_2(t-2)u_2(t) + f_3(t-4)u_4(t)
\end{equation*}
Inverting each \(F_i(s)\) gives \(f_i(t)\text{:}\)
\begin{align*}
f_1(t) = \ilap{F_1(s)} \amp = 2e^{-t/2}\\
f_2(t) = \ilap{F_2(s)} \amp = 1 - 2e^{-t/2}\\
f_3(t) = \ilap{F_3(s)} \amp = -2 + t + 2e^{-t/2}
\end{align*}
Plugging in the \(f_i(t)\)βs, we get the final solution:
\begin{align*}
y(t) = 2e^{-\frac12 t}
\amp + 3 - 6e^{-\frac12 t} \\
\amp - 2\left(1 - 2e^{-\frac12(t-2)}\right)u_2(t) + \left((t-4) - 2 + 2e^{-\frac12(t-4)}\right)u_4(t).
\end{align*}