120k views
0 votes
Solve the initial value problem y′+y=f(t),y(0)=0 where f(t)={1,−1, if t<4 if t≥4 Use h(t−a) for the Heaviside function shifted a units horizontally.

1 Answer

0 votes

Looks like the function on the right hand side is


f(t)=\begin{cases}1&amp;\text{for }t<4\\-1&amp;\text{for }t\ge4\end{cases}

We can write it in terms of the Heaviside function,


h(t-a)=\begin{cases}1&amp;\text{for }t\ge a\\0&amp;\text{for }t>a\end{cases}

as


f(t)=h(t)-2h(t-4)

Now for the ODE: take the Laplace transform of both sides:


y'(t)+y(t)=f(t)


\implies s Y(s)-y(0)+Y(s)=\frac{1-2e^(-4s)}s

Solve for Y(s), then take the inverse transform to solve for y(t):


(s+1)Y(s)=\frac{1-e^(-4s)}s


Y(s)=(1-e^(-4s))/(s(s+1))


Y(s)=(1-e^(-4s))\left(\frac1s-\frac1{s+1}\right)


Y(s)=\frac1s-\frac{e^(-4s)}s-\frac1{s+1}+(e^(-4s))/(s+1)


\implies y(t)=1-h(t-4)-e^(-t)+e^(-(t-4))h(t-4)


\boxed{y(t)=1-e^(-t)-h(t-4)(1-e^(-(t-4)))}

User Chuck Pinkert
by
4.3k points