- #1
Robaj
- 13
- 3
- Homework Statement
- Find a continuous solution of the initial value problem ##y'+y=g(t)##, ##y(0)=0## where $$g(t)=\begin{cases}
2, & 0\le t \le 1 \\
0, & t \gt 1
\end{cases}$$
This is Ex. 17 from Braun's Differential Equations and Their Applications. I can get the answer for the second case but not the first.
- Relevant Equations
- The answer is given as
$$y(t)=\begin{cases}
2(1-e^{-t}),&\, 0\le t \le 1 \\
2(e-1)e^{-t},& \, t \gt 1
\end{cases}
$$
Non-homegenous first order ODE so start with an integrating factor ##\mu##
$$\mu=\textrm{exp}\left(\int a dt\right)=e^t.$$
Then rewrite the original equation as
$$\frac{d}{dt}\mu y = \mu g(t).$$
Using definite integrals and splitting the integration across the two cases,
$$\begin{align} ye^t-0e^0 &= \int_0^1 2e^s ds + \int_1^t 0e^s ds\\
ye^t &= 2\left[e^s\right]_0^1+0\left[e^s\right]_1^t \\
ye^t &= 2e^1-2 \\
y(t) &= 2(e-1)e^{-t}.\end{align}$$
This is Braun's answer for the case ##t \gt 1##. How can I get the solution for ##0\le t \le 1##? Have I done something wrong with the second definite integral (integrating 0)?
Thanks.
$$\mu=\textrm{exp}\left(\int a dt\right)=e^t.$$
Then rewrite the original equation as
$$\frac{d}{dt}\mu y = \mu g(t).$$
Using definite integrals and splitting the integration across the two cases,
$$\begin{align} ye^t-0e^0 &= \int_0^1 2e^s ds + \int_1^t 0e^s ds\\
ye^t &= 2\left[e^s\right]_0^1+0\left[e^s\right]_1^t \\
ye^t &= 2e^1-2 \\
y(t) &= 2(e-1)e^{-t}.\end{align}$$
This is Braun's answer for the case ##t \gt 1##. How can I get the solution for ##0\le t \le 1##? Have I done something wrong with the second definite integral (integrating 0)?
Thanks.