Solve the initial value problem

**Discontinuous Coefficients.** Linear differential equations sometimes occur in which one or both of the functions $\displaystyle p$ and $\displaystyle g$ have jump discontinuities. If $\displaystyle t_0$ is such a point of discontinuity, then it is necessary to solve the equation separately for $\displaystyle t < t_0$ and $\displaystyle t > t_0$. Afterward, the two solutions are matched so that $\displaystyle y$ is continuous at $\displaystyle t_0$; this is accomplished by a proper choice of the arbitrary constants.

Solve the initial value problem

$\displaystyle y' + 2y = g(t)$, $\displaystyle y(0) = 0$

where

$\displaystyle g(t) = 1, 0 \leq t \leq 1,$ and

$\displaystyle g(t) = 0, t > 1$

I got the correct answer in the back of the book using g(t) = 1 and solving the initial value problem. For the first part I got $\displaystyle y = \frac{1}{2}(1-e^{-2t})$ for $\displaystyle 0 \leq t \leq 1$.

Perhaps I'm going about solving the initial value problem wrong when $\displaystyle g(t) = 0$. But when It is set up as $\displaystyle y' + 2y = 0$, I get a explicit solution of $\displaystyle y = Ce^{-2t}$. When I go to solve for $\displaystyle C$ then, $\displaystyle y$ and $\displaystyle t$ will be $\displaystyle 0$, which will give me a value of $\displaystyle 0$ for $\displaystyle C$, so I must be doing something wrong on the second part, probably not fully understanding the meaning of the question. But the answer in the back of the book for the second part is the following: $\displaystyle y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $\displaystyle t > 1$. I just don't see how they got that unless I'm supposed to do something with my explicit solution I got from the first part of the problem.

Re: Solve the initial value problem

Quote:

Originally Posted by

**VitaX** Solve the initial value problem

$\displaystyle y' + 2y = g(t)$, $\displaystyle y(0) = 0$

where

$\displaystyle g(t) = 1, 0 \leq t \leq 1,$ and

$\displaystyle g(t) = 0, t > 1$

I got the correct answer in the back of the book using g(t) = 1 and solving the initial value problem. For the first part I got $\displaystyle y = \frac{1}{2}(1-e^{-2t})$ for $\displaystyle 0 \leq t \leq 1$.

Perhaps I'm going about solving the initial value problem wrong when $\displaystyle g(t) = 0$. But when It is set up as $\displaystyle y' + 2y = 0$, I get a explicit solution of $\displaystyle y = Ce^{-2t}$. When I go to solve for $\displaystyle C$ then, $\displaystyle y$ and $\displaystyle t$ will be $\displaystyle 0$, which will give me a value of $\displaystyle 0$ for $\displaystyle C$, so I must be doing something wrong on the second part, probably not fully understanding the meaning of the question. But the answer in the back of the book for the second part is the following: $\displaystyle y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $\displaystyle t > 1$. I just don't see how they got that unless I'm supposed to do something with my explicit solution I got from the first part of the problem.

You will need to solve two separate DEs, namely $\displaystyle \displaystyle \frac{dy}{dt} + 2y = 0$ for $\displaystyle \displaystyle t > 1$, and $\displaystyle \displaystyle \frac{dy}{dt} + 2y = 1$ for $\displaystyle \displaystyle 0 \leq t \leq 1$.

Re: Solve the initial value problem

Quote:

Originally Posted by

**Prove It** You will need to solve two separate DEs, namely $\displaystyle \displaystyle \frac{dy}{dt} + 2y = 0$ for $\displaystyle \displaystyle t > 1$, and $\displaystyle \displaystyle \frac{dy}{dt} + 2y = 1$ for $\displaystyle \displaystyle 0 \leq t \leq 1$.

Hmmm, yeah I did that. What I'm having trouble understanding is what to plug in for $\displaystyle y$ and $\displaystyle t$ after I solve for the DE in which the condition is $\displaystyle t > 1$. Because the initial condition of the problem is $\displaystyle y(0)=0$, so if I plug that into $\displaystyle y=Ce^{-2t}$, and solve for $\displaystyle C$, you end up with $\displaystyle 0 = C(1)$, which is still $\displaystyle C = 0$. And that doesn't help with plugging back into $\displaystyle y=Ce^{-2t}$. Perhaps I'm understanding you wrong, I don't know.

Re: Solve the initial value problem

Quote:

Originally Posted by

**VitaX** Hmmm, yeah I did that. What I'm having trouble understanding is what to plug in for $\displaystyle y$ and $\displaystyle t$ after I solve for the DE in which the condition is $\displaystyle t > 1$. Because the initial condition of the problem is $\displaystyle y(0)=0$, so if I plug that into $\displaystyle y=Ce^{-2t}$, and solve for $\displaystyle C$, you end up with $\displaystyle 0 = C(1)$, which is still $\displaystyle C = 0$. And that doesn't help with plugging back into $\displaystyle y=Ce^{-2t}$.

You will only be able to substitute the initial condition into the DE which has $\displaystyle \displaystyle g(t) = 1$. The other solution will have to have an arbitrary constant.

Re: Solve the initial value problem

Quote:

Originally Posted by

**Prove It** You will only be able to substitute the initial condition into the DE which has $\displaystyle \displaystyle g(t) = 1$. The other solution will have to have an arbitrary constant.

How exactly did the book obtain this for $\displaystyle g(t) = 0$, $\displaystyle y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $\displaystyle t > 1$? I just am not seeing what they did to obtain that at all when looking at what I got $\displaystyle y=Ce^{-2t}$. Mine has the arbitrary constant but the books version of the answer does not. I dunno, perhaps I'm still understanding you wrong. The first part of this question is very easy compared to the second part.

Re: Solve the initial value problem

Quote:

Originally Posted by

**VitaX** **Discontinuous Coefficients.** Linear differential equations sometimes occur in which one or both of the functions $\displaystyle p$ and $\displaystyle g$ have jump discontinuities. If $\displaystyle t_0$ is such a point of discontinuity, then it is necessary to solve the equation separately for $\displaystyle t < t_0$ and $\displaystyle t > t_0$. Afterward, the two solutions are matched so that $\displaystyle y$ is continuous at $\displaystyle t_0$; this is accomplished by a proper choice of the arbitrary constants.

Solve the initial value problem

$\displaystyle y' + 2y = g(t)$, $\displaystyle y(0) = 0$

where

$\displaystyle g(t) = 1, 0 \leq t \leq 1,$ and

$\displaystyle g(t) = 0, t > 1$

I got the correct answer in the back of the book using g(t) = 1 and solving the initial value problem. For the first part I got $\displaystyle y = \frac{1}{2}(1-e^{-2t})$ for $\displaystyle 0 \leq t \leq 1$.

Perhaps I'm going about solving the initial value problem wrong when $\displaystyle g(t) = 0$. But when It is set up as $\displaystyle y' + 2y = 0$, I get a explicit solution of $\displaystyle y = Ce^{-2t}$. When I go to solve for $\displaystyle C$ then, $\displaystyle y$ and $\displaystyle t$ will be $\displaystyle 0$, which will give me a value of $\displaystyle 0$ for $\displaystyle C$, so I must be doing something wrong on the second part, probably not fully understanding the meaning of the question. But the answer in the back of the book for the second part is the following: $\displaystyle y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $\displaystyle t > 1$. I just don't see how they got that unless I'm supposed to do something with my explicit solution I got from the first part of the problem.

A different expression for $\displaystyle g(t)$ is...

$\displaystyle g(t) = \mathcal{U} (t) - \mathcal{U} (t-1)$ (1)

... where $\displaystyle \mathcal{U} (*)$ is the 'Heaviside step function' defined as...

$\displaystyle \mathcal{U}(t)=\begin{cases}0&t<0\\ \frac{1}{2}&t=0\\ 1&t>0\end{cases}$ (2)

Because is $\displaystyle \mathcal{L}\{\mathcal{U}(t)\}= \frac{1}{s}$ the 'initial value problem'...

$\displaystyle y^{'}+2 y = g(t)\ ;\ y(0)=0$ (3)

... written in term of Laplace Transform is...

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

... that can be algebrically solved in the s domain...

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$

Re: Solve the initial value problem

Quote:

Originally Posted by

**chisigma** A different expression for $\displaystyle g(t)$ is...

$\displaystyle g(t) = \mathcal{U} (t) - \mathcal{U} (t-1)$ (1)

... where $\displaystyle \mathcal{U} (*)$ is the 'Heaviside step function' defined as...

$\displaystyle \mathcal{U}(t)=\begin{cases}0&t<0\\ \frac{1}{2}&t=0\\ 1&t>0\end{cases}$ (2)

Because is $\displaystyle \mathcal{L}\{\mathcal{U}(t)\}= \frac{1}{s}$ the 'initial value problem'...

$\displaystyle y^{'}+2 y = g(t)\ ;\ y(0)=0$ (3)

... written in term of Laplace Transform is...

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

... that can be algebrically solved in the s domain...

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$

Thanks for the info, but I'm still only in the beginning portion of Differential Equations. Only learned 1st ODE's thus far, so I don't really know much of what you're talking about sadly.

Re: Solve the initial value problem

Bump, can anyone explain to me how to solve $\displaystyle y' + 2y = 0$ so I end up with $\displaystyle y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $\displaystyle t > 1$. I'm just not fully understanding Prove it above.

Re: Solve the initial value problem

Quote:

Originally Posted by

**VitaX** Bump, can anyone explain to me how to solve $\displaystyle y' + 2y = 0$ so I end up with $\displaystyle y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $\displaystyle t > 1$. I'm just not fully understanding Prove it above.

Since this is first order linear, you need to use the Integrating Factor, which is $\displaystyle \displaystyle e^{\int{2\,dt}} = e^{2t}$. Multiplying both sides of the DE by this gives

$\displaystyle \displaystyle \begin{align*}e^{2t}\,\frac{dy}{dt} + 2e^{2t}\,y &= 0 \\ \frac{d}{dt}\left(e^{2t}\,y\right) &= 0 \\ e^{2t}\,y &= \int{0\,dt} \\ e^{2t}\,y &= C \\ y &= Ce^{-2t}\end{align*}$

Now the ONLY way you can get the answer that the book has given is if they give you another boundary condition.

Re: Solve the initial value problem

Quote:

Originally Posted by

**VitaX** Bump, can anyone explain to me how to solve $\displaystyle y' + 2y = 0$ so I end up with $\displaystyle y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $\displaystyle t > 1$. I'm just not fully understanding Prove it above.

The 'conventional' approach to a linear constant coefficients ODE...

$\displaystyle y^{'} + a\ y = g(t)$ (1)

... works very well when $\displaystyle g(t)$ is a *continous function*. In Your case however $\displaystyle g(t)$ contains the Heaviside step function...

$\displaystyle \mathcal{U}(t)=\begin{cases}0&t<0\\ \frac{1}{2}&t=0\\ 1&t>0\end{cases}$ (2)

... which is not continous. Oliver Heaviside was a self-taught English electrical engineer [as I am...], born in 1850, who invented, among other 'wonders', mathematical techniques to the solution of differential equations that at the time were considered 'unsolvable'. But Heaviside wasn't a mathematician and above all was self-taugh, so that he was in any way 'defamed' by the 'Holy Accademy' till to be expelled from the Royal Society for 'unworthiness' (Doh)...

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$

Re: Solve the initial value problem

Quote:

Originally Posted by

**Prove It** Since this is first order linear, you need to use the Integrating Factor, which is $\displaystyle \displaystyle e^{\int{2\,dt}} = e^{2t}$. Multiplying both sides of the DE by this gives

$\displaystyle \displaystyle \begin{align*}e^{2t}\,\frac{dy}{dt} + 2e^{2t}\,y &= 0 \\ \frac{d}{dt}\left(e^{2t}\,y\right) &= 0 \\ e^{2t}\,y &= \int{0\,dt} \\ e^{2t}\,y &= C \\ y &= Ce^{-2t}\end{align*}$

Now the ONLY way you can get the answer that the book has given is if they give you another boundary condition.

Yeah I got the same solution as you did, as for the boundary conditions part, I listed the entire question in the original post so...yeah the book's answer is a bit odd. My teacher said something today about matching the solutions. Basically I just set both equations equal to each other and solved for C. In the end my solution to each DE matched. Probably wrong but, finished anyway.

Re: Solve the initial value problem

Quote:

Originally Posted by

**chisigma** The 'conventional' approach to a linear constant coefficients ODE...

$\displaystyle y^{'} + a\ y = g(t)$ (1)

... works very well when $\displaystyle g(t)$ is a *continous function*. In Your case however $\displaystyle g(t)$ contains the Heaviside step function...

$\displaystyle \mathcal{U}(t)=\begin{cases}0&t<0\\ \frac{1}{2}&t=0\\ 1&t>0\end{cases}$ (2)

... which is not continous. Oliver Heaviside was a self-taught English electrical engineer [as I am...], born in 1850, who invented, among other 'wonders', mathematical techniques to the solution of differential equations that at the time were considered 'unsolvable'. But Heaviside wasn't a mathematician and above all was self-taugh, so that he was in any way 'defamed' by the 'Holy Accademy' till to be expelled from the Royal Society for 'unworthiness' (Doh)...

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$

Nice bit of info, is that who your avatar is of?

Re: Solve the initial value problem

Quote:

Originally Posted by

**VitaX** Nice bit of info, is that who your avatar is of?

A portrait of Oliver Heaviside by Francis Edwin Hodge is represented here...

http://digilander.libero.it/luposaba..._Heaviside.jpg

... so that he isn't the fellow of my avatar...

... the fellow of my avatar is the Italian physicist Ettore Majorana and if You want to know more information about him we have to open a dedicated thread...

Kind regards

$\displaystyle \chi$ $\displaystyle \sigma$