# Second Order ODE Using Laplace Transforms

1. Feb 16, 2009

### jazznaz

Little homework problem that I'm beating myself up over...

Solve:

$$xy'' - 2y' + xy = -2\cos x$$

Using the method of Laplace transforms....

So I do some jiggling and get to:

$$(1+s^{2})\frac{dF}{ds}+4sF(s) = \frac{2s}{s^{2} + 1}$$

To which I find the following solution:

$$F(s) = \frac{C}{(1 + s^{2})^{2}} + \frac{s^{2}}{(1 + s^{2})^{2}}$$

But I'm supposed to get to:

$$F(s) = \frac{C}{(1 + s^{2})^{2}} + \frac{s^{2}-1}{(1 + s^{2})^{2}}$$

But the method I'm using to solve the first order ODE (variation of parameters/constants) won't seem to lead to the answer I need. It almost looks as though I should include an aribtrary constant where they're expecting me to get -1, but it seems that any constant value will be a solution to the first order DE obtained after applying the transform. So I don't really understand how they've deduced that it should be -1...

We've been given the answer to the problem,

$$y = \frac{C}{2}(\sin x - x\cos x) + x\cos x$$

Where the result is obtained easily using a table of Laplace Transforms.

2. Feb 16, 2009

### Tom Mattson

Staff Emeritus
Those are equivalent. To see this, start from the second expression.

$$F(s) = \frac{C}{(1 + s^{2})^{2}} + \frac{s^{2}-1}{(1 + s^{2})^{2}}$$

$$F(s) = \frac{C+s^2-1}{(1 + s^{2})^{2}}$$

$$F(s) = \frac{s^2+(C-1)}{(1 + s^{2})^{2}}$$

Since C is an arbitrary constant, so is C-1.

3. Feb 16, 2009

### jazznaz

So the justification is altering the constant to give a nice form for the inverse Laplace transform?

Thanks very much!

4. Feb 16, 2009

### Tom Mattson

Staff Emeritus
Yes, you can use either C or C-1. It doesn't matter.