Lecture 22: Using Laplace Transform to Solve ODEs with Discontinuous Inputs

Flash and JavaScript are required for this feature.

Download the video from iTunes U or the Internet Archive.

Topics covered: Using Laplace Transform to Solve ODEs with Discontinuous Inputs.

Instructor/speaker: Prof. Arthur Mattuck

Today we are going to do a last serious topic on the Laplace transform, the last topic for which I don't have to make frequent and profuse apologies. One of the things the Laplace transform does very well and one of the reasons why people like it, engineers like it, is that it handles functions with jump discontinuities very nicely.

Now, the OR function with a jump discontinuity is-- Purple.

Is a function called the unit step function.

I will draw a graph of it. Even the graph is controversial, but everyone is agreed that it zero here and one there. What people are not agreed upon is its value at zero. And some people make it zero, some people make it one, and some equivocate like me.

I will leave it undefined. It is u of t.

It is called the unit step.

Because that is what it is. And let's say we will leave u of zero undefined.

If that makes you unhappy, get over it.

Of course, we don't always want the jump to be at zero.

Sometimes we will want to jump in another place.

If I want the function to jump, let's say at the point a instead of jumping at zero, I am going to start doing what everybody does. You put in the vertical lines, even though I have no meaning, whatever, but it makes the graph look more connected and a little easier to read.

So that function I will call u sub a is the function which jumps at the point a. How shall I give its definition? Well, you can see it is just the translation by a of the unit step function.

So that is the way to write it, u of t minus a.

Now I am not done. There is a unit box function, which we will draw in general terms like this.

It gets to a, then it jumps up to one, falls down again at b and continues onto zero.

This happens between a and b. And the value to which it arises is one. I will call this the unit box.

It is a function of t, a very simple one but an important one. And what would be the formula for the unit box function? Well, in general, almost all of these functions, as you will see when you use jump discontinuity, the idea is to write them all cleverly using nothing but u of.

Because it is that will have the Laplace transformer.

The way to write this is (u)ab.

And, if you like, you can treat this as the definition of it. Let's make it a definition.

Okay, three lines. Or, better yet, a colon and two lines. I am defining this to be, what would it be? Make the unit step at a step up at a, but then I would continue at one all the time.

I should, therefore, step down at b.

Now, the way you step down is just by taking the negative of the unit step function. I step down at b by subtracting u sub b of t . In other words, it is u of t minus a minus u of t minus b.

And now I have expressed it entirely in terms of the unit step function.

That will be convenient when I want take the Laplace transform.

What is so good about these things?

Well, these functions, when you use them in multiplications, they transform other functions in a nice way. Not transform.

That is not the right word. They operate on them.

They turn them into other strange creatures, and it might be these strange creatures that you are interested in. Let me just draw you a picture.

That will be good enough. Suppose we have some function like that, f of t, what would the function u sub ab, I will put in the variable, t times f of t, what function would that be?

I am just going to draw its graph.

What would its graph be? Well, in between a and b this function (u)ab of t has the value one.

All I am doing is multiplying f of t by one.

In short, I am not doing anything to it at all.

Outside of that interval, (u)ab has the value zero, so that zero times f of t makes zero.

And, therefore, outside of this it is zero.

The effect of multiplying an arbitrary function by this unit box function is, you wipe away all of its graph except the part between a and b. Now, that is a very useful thing to be able to do. Well, that is enough of that.

Now, let's get into the main topic.

That is just preliminary. I will be using these functions all during the period, but the real topic is the following. Let's calculate the Laplace transform of the unit step function.

Well, this is no very big deal. It is the integral from zero to infinity e to the minus s t times y of t, dt.

But, look, when t is bigger than zero, this has the value one. So it is the same of the Laplace transform of one. In other words, it is one over s for positive values of s.

Or, to make it very clear, the Laplace transform of one is exactly the same thing. As you see, the Laplace transform really is not interested in what happens when t is less than zero because that is not part of the domain of integration, the interval of integration.

That is fine. They both have Laplace transform of one over s.

What is the big deal? The big deal is, what is the inverse Laplace transform of one over s?

Will the real function please stand up? Which of these two should I pick? Up to now in the course we have been picking one just because I never made a fuss over it and one was good enough. For today one is no longer going to be good enough. And we have to first investigate the thing in a slightly more theoretical way because this problem, I have illustrated it on the inverse Laplace transform of one over x, but it occurs for any inverse Laplace transform.

Suppose I have, in other words, that a function f of t has as its Laplace transform capital F of s? And now, I ask what the inverse Laplace transform of capital F of s is.

Well, of course you want to write f of t.

But the same thing happens. I will draw you a picture.

Suppose, in other words, that here is our function f of t. Well, one answer certainly is f of t. That is okay.

That is the answer we have been using up until now.

But, you see, I can complete this function in many other ways. Suppose I haven't told you what it was for s less than zero. Any of these possibilities all will produce the same Laplace transform.

In fact, I can even make it this.

That is okay. Each of these, f of t with any one of these tails, all have the same Laplace transform.

Because the Laplace transform, remember the definition, integral zero to infinity, e to the negative s t, f of t, dt because the Laplace transform does not care what the function was doing for negative values of t.

Now, if we have to have a unique answer -- And most of the time you don't because, in general, the Laplace transform is only used for problems for future time. That is the way the engineers and physicists and other people who use it habitually think of it. If your problem is starting now and going on into the future and you don't have to know anything about the past, that is a Laplace transform problem. If you also have to know about the past, then it is a Fourier transform problem.

That is beyond the scope of this course, you will never hear that word again, but that is the difference.

We are starting at time zero and going forward.

All right. It does not care what f of t was doing for negative values of t.

And that gives us a problem when we try to make the Laplace transform unique. Now, how will I make it unique?

Well, there is a simple way of doing it.

Let's agree that wherever it makes a difference, and most of the time it doesn't, but today it will, whenever it makes a difference we will declare, we will by brute force make our function zero for negative values of t. That makes it unique.

I am going to say that to make it unique, now, how do I make f of t zero for negative values of t? The answer is multiply it by the unit step function. That leaves it what it was.

It multiplies it by one for positive values but multiplies it by zero for negative values. The answer is going to be u of t times f of t. That will be the function that will look just that way that I drew, but I will draw it once more. It is the function that looks like this. And when I do this, it makes the inverse Laplace transform unique.

Out of all the possible tails I might have put on f of t, it picks the least interesting one, the tail zero.

That is a start. But what we have to do now is -- What I want is a formula. What we are going to need is, as you see right even in the beginning, if for example, if I want to calculate the Laplace transform of this, what I would like to have is a nice Laplace transform for the translate. If you translate a function, how does that effect this Laplace transform?

In other words, the formula I am looking for is -- I want to express the Laplace transform of f of t minus a.

In other words, the function translated, let's say a is positive, so I translate it to the right along the t axis by the distance a. I want a formula for this in terms of the Laplace transform of the function I started with.

Now, my first task is to convince you that, though this would be very useful and interesting, there cannot possibly be such a formula.

There is no such formula.

Why not? Well, I think I will explain it over there since there is a little piece of board I did not use. Waste not want not.

Why can't there be such a formula?

What is it we are looking for? Let's take a nice average function f of t. It has a Laplace transform.

And now I am going to translate it.

Let's say this is the point negative a.

And so the corresponding point positive a will be around here.

I am going to translate it to the right by a.

What is it going to look like? Well, then it is going to start here and is going to look like this dashy thing.

That is f of t minus a.

That is not too bad a picture. It will do.

I just took that curve and shoved it to the right by a.

Now, why is it impossible to express the Laplace transform of the dashed line in terms of the Laplace transform of the solid line? The answer is this piece.

I will write it this way. The trouble is, this piece is not used for the Laplace transform of f of t.

Why isn't it used?

Well, because it occurs to the left of the vertical axis.

It occurs for negative values of t.

And the Laplace transform of f of t simply does not care what f of t was doing to the left of that line, for negative values of t. It does not enter into the integral. It was not used when I calculated this piece of the curve.

It was not used when I calculated the Laplace transform of f of t. On the other hand, it is going to be needed. It occurs here, after I shift it to the right. It is going to be needed for the Laplace transform of f of t minus a, because I will have to start the integration here, and I will have to know what that is.

In other words, when I took the Laplace transform, I automatically lost all information about the function for negative values of t.

If I am later going to want some of that information for calculating this, I won't have it and, therefore, there cannot be a formula expressing one in terms of the other. Now, of course, that cannot be the answer, otherwise I would not have raised your expectations merely to dash them.

I don't want to do that, of course.

There is a formula, of course.

It is just, I want to emphasize that you must write it my way because, if you write it any other way, you are going to get into the deepest trouble. The formula is-- the good formula, the right formula -- -- accepts the given. It says look, we have lost that pink part of it.

Therefore, I can never recover that.

Therefore, I won't ask for it. The translation formula I will ask for is not one for the Laplace transform of f of t minus a, but rather for the Laplace transform of this thing where I have wiped away that pink part from the translated function. In other words, the function I am talking about now is the formula for, I will put it over here to show you the function what we are talking about. It is the function f of, well, in terms of the pink function it is, I will have to reproduce some of that picture.

There is f of t. f of t minus a, then, looked like this. And so the function I am looking for is, this is the thing translated, but when I get down to the corresponding, this is the point that corresponds to that one, I wipe it away and just go with zero after that.

So this is u of t minus a times f of t minus a times f of t minus a. What is this Laplace transform?

Now that does have a simple answer.

The answer is it is e to the minus as, a funny exponential, times the Laplace transform of the original function. Now, this formula occurs in two forms. This one is not too bad looking. The trouble is, when you want to solve differential equations you are going to be extremely puzzled because the function that you will have to take to do the calculation on will not be given to you in the form f of t minus a.

It will look sine t or t squared or some polynomial in t. It will not be written as t minus a. What do you do?

If your function does not look like that but instead, in terms of symbols looks like this, you can still use the formula. Just a trivial change of variable means that you can write it instead.

Now, this is one place, there is no way of writing the answer in terms of capital F of s.

This is one of those cases where this notation is just no good anymore. I am going to have to write it using the L notation. The Laplace transform of f of, and wherever you see a t, you should write t plus a.

Basically, this is the same formula as that one. But I will have to stand on my head for one minute to try to convince you of it.

I won't do that now. I would like you just to take a look at the formula. You should know what it is called. There are a certain number of idiots who call this the exponential shift formula because on the right side you multiply by an exponential, and that corresponds to shifting the function.

Unfortunately, we have preempted that.

We are not going to call it this.

I will call it what your book calls it.

The difficulty is there is no universal designation for this formula, important as it is. However, your book calls this t-axis translation formula. Translation because I am translating on the t-axis. And that is what I do to the function, essentially. And this tells me what its new Laplace transform is.

The other formula, remember it?

The exponential shift formula, the shift or the translation occurs on the s-axis. In other words, the formula said that F of s minus a, you do the translation in s variable corresponded to multiplying this by e to the a t.

In other words, the formulas are sort of dual to each other. This guy translates on the left side and multiplies by the exponential on the right.

The formula that you know translates on the right and multiplies by the exponential on the left.

What are we going to calculate? I am trying to calculate, so I am trying to prove this first formula.

The second one will be an easy consequence.

I am trying to calculate the Laplace transform of that thing.

What is it? Well, it is the integral from zero to infinity of e to the minus st times u of t minus a, f of t minus a times dt.

That is the formula for it. But I am trying to express it in terms of the Laplace transform of f itself.

Now, it is trying to be the Laplace transform of f.

The problem is that here, a (t minus a) occurs, which I don't like. I would like that to be just a t. Now, in order not to confuse you, and this is what confused everybody, I will set t1 equal to t minus a. I will change the variable.

This is called changing the variable in a definite integral.

How do you change the variable in a definite integral?

You do it. Well, let's leave the limits for the moment. e to the minus s times -- Now, t, remember you can change the variable forwards, direct substitution, but now I have to use the inverse substitution.

It's trivial, but t is equal to t1 plus a.

To change this I must substitute backwards and make that t1 plus a.

How about the rest of it? Well, this becomes u of t1.

This is f of t1.

I have to change the dt, too, but that's no problem.

dt1 equals dt because a is a constant.

That is dt1. And the last step is to put in the limits. Now, when t is equal to zero, t1 has the value negative a.

So this has to be negative a when t is infinity.

Infinity minus a is still infinity, so that is still infinity. In other words, this changes to that. These two things, whatever they are, they have the same value.

All I have done is changed the variable.

Make it change a variable. But now, of course, I want to make this look better.

How am I going to do that? Well, first multiply out the exponential and then you get a factor e to the minus s(t1).

That is good.

That goes with this guy. Now I get a factor e to the minus s times a from the exponential law.

But that does not have anything to do with the integral.

It is a constant as far as the integral is concerned because it doesn't involve t1. And, therefore, I can pull it outside of the integral sign.

And write that e to the minus s times a.

Let's write it the other way. Times the integral of what?

Well, e to the negative st1.

Now, u of t1, f of t1 times dt1.

Still integrated from minus a to infinity. And now the final step.

This u of t1 is zero for negative values of t.

And, therefore, it is equal to one for positive values of t. It is equal to zero for negative values of t, which means I can forget about the part of the integral that goes from negative a to zero.

I better rewrite this.

Okay, leave that. In other words, this is equal to e to the minus as times the integral from zero to infinity of e to the minus s -- Let me do the shifty part now.

And this is since u of t1 is equal to zero for t1 less than zero. That is why I can replace this with zero. Because from negative a to zero, nothing is happening. The integrand is zero.

And why can I get rid of it after that?

Well, because it is one after that.

And what is this thing? This is the Laplace transform.

No, it is not the Laplace transform they said.

Because you had t1 there, not t.

It is the Laplace transform because this is a dummy variable. The t1 is integrated out.

It is a dummy variable. It doesn't matter what you call it. It is still the Laplace transform if I make that wiggly t or t star or tau or u.

I can call it anything I want and it is still the Laplace transform of f of t.

What is the answer? That is e to the negative as times the Laplace transform of the function f.

That is what I promised you in that formula.

Now, how about the other formula?

Well, let's look at that quickly.

That is, as I say, just sleight of hand.

But since that is the formula you will be using at least half the time you better learn it. This little sleight of hand is also reproduced in one page of notes that I give you, but maybe you will find it easy to understand if I talk it out loud. The problem now is for the second formula. I am going to have to recopy out the first one in order to make the argument in a form in which you will understand it, I hope.

This goes to e to the minus as F s, except I am now going to write that not in F of s; since I will not be able to write the second formula using F of s, I am not going to write the first formula that way either. I will write it as the Laplace transform with f of t.

Now, formally if somebody says, okay, how do I calculate the Laplace transform of this thing? I say put down this.

Well, that has no t in it. It doesn't have the f in it either. Then write this.

What formula did I do? I looked at that and changed t minus a to t. Now, how did I change t minus a?

The way to say it is I changed t. Because the t is always there.

t to t plus a. You get this by replace t by t plus a to get the right-hand side.

I replace this t by t plus a, and that turns this into f of t. And that is the f of t that went in there. That is the universal rule for doing it. Now I am going to use that same rule for transforming u of t minus a times f of t.

See, the problem is now I have a function like t squared or sine t, which is not written in terms of t minus a.

And I don't know what to do with it.

The answer is, by brute force, write it in terms of t minus a.

What is brute force? Brute force is the following.

I am going to put a t minus a there if it kills me.

t minus a plus a. No harm in that, is there? Now there is a t minus a there, just the way there was up there.

And now what is the rule? I am just going to follow my nose. What's sauce for the goose is sauce for the gander. Minus as, Laplace transform of f of, now what am I going to write here?

Wherever I see a t, I am going to change it from t plus a. Here I see a t.

I will change that to t plus a.

What do I have? t plus a minus a plus a, well, if you can keep count, what does that make? It makes t plus a in the end.

The peace that passeth understanding.

Let's do some examples and suddenly you will breathe a sigh of relief that this all is doable anyway.

Let's calculate something. I hope I am not covering up any crucial, yes I am. I am covering up the u of t's, but you know that by now. Let's see.

What should we calculate first? What I just covered up.

Let's calculate the Laplace transform of (u)ab of t.

What is that going to be?

Well, first of all, write out what it is in terms of the unit step function.

Remember that formula? There.

Now you see it. Now you don't.

Its Laplace transform is going to be what?

Well, the Laplace transform of t minus a, that is a special case here where this function is one.

Well, that one. Either one.

It makes no difference. It is simply going to be the Laplace transform of what f of t would have been, which is -- See, the Laplace transform of u of t is what?

That's one over s, right?

Because this is the function one, and we don't care the fact that it is zero or negative values of t.

That is my f of s. And so I multiply it by e to the minus as times one over s.

I am using this formula, e to the minus as times the Laplace transform of the unit step function, which is one over s. How about the translation?

That was taken care of by the exponential factor.

And it's minus because this is minus.

The same thing with the b. This is the Laplace transform of the unit box function. It looks a little hairy.

You will learn to work with it, don't worry about it.

How about the Laplace transform of -- Okay. Let's use the other formula.

What would be the Laplace transform of u of t minus one times t squared, for example?

See, if I gave this to you and you only had the first formula, you would say, hey, but there is no t minus one in there. There is only t squared.

What am I supposed to do?

Well, some of you might dig way back into high school and say every polynomial can be written in powers of t minus one, that is what I will do. That would give the right answer. But in case you had forgotten how to do that, you don't have to know because you could use the other formula instead, which, by the way, is the way you do it.

What are we going to do? It goes into e to the minus s.

The a is one in this case, plus one. e to the minus s times the Laplace transform of what function?

Change t to t plus one.

The Laplace transform of t plus one squared.

What is that? That is e to the minus s times the Laplace transform of t squared plus 2t plus one.

What's that?

Well, by the formulas which I am not bothering to write on the board anymore because you know them, it is e to the minus s times -- Laplace transform of t squared is two factorial over s cubed.

Remember you always have to raise the exponent by one. This is two factorial, but that is the same as two. Plus two.

This two comes from there. The Laplace transform of t is one over s squared.

And, finally, the Laplace transform of one is one over s. You mean all that mess from this simple-looking function? This function is not so simple.

What is its graph? What is it we are calculating the Laplace transform of? Well, it is the function t squared. But multiplying it by that factor u of t minus one means that the only part of it I am using is this part, because u of t minus one is one when t is bigger than one.

But when t is less than one it is zero.

That function doesn't look all that simple to me.

And that is why its Laplace transform has three terms in it with this exponential factor. Well, it is a discontinuous function. And it gets discontinuous at a very peculiar spot. You have to expect that.

Where in this does it tell you it becomes discontinuous at one?

It is because this is e to the minus one times s.

This tells you where the discontinuity occurs.

The rest of it is just stuff you have to take because it is the function t squared. It's what it is.

All right. I think most of you are going to encounter the worst troubles when you try to calculate inverse Laplace transforms, so let me try to explain how that is done. I will give you a simple example first. And then I will try to give you a slightly more complicated one. But even the simple one won't make your head ache. We are going to calculate the inverse Laplace transform of this guy, one plus e to the negative pi s -- -- divided by s squared plus one.

All right. Now, the first thing you must do is as soon as you see exponential factors in there like that you know that these functions, the answer is going to be a discontinuous function. And you have got to separate out the different pieces of it that go with the different exponentials. Because the way the formula works, it has to be used differently for each value of a.

Now, in this case, there is only one value of a that occurs. Negative pi.

But it does mean that we are going to have to begin by separating out the thing into one over s squared plus one and this other factor e to the negative pi s divided by s squared plus one.

Now all I have to do is take the inverse Laplace transform of each piece. The inverse Laplace transform of one over s squared plus one is -- Well, up to now we have been saying its sine t, right? If you say it is sine t you are going to get into trouble. How come?

We didn't get into trouble before.

Yes, but that was because there were no exponentials in the expression. When there are exponentials you have to be more careful. Make the inverse transform unique. Make it not sine t, but u of t sine t.

You will see why in just a moment.

If this weren't there then sine t would be perfectly okay.

With that factor there, you have got to put in the u of t, otherwise you won't be able to get the formula to work right. In other words, I must use this particular one that I picked out to make it unique at the beginning of the period.

Otherwise, it just won't work. Now, I know that is fine.

But now what is the inverse Laplace transform of e to the minus pi? In other words, it is the same function, except I am now multiplying it by e to the negative pi s.

Well, now I will use that formula.

My f of s is one over s squared plus one, and that corresponds it to sine t.

If I multiply it by e to the minus pi s, just copy it down. It now corresponds, the inverse Laplace transform, to what the left side says it does. u of t minus pi times, in other words, this corresponds to that.

Then if I multiply it by e to the minus pi s, it corresponds to change the t to t minus pi.

What is the answer? The answer is you sum these two pieces. The first piece is u of time sine t. The second piece is u of t minus pi sine t of minus pi.

Now, if you leave the answer in that form it is technically correct, but you are going to lose a lot of credit.

You have to transform it to make it look good.

You have to make it intelligible.

You are not allowed to leave it in that form.

What could we do to it? Well, you see, this part of it is interesting whenever t is positive.

This part of it is only interesting when t is greater than or equal to pi because this is zero.

Before that this is zero. What you have to do is make cases. Let's call the answer f of t.

The function has to be presented in what is called the cases format.

That is what it is called when you type in tech, which I think a certain number of you can do anyway.

You have to make cases. The first case is what happened between zero and pi? Well, between zero and pi, only this term is operational. The other one is zero because of that factor. Therefore, between zero and pi the function looks like, now, I don't have to put in the u of t because that is equal to one.

It is equal to sine t between zero and pi.

What is it equal to bigger than pi?

Well, the first factor, the first term still obtains, so I have to include that. But now I have to add the second one. Well, what is the second term?

I don't include the t minus pi, u of t minus pi anymore because that is now one.

That has the value one. It is sine of t minus pi.

But what is sine of t minus pi?

You take the sine curve and you translate it to the right by pi.

So what happens to it? It turns into this curve.

In other words, it turns into the curve, what curve is that? Minus sine t.

The other factor, this factor is one and this becomes negative sine t.

And so the final answer is f of t is equal to sine t between zero and pi and zero for t greater than or equal to pi. That is the right form of the answer.