# Laplace Transform

1. Mar 3, 2013

### Fisher92

1. The problem statement, all variables and given/known data
Differential equation:

$$\frac{d^2x}{dt^2}+4\frac{dx}{dt}+4x=6e^{-2t}$$

with initial conditions $$x(0)=-2 and \frac{dx}{dt}(0)=8$$

Use the laplace transform to solve for x(t)

2. Relevant equations

http://www.atp.ruhr-uni-bochum.de/rt1/syscontrol/node9.html

Laplace transform theorems

3. The attempt at a solution
Taking Laplace transform results:

$${s^2X(s)-sx(0-)-f(0-)}+4{sX(s)-f(0-)}+{4X(s)}=6X(s+2)$$

I am not sure about this but I *think* its right, the e term worries me a bit?????

Normally I would just throw the initial conditions in here but I have a differential initial condition - not sure what to do with it?

This is for an intro control systems course so I may be missing something very easy??

Thanks

2. Mar 4, 2013

### SteamKing

Staff Emeritus
Your Laplace transform of the original DE is lacking. The boundary conditions form an integral part of the transform process.

specifically the table of Laplace transforms for the first and second derivative.

3. Mar 4, 2013

### Fisher92

I figured that I was missing something fundamental here but I still can't see it? -"The boundary conditions form an integral part of the transform process." Can't seem to find a good explanation of this in the wiki article or my text book, can you explain it a bit please.

Also, I checked my 1st and 2nd derivative transformation against the table in the wiki and my text book and saw that they are different??? wiki: f''(t)=s^2f(s)-sf(0)-f'(0)
text book: f''=s^2F(s)-sf(0-)-f(0-)///////My text book (Control Systems, Nise) seems to omit the first derivative in the Laplace transform of a second derivative???

Thanks a lot/

4. Mar 4, 2013

### schmiggy

Ahhh Laplace.. the bane of my existence..

Firstly, I am not a homework helper so take what I have written with caution and wait for confirmation from someone more qualified.

Secondly, the wiki page is correct for first and second diff. I can't comment on your text book as I've never used it, but the wiki information for this specific detail is correct (at least according to what I was taught).

The below is just the original question rewritten into notations I'm familiar with:
$$y" + 4y' + 4y = 6e^{-2t}$$ where y" = second diff, y' = first
y(0) = -2 and y'(0) = 8

My first step is usually check the RHS and transform accordingly before working with the left (truthfully I begin with LHS and RHS in the one step, but for simplicity I'm splitting it).

Then I will substitute the respective equivalent for y" and y', paying careful attention to any coefficients. You'll end up with something like:
$$s^{2}L[y] + 2s - 8 +4sL[y] + 8 + 4L[y] = \frac{6}{s + 2}$$
Next, group the L[y] terms and transfer non "L[y]" terms to the RHS, thus:
$$L[y](s^{2} +4s + 4) = \frac{6}{s + 2} -2s$$ or similarly: $$L[y](s + 2)^{2} = \frac{6}{s + 2} -2s$$
The problem is not finished, but hopefully you can finish from here.

5. Mar 4, 2013

### SteamKing

Staff Emeritus
6. Mar 4, 2013

### Fisher92

Thanks for the help so far, fyi (if interested) my textbook is the same as wiki only it has the first derivative denoted as a dot instead of ' so I missed it, the conditions make much more sense now. The problem asks for x(t) so I now just use Laplace to go back to the time domain?
Having some trouble with this, i'm trying to use inverse laplace but confusing myself a lot.

- Picking up where schmiggy left off (saw that I messed up the e term two -thanks) -

$$L[y](s + 2)^{2} = \frac{6}{s + 2} -2s$$

what is the L[y]? just a change in variable name? L[y] = F[x]?

inverse Laplace: $$\frac{6}{s + 2} -2s =6e^{-2t} - 1/x(t)$$

I think that I've already messed this up with the lase term?

Thanks

7. Mar 4, 2013

### schmiggy

L[y] is the laplace transform. L[y] shouldn't disappear. Also you've done the inverse laplace of the RHS prematurely.

You need to divide the LHS by (s + 2)^2 to get it to the RHS and L[y] by itself. Before doing that though you need to combine $$\frac{6}{s + 2} -2s$$ into one term. The final step before calculating the inverse laplace transform will be to use partial fractions to find all the terms.

8. Mar 5, 2013

### Fisher92

Thanks,

where I'm at now:

$$\frac{6}{s + 2} -2s = \frac{6+(-2s)(s+2)}{s+2}=\frac{2(-s^2-2s+3)}{s+2}$$
$$\frac{(\frac{2(-s^2-2s+3)}{s+2})}{((s+2)^2)}=L[y]$$
$$=\frac{2(-s^2-2s+3)}{(s+2)^3} =\frac{-2s^2-4s+6}{(s+2)^3}$$
$$\frac{-2s^2-4s+6}{(s+2)^3}=\frac{x}{s+2}+\frac{y}{(s+2)^2}+\frac{z}{(s+2)^3}$$
$$-2s^2-4s+6=(s+2)^2*x+(s+2)*y+z$$
$$-2s^2-4s+6=(s^2+4s+4)x+(s+2)y+z$$
equating coefficients:
$$6=4x+2y+z$$
$$-4=4x+y$$
$$-2=x$$
solving...
$$\frac{2(-s^2-2s+3)}{(s+2)^3} = \frac{-2}{s+2}+\frac{4}{(s+2)^2}+\frac{6}{(s+2)^3}$$

god damn partial fractions!

Hopefully that's right/ inverse Laplace:

$$L[\frac{-2}{s+2}]+L[\frac{4}{(s+2)^2}]+L[\frac{6}{(s+2)^3}]=$$
$$x(t)=-2e^{2t}+4????+6??????$$

Having some trouble with the inverse Laplace of the 2nd and 3rd term and am also unsure of the first. The table doesn't have laplace for 1/(s+a)^2?

Thanks for helping out.

9. Mar 5, 2013

### schmiggy

Have you covered the s-shift theorem yet?

10. Mar 5, 2013

### Fisher92

I have now but I'm not totally sure how it applies?
L[e^(-at)f(t)]=F1(s)+f2(s)
2nd and 3rd term are f1 and f2 respectively?

$$L[\frac{4}{(s+2)^2}]+L[\frac{6}{(s+2)^3}]=4(t+2)^2+6(t+2)^3$$?

11. Mar 5, 2013

### Fisher92

Oops! thats the Linearity theorem
L[e^(-at)f(t)]=F(s+a)

I have s^2 + a^2, can i treat s as s2? I think probably not?

Thanks

12. Mar 5, 2013

### schmiggy

You'll get a better definition of the s-shifting theorem if you watch a youtube video or read about it (also known as first shifting theorem) but I can try demonstrate by example.
$$\frac{4}{(s+2)^2}$$
Pretend the inner term on the denominator isn't there initially, so the term would become:
$$\frac{4}{s^2}$$
Calculating the laplace transformation of the above you get: 4t
Next you want to calculate the laplace of the term we pretended didn't exist, only rather than trying to transform (s+2), you'll be transforming 1/(s+2), which becomes:
$$e^{-2t}$$
Combining the two, you get:
$$4te^{-2t}$$
Now try it with the next.

It would be great if an actual homework helper would chime in, thanks.

13. Mar 5, 2013

### Fisher92

$$x(t)=4(t+2)^2+4te^{-2t}+L^{-1}[\frac{6}{(s+2)^3}]$$
$$L^{-1}\frac{6}{(s+2)^3}=L[\frac{6}{s^3}]+1/(s+2)^2]$$

Here I think that i need to use $$t^nu(t)->\frac{n!}{s^{n+1}}$$ but my n is not right?

This all seems to be trending towards my matlab solution to the ODE except that i need another e term in this part, which I think will come with 1/(s+2)^2 if thats correct?

Thanks

14. Mar 5, 2013

### schmiggy

You need to read up on the s-shifting theorem, the second term once you've applied s-shift becomes:
$$3t^{2}e^{-2t}$$
You were correct that your "n!" wasn't correct, but always work with the base. So our base was s^3, and the formula was s^(n+1), which means n = 2. If n = 2, then the numerator becomes 2, however we need it to be 6 so you need to find a multiple which will yield 6.. i.e 2 x 3 = 6.
So the overall solution would be:
$$-2e^{-2t} + 4te^{-2t} + 3t^{2}e^{-2t}$$
But again, wait for confirmation from a homework helper. In the meantime, read up on s-shift and try repeat those last steps I did.

15. Mar 5, 2013

### Fisher92

I get the s shift with a power of 2, even found a very similar example in my text book for it...
I can see that te^(-2t) comes from 1/(s+2)^2, working backwards leaves me with 3t to add from somewhere - which could be 3/s^2???? I can't see how 6/(s+2)^3 breaks up like this? Could you please tell me how you broke this up???

16. Mar 5, 2013

### schmiggy

Righto, I'll try break it down into steps, starting with a basic example before showing how I got the one you're asking about.

$$\frac{8}{(s+4)^2}$$
Now, we obviously can't do a straight transform, so we need to break it up into parts we can. The easiest way to identify the first component is to replace whatever is inside the brackets with 's', which gives us:
$$\frac{8}{s^2}$$
This one is easy to transform, looking at the table of laplace transforms we can see it is of the form:
$$\frac{n!}{s^{n+1}}$$
Now we know we have an s^2 term, so "n" must be 1, which gives us:
$$\frac{1}{s^2}$$ however we need:
$$\frac{8}{s^2}$$
Therefor we must multiply by 8, eg:
$$8 * \frac{1}{s^2} = \frac{8}{s^2}$$
So we take the laplace transform of 1/s^2 (which is 't') and multiply it by 8 giving us 8t, that's our first part. Next we need to deal with the brackets we replaced earlier with 's'. As (s+4) is in the denominator, we take it as 1/(s+4) and then transform it, which is another easy one. The transform is:
$$\frac{1}{s+4} = e^{-4t}$$
Now, combining the two we get:
$$8te^{-4t}$$
So that's a basic example, onto the one you wanted help with:
$$\frac{6}{(s+2)^3}$$
So again, replace the bracket with 's', yielding:
$$\frac{6}{s^3}$$
Again, this is in a very familiar form, the same as that in the original equation only our n = 2 in order to give us s^3. But as you noticed we run into an issue, if we sub n = 2 into the formula we get:
$$\frac{2}{s^3}$$
Only we need:
$$\frac{6}{s^3}$$
So, as with the first example, we need to multiply it by some number so that it is correct, thus:
$$3 * \frac{2}{s^3} = \frac{6}{s^3}$$
So, we know the transform of
$$\frac{2}{s^3} = t^2$$
So then we multiply it by 3, giving us 3t^2. That is the first part of our transform, now we move onto the brackets we replaced with 's'. Same as with the first example, take it of the form 1/(s+2) which is easily transformed using the table:
$$\frac{1}{s+2} = e^{-2t}$$
Now combining the two we get:
$$3t^{2}e^{-2t}$$

Phew! Big post.. that took a long time to write out (partially because I was watching a movie) but hopefully it helps!

17. Mar 5, 2013

### Fisher92

Thanks heaps schmiggy, that makes sense to me now!

-really appreciate the help!

18. Mar 5, 2013

### schmiggy

No problem at all, glad I could be of help!