# solving a simple DE using the Laplace Transform - am i doing it right?

• May 31st 2011, 12:36 PM
chogo
solving a simple DE using the Laplace Transform - am i doing it right?
Hi all. I have been trying to relearn the laplace transform. I want to solve this second order ode

$y^{''}+y^{'}+y=1$

I know this can be easier done using the characteristic equation but I want to use the laplace tansform for learning purposes

here is my solution - is this right? have i done something stupid?

step 1 - $L(y^{''})+L(y^{'})+L(y)=L(1)$

$=> S^{2}L(y) - Sy(0) - y^{'}(0) + SL(y)-y(0)+L(y)=L(1)$

*here i am confused. With no initial conditions does the equation become*

$=> S^{2}L(y) + SL(y) +L(y)=1/S$

then $L(y) = \frac{1}{S\cdot(S^{2}+S+1)}$

step 2 - I factorise the quadratic and that becomes

$L(y) = \frac{1}{S\cdot(S+(\frac{1}{2}+\frac{\sqrt {3}}{2}))(S+(\frac{1}{2}-\frac{\sqrt{3}}{2}))}$

*i am sure what i did here with partial fractions is wrong*

$L(y) = \frac{1}{S}+\frac{A}{(S+(\frac{1}{2}+\frac{\sqrt {3}}{2}))}+\frac{B}{(S+(\frac{1}{2}-\frac{\sqrt{3}}{2}))}$

step 3 - take the inverse laplace transform

if i take the inverse laplace transform i get the result from the characteristic equation

$Ae^{\frac{1}{2}+\frac{\sqrt {3}}{2}} + Be^{\frac{1}{2}-\frac{\sqrt {3}}{2}} + 1$

are my steps correct?

thanks for any help
• May 31st 2011, 12:53 PM
zortharg
One thing is obviously wrong. e^(.5+/-sqrt(3)/2) is a constant. y is supposed to be a function of something, be it x or t. Moreover, this equation has a negative discriminant, I can see that right off the bat since b^2-4ac is -3 (the coefficients a b and c are all 1), so you should be getting complex roots.
• May 31st 2011, 12:58 PM
TheEmptySet
First it looks like you assumed that all of your initial conditions are zero.

When you have

$\mathcal{L}\{y\}=\frac{1}{s(s^2+s+1)}=\frac{1}{s} \cdot \frac{1}{(s+\frac{1}{2})^2+\left(\frac{\sqrt{3}}{2 } \right)^2}$

This is an irreducible quadratic so the inverse transform will be sines and/or cosines multiplied by an expoential. This comes from the shifting theorem.

$\mathcal{L}\{e^{at}f(t) \}=F(s-a)$

we are just using it in reverse.

Also the factor of $\frac{1}{s}$
says that you can just integrate the inverse transform of the 2nd fraction (The convolution theorem) so you get

$y(t)=\int_{0}^{t}\frac{2}{\sqrt{3}}e^{-\frac{\tau}{2}}\sin\left( \frac{\sqrt{3}}{2}\tau\right)d\tau$
• May 31st 2011, 02:32 PM
chogo
thanks TheEmptySet

I kind of see what you mean, but unfortunately i am more confused

how did you get $\mathcal{L}\{y\}=\frac{1}{s(s^2+s+1)}=\frac{1}{s} \cdot \frac{1}{(s+\frac{1}{2})+\left(\frac{\sqrt{3}}{2} \right)^2}$

to avoid the irreducible quadratic could i not just search for $y^{''}+y^{'}+y=0$ and then tag on a solution. Would this be easier

also apologies, the quadratic has complex roots
• May 31st 2011, 03:27 PM
TheEmptySet
Quote:

Originally Posted by chogo
thanks TheEmptySet

I kind of see what you mean, but unfortunately i am more confused

how did you get $\mathcal{L}\{y\}=\frac{1}{s(s^2+s+1)}=\frac{1}{s} \cdot \frac{1}{(s+\frac{1}{2})+\left(\frac{\sqrt{3}}{2} \right)^2}$

to avoid the irreducible quadratic could i not just search for $y^{''}+y^{'}+y=0$ and then tag on a solution. Would this be easier

also apologies, the quadratic has complex roots

Sorry I can see why you are confused I left a square off one of my terms.

$s^2+s+1=s^2+s+\frac{1}{4}-\frac{1}{4}+1$

Now if we factor the first 3 terms we get

$s^2+s+\frac{1}{4}-\frac{1}{4}+1=\left(s+\frac{1}{2} \right)^2+ \left(\frac{\sqrt{3}}{2} \right)^2$

I hope this clears itup.
• May 31st 2011, 04:31 PM
chogo
wow i see, thats really clever!

i will let it digest further

One final thing, i assume the initial conditions are zero. Should you avoid solving a DE like this using the Laplace transform if you do not have the initial conditions

thanks for your help and time
• May 31st 2011, 04:47 PM
TheEmptySet
Quote:

Originally Posted by chogo
wow i see, thats really clever!

i will let it digest further

One final thing, i assume the initial conditions are zero. Should you avoid solving a DE like this using the Laplace transform if you do not have the initial conditions

thanks for your help and time

Well The Laplace trasform works really well when you do have initial conditions but if you don't know them you could just suppose that

$y(0)=c_1 \quad y'(0)=c_2$

Now if you take the Laplace transform you get

$s^2Y-sc_1-c_2+sY-c_1+Y=\frac{1}{s}$

Now solving for Y gives

$(s^2+s+1)Y-sc_1-c_1-c_2=\frac{1}{s}$

$(s^2+s+1)Y= sc_1+(c_1+c_2)+\frac{1}{s} \iff Y =\frac{sc_1}{(s+\frac{1}{2})^2+(\frac{\sqrt{3}}{2} )^2}+\frac{c_1+c_2}{(s+\frac{1}{2})^2+(\frac{\sqrt {3}}{2})^2}+\frac{1}{s}\frac{1}{(s+\frac{1}{2})^2+ (\frac{\sqrt{3}}{2})^2}$

Now we just have to fix the first one (add one half c_1 and subtract to balance) so we can use the shifting theorem

$Y =\frac{c_1(s+\frac{1}{2})}{(s+\frac{1}{2})^2+( \frac{\sqrt{3}}{2} )^2}+\frac{\frac{1}{2}c_1+c_2}{(s+ \frac{1}{2} )^2+( \frac{\sqrt{3}}{2} )^2}+\frac{1}{s}\frac{1}{(s+ \frac{1}{2} )^2+( \frac{\sqrt{3}}{2} )^2}$

So the inverse transform is

$y =c_1 e^{-\frac{t}{2}}\cos\left( \frac{\sqrt{3}}{2}t \right) + (\frac{1}{2}c_1+c_2)\frac{2}{\sqrt{3}}e^{-\frac{t}{2}}\sin\left( \frac{\sqrt{3}}{2}t \right) +\frac{2}{\sqrt{3}}\int_{0}^{t} e^{-\frac{\tau}{2}}\sin\left( \frac{\sqrt{3}}{2}\tau \right) d\tau$

So as you may have noticed this may be a bit more work.
• June 1st 2011, 05:49 AM
chogo
thank you very much for your time and patience. I really appreciate the help