# Thread: Solve the initial value problem

1. ## Solve the initial value problem

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

Solve the initial value problem

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

where

$g(t) = 1, 0 \leq t \leq 1,$ and
$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 $y = \frac{1}{2}(1-e^{-2t})$ for $0 \leq t \leq 1$.

Perhaps I'm going about solving the initial value problem wrong when $g(t) = 0$. But when It is set up as $y' + 2y = 0$, I get a explicit solution of $y = Ce^{-2t}$. When I go to solve for $C$ then, $y$ and $t$ will be $0$, which will give me a value of $0$ for $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: $y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $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.

2. ## Re: Solve the initial value problem

Originally Posted by VitaX
Solve the initial value problem

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

where

$g(t) = 1, 0 \leq t \leq 1,$ and
$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 $y = \frac{1}{2}(1-e^{-2t})$ for $0 \leq t \leq 1$.

Perhaps I'm going about solving the initial value problem wrong when $g(t) = 0$. But when It is set up as $y' + 2y = 0$, I get a explicit solution of $y = Ce^{-2t}$. When I go to solve for $C$ then, $y$ and $t$ will be $0$, which will give me a value of $0$ for $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: $y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $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 \frac{dy}{dt} + 2y = 0$ for $\displaystyle t > 1$, and $\displaystyle \frac{dy}{dt} + 2y = 1$ for $\displaystyle 0 \leq t \leq 1$.

3. ## Re: Solve the initial value problem

Originally Posted by Prove It
You will need to solve two separate DEs, namely $\displaystyle \frac{dy}{dt} + 2y = 0$ for $\displaystyle t > 1$, and $\displaystyle \frac{dy}{dt} + 2y = 1$ for $\displaystyle 0 \leq t \leq 1$.
Hmmm, yeah I did that. What I'm having trouble understanding is what to plug in for $y$ and $t$ after I solve for the DE in which the condition is $t > 1$. Because the initial condition of the problem is $y(0)=0$, so if I plug that into $y=Ce^{-2t}$, and solve for $C$, you end up with $0 = C(1)$, which is still $C = 0$. And that doesn't help with plugging back into $y=Ce^{-2t}$. Perhaps I'm understanding you wrong, I don't know.

4. ## Re: Solve the initial value problem

Originally Posted by VitaX
Hmmm, yeah I did that. What I'm having trouble understanding is what to plug in for $y$ and $t$ after I solve for the DE in which the condition is $t > 1$. Because the initial condition of the problem is $y(0)=0$, so if I plug that into $y=Ce^{-2t}$, and solve for $C$, you end up with $0 = C(1)$, which is still $C = 0$. And that doesn't help with plugging back into $y=Ce^{-2t}$.
You will only be able to substitute the initial condition into the DE which has $\displaystyle g(t) = 1$. The other solution will have to have an arbitrary constant.

5. ## Re: Solve the initial value problem

Originally Posted by Prove It
You will only be able to substitute the initial condition into the DE which has $\displaystyle g(t) = 1$. The other solution will have to have an arbitrary constant.
How exactly did the book obtain this for $g(t) = 0$, $y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $t > 1$? I just am not seeing what they did to obtain that at all when looking at what I got $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.

6. ## Re: Solve the initial value problem

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

Solve the initial value problem

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

where

$g(t) = 1, 0 \leq t \leq 1,$ and
$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 $y = \frac{1}{2}(1-e^{-2t})$ for $0 \leq t \leq 1$.

Perhaps I'm going about solving the initial value problem wrong when $g(t) = 0$. But when It is set up as $y' + 2y = 0$, I get a explicit solution of $y = Ce^{-2t}$. When I go to solve for $C$ then, $y$ and $t$ will be $0$, which will give me a value of $0$ for $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: $y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $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 $g(t)$ is...

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

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

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

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

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

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

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

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

Kind regards

$\chi$ $\sigma$

7. ## Re: Solve the initial value problem

Originally Posted by chisigma
A different expression for $g(t)$ is...

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

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

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

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

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

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

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

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

Kind regards

$\chi$ $\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.

8. ## Re: Solve the initial value problem

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

9. ## Re: Solve the initial value problem

Originally Posted by VitaX
Bump, can anyone explain to me how to solve $y' + 2y = 0$ so I end up with $y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $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 e^{\int{2\,dt}} = e^{2t}$. Multiplying both sides of the DE by this gives

\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.

10. ## Re: Solve the initial value problem

Originally Posted by VitaX
Bump, can anyone explain to me how to solve $y' + 2y = 0$ so I end up with $y = \frac{1}{2}(e^2 - 1)e^{-2t}$ for $t > 1$. I'm just not fully understanding Prove it above.
The 'conventional' approach to a linear constant coefficients ODE...

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

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

$\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' ...

Kind regards

$\chi$ $\sigma$

11. ## Re: Solve the initial value problem

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

\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.

12. ## Re: Solve the initial value problem

Originally Posted by chisigma
The 'conventional' approach to a linear constant coefficients ODE...

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

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

$\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' ...

Kind regards

$\chi$ $\sigma$
Nice bit of info, is that who your avatar is of?

13. ## Re: Solve the initial value problem

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...

... 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

$\chi$ $\sigma$