# Thread: how to solve this

1. Right. But you're just going to use the $\displaystyle y=\frac{\sin x + \cos x}{2} + Ce^{-x}$ part of $\displaystyle y.$

I don't get $\displaystyle C=6-2e^{-\pi/2}.$ Can you post your work?

2. sorry i was wrong. at $\displaystyle x=\pi/2$, we have $\displaystyle y=3-e^{-\pi/2}$. so putting this values, we get $\displaystyle (3-e^{-\pi/2})e^{\pi/2} = \frac{e^{\pi/2}}{2}(\sin {\pi/2} + \cos {\pi/2}) + C$ ie, $\displaystyle C = e^{\pi/2}(3-e^{-\pi/2} -1/2)$

3. That's correct, though you can simplify. So, you can now write down your final answer. What do you get?

4. i get $\displaystyle y=3-e^{-x}, 0<x<\pi/2$
$\displaystyle =\frac{\sin x + \cos x}{2} e^{\pi/2}(\frac{5}{2}-e^{-\pi/2}), x>\pi/2$

5. I think you're missing a plus sign, as well as an exponential in there.

6. this will be the second part $\displaystyle \frac{\sin x + \cos x}{2} +e^{-x} e^{\pi/2}(\frac{5}{2}-e^{-\pi/2}), x>\pi/2$

7. There you go. I'd say you're done now, except for maybe even a tad bit more simplification on your second part there (multiply the $\displaystyle e^{\pi/2}$ through the parentheses to simplify a bit more).

8. Originally Posted by Ackbeet

I'm not following you. What do you mean by "queue" and "head"? I would agree that the LT is a very convenient method of solution for this problem (non-homogeneous IVP's, especially with respect to piece-wise defined functions). However, as Sambit appears not to be familiar with DE's in general, I think the problem is more basic than that.

I would argue that the way I've set the problem up, you will theoretically get a continuous solution on the desired interval. I mean, the initial condition for the region x >= 3 is as I've given, correct?
The DE is...

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

... and now, in order to clarify what I ment in my post, let's suppose that is...

$\displaystyle g(t)=\left\{\begin{array}{ll}3 ,\,\,0 < t < \frac{\pi}{2}\\{}\\0 ,\,\, x>\frac{\pi}{2}\end{array}\right.$ (2)

... or , which is the same, ...

$\displaystyle g(t)= 3\ \{\mathcal {H} (t) - \mathcal {H} (t-\frac{\pi}{2})\}$ (3)

... where $\displaystyle \mathcal{H} (*)$ is the so called 'Heavyside Step Function'. The (2)-(3) is what I called 'head' of g(t). Now if we write (1) in term of Laplace Transform we have...

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

... and from (4)...

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

Now we can derive y(t) performing the inverse LT of (5)...

$\displaystyle \displaystyle y(t) = \mathcal{L}^{-1} \{Y(s)\} = (3-e^{-t})\ \mathcal{H} (t) -3\ (1- e^{-(t-\frac{\pi}{2})})\ \mathcal {H} (t-\frac{\pi}{2})$ (6)

... and it is evident in (6) that the 'queue' of the y(t) when we take into account the only 'head' of g(t) doesn't vanish after $\displaystyle t= \frac{\pi}{2}$. The initial problem is of course more complex because we have to consider also the 'queue' of g(t) that is...

$\displaystyle \displaystyle g_{q} (t) = \cos t\ \mathcal{H} (t-\frac{\pi}{2})$ (7)

Kind regards

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

$\displaystyle \displaystyle y(t)=\begin{cases} 3-e^{-t},\quad 0<t<\pi/2\\ \frac{\sin(t) + \cos(t)}{2} +e^{-t} (\frac{5}{2}\,e^{\pi/2}-1),\quad\pi/2\le t \end{cases}$