# Laplace Transform for an IVP

1. Nov 23, 2014

### Temp0

1. The problem statement, all variables and given/known data
Solve the IVP : dy/dt + y = f(t)
y(0) = -5
where f(t) = -1, 0 <= t < 7
-5, t >= 7

y(t) for 0 <= t < 7 = ?
y(t) for t >= 7 = ?

2. Relevant equations

3. The attempt at a solution
So I have never seen a problem of this type, excuse my silly mistakes if I'm interpreting this question wrong.

At first glance, I assume what the question is asking for is for me to solve what looks like two linear first order equations with the Laplace transform. I start at the first value of f(t), substitute -1 in where f(t) is, and then take the Laplace transform. Giving me:

L(y' + y = -1), which is s * L(S) - y(0) + 1/s^2 = -1/s
I then isolate for L(S), and take the inverse Laplace. Before I go any further, could anyone tell me if I'm coming at this problem correctly? I don't think it's right, since by my logic, I could solve this as if it was a first order linear and get the same result when I use Laplace, but they don't equal. Thanks for any assistance.

2. Nov 23, 2014

### Orodruin

Staff Emeritus
I suggest deriving an expression for the general solution before inserting what f(t) is. Also, if the Laplace transform of y is L(s) in your notation, then you have not transformed the equation correctly.

3. Nov 23, 2014

### Ray Vickson

T
You cannot do what you tried above: the function L(s) depends on the whole behavior of y(t) over all of t > 0, not just the part from t = 0 to 1. The same is true of F(s) = LT of f(t): you cannot just look at the part from t = 0 to 1.

4. Nov 23, 2014

### Temp0

Thank you for your replies, so I'm restarting on this question and I assume by "general solution", I have to build that step function again.

I can take the laplace of that, along with my y' and y, and I get...

L(f(t)) = -1/s - 4e^(7s)/s
L(y') = s Y(s) - y(0)
L(y) = 1/s^2

All my transforms come from the table, so if I read it wrong... Maybe I could be wrong, but am I on the right track now? If I am, any clues to where I go next?

5. Nov 23, 2014

### Ray Vickson

(1) Write out the LT of the lhs $y'(t) + y(t)$.
(2) Equate it to the LT of the rhs, which is the LT of $f(t)$.
(3) Solve for the LT of $y(t)$.

Are you sure that the LT of $u(t-7)$ is $e^{7s}/s$?

6. Nov 23, 2014

### Orodruin

Staff Emeritus
I wonder what table you took this from ... If you knew the Laplace transform of y, then you would already know y and there would be no point in making the Laplace transform. By definition, the Laplace transform of y(t) is Y(s).

7. Nov 23, 2014

### Temp0

Woops, I missed a negative sign right? It's $e^{-7s}/s$ right?

Ohh... Wait I see, alright sorry, I'm still learning about Laplace and I didn't realize something I did wrong, thanks, so L(y) is just Y(s)... Let me just change my equation a bit then..

So I isolate my laplace transform of y(t), and I get:

Y(s) = (-1 - 4e^(-7s) - 5s)/ (s(s+1))

8. Nov 23, 2014

### Orodruin

Staff Emeritus
You still need to correct the error I pointed out in my previous post. I would also solve the problem by not assuming anything about $f(t)$, just that it has some Laplace transform that I can denote $F(s)$. You will end up with a product of transforms, which turns into a convolution upon inverse transforming. The given $f(t)$ can then be inserted into the convolution to obtain the solution.

9. Nov 23, 2014

### Temp0

Yup, I edited the post above to reflect that error, and now I'm trying to inverse laplace that equation... Which is difficult.

10. Nov 23, 2014

### Temp0

Well okay, I think I have the answer to something...

I have y(t) = (4e^(7-t) -4)u(t-7) - 4e^(-t) - 1

Now... what do you mean when you say that f(t) can be inserted to give the solution?

11. Nov 23, 2014

### Orodruin

Staff Emeritus
Well, you did not take that route. I would instead have transformed the differential equation leaving f(t) and assuming it has Laplace transform F(s). This would give you
$$s Y(s) - y(0) + Y(s) = F(s) \quad \Rightarrow \quad Y(s) = \frac{y(0)}{s+1} + \frac{F(s)}{s+1}.$$
This is easily inverse transformed if you know what the inverse transform of $1/(s+1)$ is.

If you know anything about Green's functions, $1/(s+1)$ is the Laplace transform of the Green's function of the problem, and the solution for the same type of equation with any inhomogeneities can be written down directly in terms of it.

12. Nov 23, 2014

### Temp0

Ahh yes, except I've never heard the term Green's function before, but I know that 1/(s+1) has something to do with shifting and the inverse of it is just e^(-t)

Hmm, yes, this would be more convenient to use. I am not seeing how to inverse F(s)/(s+1) though.

13. Nov 23, 2014

### Orodruin

Staff Emeritus
So, let $g(t) = e^{-t}$, which as you say gives $G(s) = 1/(s+1)$. This means that:
$$Y(s) = y(0) G(s) + F(s) G(s).$$
Can you take it from here?

14. Nov 23, 2014

### Temp0

Ahh, I see. That makes more sense, I was just confused and forgot that I could just separate the two and inverse them individually.

So I end up with -5e^(-t) + f(t) (e^(-t))

Assuming that the inverse of F(s) is just f(t) again.

15. Nov 23, 2014

### Orodruin

Staff Emeritus
Not exactly, the inverse transform of a product of Laplace transforms is not the product of the functions but instead .......

In case of doubt, consult a table of Laplace transforms, this relation usually appears in them.

16. Nov 23, 2014

### Temp0

Wow, I never learned about this, but after looking around for a while I found the convolution theorem that says the inverse transform of G(s) and F(s) is just

(f*g)(t)

17. Nov 23, 2014

### Orodruin

Staff Emeritus
Exactly, so you can use this to write down the general solution for an arbitrary f(t) and then just insert the one you were given and compute the convolution integral, which is fairly straightforward in this case.

18. Nov 23, 2014

### Temp0

Okay so this is just going off what I'm reading off the internet right now...

I know the inverse LT of G(s) is e^(-t)... Then I use an arbitrary f(t) to denote the inverse LT of F(s)

I replace t with a temporary variable v, and determine a definite integral from 0 to t.

$\int^t_0 e^{-v}f(v)\,dv$

However, I don't think I can integrate this without knowing f(v) right?

19. Nov 23, 2014

### Orodruin

Staff Emeritus
You need to have $t-v$ as the argument for one of the functions for it to be a convolution, otherwise ok. When you have corrected that, it is indeed time to insert the $f(t)$ you were given.

If this is your first encounter with Green's functions and you are planning to study more physics (in particular theoretical physics) in the future, Green's functions of different sorts will be central concepts in several fields.

20. Nov 23, 2014

### Temp0

Still kind of confused on where to put the t-v, so am I taking the integral of f(t-v)?

Well, I may come across it in the future, but I'm studying engineering so I might not get into that level of physics.