Differential Equations with Discontinuous Forcing Functions

_N3WTON_
Messages
350
Reaction score
3

Homework Statement


Solve the given initial value problem:
y'' + y = u(t-\pi) - u(t-2 \pi)
y(0) = 0
y'(0) = 1

Homework Equations

The Attempt at a Solution


First I took the Laplace transform of both sides:
\mathcal{L}[y'' + y ] = \mathcal{L}(u(t-\pi)) - \mathcal{L}(u(t-2 \pi))
(s^{2}Y(s) - sy(0) - y'(0)) + Y(s) = \frac{e^{-\pi s}}{s} - \frac{e^{-2 \pi s}}{s}
s^{2}Y(s) - 1 + Y(s) = \frac{e^{-\pi s}-e^{-2 \pi s}}{s} + 1
Y(s)(s^{2}+1) = \frac{e^{-\pi s}-e^{-2 \pi s}+s}{s}
Y(s) = \frac{e^{-\pi s}-e^{-2 \pi s} + s}{s(s^{2}+1)}
At this point I get stuck, I tried doing a partial fraction decomp, but that didn't seem to get me anywhere closer to the solution..
 
Physics news on Phys.org
_N3WTON_ said:

Homework Statement


Solve the given initial value problem:
y'' + y = u(t-\pi) - u(t-2 \pi)
y(0) = 0
y'(0) = 1

Homework Equations

The Attempt at a Solution


First I took the Laplace transform of both sides:
\mathcal{L}[y'' + y ] = \mathcal{L}(u(t-\pi)) - \mathcal{L}(u(t-2 \pi))
(s^{2}Y(s) - sy(0) - y'(0)) + Y(s) = \frac{e^{-\pi s}}{s} - \frac{e^{-2 \pi s}}{s}
s^{2}Y(s) - 1 + Y(s) = \frac{e^{-\pi s}-e^{-2 \pi s}}{s} + 1
Y(s)(s^{2}+1) = \frac{e^{-\pi s}-e^{-2 \pi s}+s}{s}
Y(s) = \frac{e^{-\pi s}-e^{-2 \pi s} + s}{s(s^{2}+1)}
At this point I get stuck, I tried doing a partial fraction decomp, but that didn't seem to get me anywhere closer to the solution..
I haven't checked your algebra, but assuming it is correct you need to use the formula$$
\mathcal Lf(t-a)u(t-a) = e^{-as}\mathcal L(f(t)) = e^{-as}F(s)$$So if you have a transform ##F(s)## that is multiplied by ##e^{-as}## all you have to do is invert the ##F(s)## to ##f(t)## then truncate and translate it go get ##f(t-a)u(t-a)##. So just break up your problem into three fractions and work them separately.
 
LCKurtz said:
I haven't checked your algebra, but assuming it is correct you need to use the formula$$
\mathcal Lf(t-a)u(t-a) = e^{-as}\mathcal L(f(t)) = e^{-as}F(s)$$So if you have a transform ##F(s)## that is multiplied by ##e^{-as}## all you have to do is invert the ##F(s)## to ##f(t)## then truncate and translate it go get ##f(t-a)u(t-a)##. So just break up your problem into three fractions and work them separately.
ah, ok.. So I'll have something like:
Y(s) = \frac{e^{-\pi s}}{s(s^{2}+1)} - \frac{e^{-2\pi s}}{s(s^{2}+1)} + \frac{1}{s^{2}+1}
Then I would do a decomposition on this last fraction and then apply the inverse Laplace?
 
LCKurtz said:
I haven't checked your algebra, but assuming it is correct you need to use the formula$$
\mathcal Lf(t-a)u(t-a) = e^{-as}\mathcal L(f(t)) = e^{-as}F(s)$$So if you have a transform ##F(s)## that is multiplied by ##e^{-as}## all you have to do is invert the ##F(s)## to ##f(t)## then truncate and translate it go get ##f(t-a)u(t-a)##. So just break up your problem into three fractions and work them separately.
_N3WTON_ said:
ah, ok.. So I'll have something like:
Y(s) = \frac{e^{-\pi s}}{s(s^{2}+1)} - \frac{e^{-2\pi s}}{s(s^{2}+1)} + \frac{1}{s^{2}+1}
Then I would do a decomposition on this last fraction and then apply the inverse Laplace?

Yes. Use the formula on each of the first two and do the third one by itself. Then add the three answers.
 
LCKurtz said:
Yes. Use the formula on each of the first two and do the third one by itself. Then add the three answers.
ok...I'm getting a lot of terms so I wanted to make sure I'm doing this correctly. For my decomposition I found:
\frac{1}{s(s^{2}+1)} = \frac{1}{s} - \frac{s}{s^{2}+1}
Therefore, I found the following:
Y(s) = \frac{e^{-\pi s}}{s} - \frac{se^{-\pi s}}{s^{2}+1} - \frac{e^{-2\pi s}}{s} + \frac{se^{-2\pi s}}{s^{2}+1} - \frac{1}{s^{2}+1}
So after applying the inverse Laplace I get:
y(t) = u(t - \pi)-\cos (t-\pi)u(t-\pi) - u(t -2\pi)+\cos (t-2\pi)u(t-2\pi)+\sin t
The above answer can probably be simplified, but I'll worry about that later :)
 
Last edited:
That's the idea. Hopefully it's starting to look more like your given solution.
 
LCKurtz said:
That's the idea. Hopefully it's starting to look more like your given solution.
It definitely looks close, the given solution is:
\sin t + u(t-\pi)(1-\cos (t-\pi)) - u(t-2\pi)(1-\cos (t -2\pi))
I need to check and make sure my signs are okay, but I think I've got the hang of it, thanks for the help!
 
Back
Top