# Use Laplace to solve this differential equation

1. Sep 11, 2013

### Northbysouth

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

Obtain the solution of the differential equation

x'' + w2nx = t

My use of L refers to the Laplace

2. Relevant equations

3. The attempt at a solution

L{x'' + w2nx = t}

I decided to do the Laplace of each part individually starting with x''

L{x''} = sL{x'} - x'(0)

then

L{x'} = sL{x} - x(0)

Putting this together gives

L{x''} = s[sL{x} - x(0)] - x'(0)

Also, the L{x} = x/s

L{x''} = sx - sx(0) - x'(0)

Then the Laplace of w2nx is:

L{w2nx} = w2nx∫inf0e-st dt

because I believe that w2nx is a constant, hence I can move it out of the integral

evaluating the integral then gives me

L{w2nx} = w2nx/s

Then for L{t} I can see from the Laplce tables that this is just 1/s2

Consequently, my Laplace transformation is

L{x'' + w2nx = t} = sx - sx(0) - x'(0) + wn2x/s + 1/s2

After this step I'm pretty sure I need to do the inverse Laplace transform. But I wanted to check if what I had at the moment looked right, and if so, what is the best way to do the inverse of this laplace transformation?

2. Sep 11, 2013

### vela

Staff Emeritus
You're confusing the function x with the variable t. L[x] = L[x(t)] = X(s) while L[t] = 1/s. X(s), the Laplace transform of x(t), is what you're solving for.

3. Sep 11, 2013

### Northbysouth

I was thinking it looked a bit odd.

So Should it instead be:

[sL{x''} - x'(0)] + wn2[X(s) - x(0)] = 1/s2

This simplifies to:

s2X(s) - sx(0) - x'(0) + wn2X(s) - wn2x(0) = 1/s2

4. Sep 11, 2013

### vela

Staff Emeritus
Yup, looks right.

5. Sep 11, 2013

### Northbysouth

So, now I would solve for X(s), but what would I do after this point? Would I need partial fractions?

6. Sep 11, 2013

### vela

Staff Emeritus
After you solve for X(s), you want to invert it to find x(t). Partial fractions will probably be useful to get X(s) into a form where you can invert it using a table.

7. Sep 12, 2013

### Northbysouth

Okay, I've solved it for X(s) and used the initial conditions x(0)=0 and x'(0)=0

This gives me:

x(s) = 1/(s2(s2+wn2))

Which I can break down into:

s/(s2+ wn2) * 1/s3

From the tables this, I think, gives me:

cos(wnt) * t2/2

How does this look?

8. Sep 12, 2013

### vela

Staff Emeritus
The Laplace transform is a linear operator. That means if you have two transform pairs x(t), X(s) and y(t), Y(s), then L[ax(t)+by(t)] = aL[x(t)]+bL[y(t)] = aX(s) + bY(s). What you can't say is that x(t)y(t) corresponds to X(s)Y(s).

You want to use partial fractions to split your X(s) up into a sum of terms you can invert using the tables.
$$X(s) = \frac{1}{s^2(s^2+\omega^2)} = \frac{A}{s^2} + \frac{B}{s} + \frac{C}{s^2+\omega^2} + \frac{Ds}{s^2+\omega^2}$$

9. Sep 12, 2013

### Northbysouth

So, as I understand it. I have s=0, 0, -w, w.

s2*1/(s2(s2+w2)) evaluated at s=0

So, then I'd have A = 1/w2

10. Sep 12, 2013

### Ray Vickson

It looks wrong. The L.T. of a convolution is the product of the individual L.Ts, so the inverse of a product would be a convolution, not a product. You could, of course, actually carry out the convolution operation to get the correct answer.

Just use partial fractions; it is easier, and it avoids convolutions.

11. Sep 12, 2013

### vela

Staff Emeritus
Multiply both sides by $s^2(s^2+\omega^2)$. You can then set s=0 in the resulting equation. All terms except for the one with A will vanish, so you can solve for A. The rest of the coefficients will take a little more work. Note that with $s=\omega$, you get $s^2+\omega^2 = 2\omega^2$, not 0, so setting $s=\omega$ doesn't help you.

12. Sep 12, 2013

### Northbysouth

So, I multiplied both sides by s2(s2+w2) which left me with:

1 = As2+Aw2

Solving for A I get

A = 1/(s2+w2)

Why was s=0?

Could I do something similar to find B, like use s(s2+w2) on both sides?

13. Sep 12, 2013

### vela

Staff Emeritus
I meant multiply this equation
$$\frac{1}{s^2(s^2+\omega^2)} = \frac{A}{s^2} + \frac{B}{s} + \frac{C}{s^2+\omega^2} + \frac{Ds}{s^2+\omega^2}$$ by $s^2(s^2+\omega^2)$, and then set s=0 to solve for A.

14. Sep 12, 2013

### Northbysouth

Yes, I did that. You were right. The left side of the equation became 1 whereas everything else but A turned to 0

1 = A(s2+w2)

A = 1/w2

Did we choose w=0 because it as convenient for us, as it left us with only A?

What would be the best method to solve for B?

I had considered multiplying both sides by s(s2+w2) but this results in A being divided by 0 if s=0.

15. Sep 12, 2013

### vela

Staff Emeritus
The other terms don't turn into 0. Why do you think they do?

16. Sep 12, 2013

### Ray Vickson

Why are you making such heavy weather of this question? You just need the partial-fraction expansion of
$$\frac{1}{s^2(s^2+\omega^2)}.$$
and surely you must have done lots of those in Calculus 101. If not, just Google 'partial fractions' to see lots of on-line sources showing you how to do it. It really is not that hard; it just takes a bit of practice.

17. Sep 12, 2013

### Northbysouth

Because after each term is multiplied by s2(s2+w2)

we're left with

1 = A(s2+w2) + Bs(s2+w2) + cs2 + Dss2

Which simplifies to

1 = As2 + Aw2 + Bs3 + Bsw2 + cs2 + Ds3

evaluating at s=0

We have

1 = Aw2

A = 1/w2

18. Sep 12, 2013

### vela

Staff Emeritus
Right. This is a lot different than saying that you get $1=A(s^2+\omega^2)$. I hope you can see that. (If you're going to say you were just setting s=0 in the other terms, then I'd just ask why didn't you set s=0 in the first term then?)

To get the rest of the constants, you can collect the terms:
$$1 = (B+D)s^3 + (A+C)s^2 + (B\omega^2)s + A\omega^2$$ and then match coefficients on the two sides. You should eventually get B=D=0 and C=-1/ω2.