 Welcome back. We are at lecture 33 today. 33 is a good number. Larry Bird's number, if you came to my home and you went up in the room above the garage, the bonus room, you would see a life-size cardboard cutout of Larry Bird, six foot nine when his playing day. So that's how eat up I am with Larry Bird. We happened to go to, he went to Indiana State. I went to Indiana State. I actually played some pick up ball against Larry Bird when I used to be athletic back in a previous life, but that was quite a thrill. All that from lecture 33. So this is just going to be an exciting day. We are in the middle of 7.8 in the supplement to the text. Second order, linear differential equations. These are non, homogeneous because we have something other than zero on the right side. So this was our last example yesterday. So we are going to pick up with this one. If we have trig, namely not all trig, let's just open it up to sines and cosines. If you have a sine or a cosine or sines and cosines, your particular solution looks something like this. A, sine of x, b, cosine of x, the reason being you are going to take the original function, so you certainly want sines to be present. You are going to take the derivative, thus you want cosines to also be present. They can generate sines and cosines, and we have second derivatives present. So we really want both these functions in the particular solution. We want to generate sines. Ultimately, we don't necessarily care about cosines. We want them to disappear. We can kind of force them to disappear by forcing their coefficient when all is said and done to be zero. So we want there to be one sine of x when all is said and done, having started with a sine of x and b cosine of x as being added together. I didn't mention the characteristic equation or the solution to the homogeneous part. Any questions about that before we kind of pick up from where we left off? Any questions? A couple of you came in late. Also, we will probably have time for a web assign question or two today. Certainly if it relates to this, I'd rather use your question as our problem rather than the problem that I have written out for us to go through. Issues, questions with that? Everybody okay with why we need this? Why we need to start with sines and cosines even though we only want to generate sines? So what's our next step? This is where we left off. Okay, take y prime of the particular solution, y double prime of the particular solution, and plug them back in. So we can equate coefficients left side and right side. So I'm going to rewrite the particular solution. You need its derivative. Derivative of a sine of x. Derivative of b cosine x. And if we had something other than just x here, we'd have to use the chain rule, so be prepared for that on other examples. Okay, derivative of what we just found. So derivative of a cosine x is negative a sine x. Everybody okay with those? What do we do with those? If I sound kind of helpless today, I'm just kind of trying to prompt some more questions. Some of you I think were drifting on me yesterday. And I need to kind of keep you a little closer. Okay, so let's plug this in for y double prime. Looks like we've got minus 10 y primes. We'll plug that in and plus 41 of these. Okay, so y double prime. Now we've got minus 10 y primes. We've got plus 41 of the original y things. And when we do all that we're supposed to somehow generate one sine of x, or just sine of x. What would be the next step? Distribute what after that? Group together like terms, right? Let's see how many sine of x's we have on the left side. Compare it to how many we have on the right side, how many cosine of x's we have on the left side. Compare it to how many cosine of x's we have on the right side. By the way, how many cosine of x's do we have on the right side? We don't have any cosine of x's, so we have zero of them. So we are going to have some on the left side. Alright, so let's say, let's see if we can do all this together. We want all of the sine of x terms. Looks like we have negative a of them right here. Looks like we have, what, 10 b of them right here. Is that correct? Positive 10 b and what? Plus 41 a. Plus 41 a. How many cosine of x's we have on the left side? What do we have? It looks like there's a negative b. It looks like there is what? Negative 10 a and plus 41 b. So what two equations result from distributing, gathering up like terms? We need to find out a and b. Those were the two unknowns from our particular solution. So what are the equations? Somewhat simplified. Negative, nice. We can put these together, right? So how many b do we have there? 40 b. That's got to be zero, because we don't have any cosines on the right side. And this is how many cosines we have on the left side. Other equation. That one by itself is not going to get us anywhere, right? 40 a plus 10 b equals sine of x. Equals one. So we have two equations and two variables. We don't necessarily love the coefficients that we have, but it's a doable system, small system of equations at this point in time in the problem. I don't know. What do you want to do to get rid of a's or b's or how do you want to approach it from this point? Substitution. I don't care. Lots of different techniques you choose. You multiply the first one by four. First one by four. So 160 b minus 40 a equals zero. And leave the second one alone, just rearrange it. So we want a 40 a, which we already have. We want it added to 10 b, so we didn't do anything to that equation. So if that's the case, if we add them up, we're going to lose the a's and we're going to have b's. So 170 b, these drop out, equals one. Be prepared for some mighty, ugly coefficients. We're going to have a couple on this problem. So it looks like b is one over 170. I was kind of thinking that when we started this problem. I kind of thought that the coefficient was going to be one over 170. Not really. You have no earthly idea what kind of hideous coefficients are going to get. What now? We have b, so we have one of the two values we're looking for. Go back into any of these equations. It doesn't matter which one you think will be the easiest. Let's plug into this one. So 40 a plus 10 b equals one. Does that look right? 16 17ths, which is four into there, well, eight into there, twice, and eight into there, five. Two over, what, 17 times five. 85. Another delightful coefficient. So we go back to the particular solution, which was a sine x plus b cosine x. We now know a and b. A was one over 170. Where is that? Yes. Now that's b. A was two over 85. B was one over 170. So our final solution, which we haven't messed with the homogeneous part today, but we got that yesterday, the homogeneous part. So we've got cosine of four x's and sine of four x's. Those are certainly different from sine of x's and cosine of x's. We add to that the particular solution. And if you have some leisure time today, take this equation, take its first derivative, and take its second derivative, and plug them into the original equation. And you'll see that all kinds of stuff on the left side drops out. And finally, when you've distilled it all on the left side, what are you left with? You're left with sine of x, which is what the right side was in our original homogeneous equation. So when in doubt, and if you have the time, you can check it. It does take some time and effort to check it, but it should work out to be the case. Any question there? I'm not remembering two over 85. Is that arithmetic correct? Anybody see an arithmetic problem there? Maybe I'm just not remembering that solution. I do remember the one over 170, two over 85. Anybody see an arithmetic mistake? I mean, I didn't I plugged it into the other equation. Okay. I didn't remember that answer. Questions on this process. So we have now looked at non-homogeneous second order differential equations that had exponentials in them. That was our first example. We did a second example that had an exponential, but we had to modify the solution to get one to finally work. This is our first example of trig. It's not a super complicated one, but it's our first example. We need to look at one that has polynomials on the right side. So let's do that next. Remember we're going to have this second order equation, some variety of y double prime, y prime and y on the left side. We're going to have one of three things. We're going to have exponentials, sine or cosine. We're going to have a polynomial. So it's not completely wide open on the right side. If you see a problem at the end of this section, and there are some that have, well maybe I was looking at another problem set. I think actually these are probably all fairly safe. But if you see one that come across one that has secance or tangents or some other type of function that we haven't dealt with here, then that requires a different method than we're covering here. This is kind of a brief survey. You'll get a more in depth study of these in math 341 if that's a course that you need for your degree. How many of you will eventually need 341 that you know of a full semester course in differential equations? How many of you think that you need two semesters? You also need 401? You need 401? A couple of you? So you're going to get a further study of this stuff in courses beyond this course. Alright, let's take a look at this example. And on the right we have a fairly simple polynomial. But it is second degree. And in fact that's what you have to think of when you see the right side. It's a second degree polynomial. What does the particular solution need to be in order to generate a second degree polynomial? It needs to be a second degree polynomial, but not just x squared. So let's get the homogeneous part out of the way first because it does comprise part of the solution. Characteristic equation? I'm listening to you. Doesn't matter. I mean r or x, we've used r because we've got our solution in terms of x so we wanted the r. Factors of negative 2 that will give us plus 1 in the middle. So the homogeneous part of the solution, two distinct real roots, even if you're trying to not, you're purposefully trying not to memorize this. By the time we get through this you will have looked at so many examples I don't think you can help. But correlate. What do you do when you have two distinct real roots then roll right to the solution? C2E to the negative 2. Everybody okay with that? Hopefully it will be second nature when test time comes around. A particular solution. We've got to generate some x squared term, some polynomial term of degree 2. So we have to generalize every type of polynomial that we put in. If, for example, this is a number, let's say that we've got a number over there and it's 5. Well, we generalize that to any number, which we don't know what number to start with. We would start with some number a. If that is, let's say, linear, we want to start with a linear expression, but we don't necessarily know how many things to begin with. So a generic linear expression would be ax plus b. So that's a kind of an open-ended linear expression. Well, we've got an x squared on the right side, so we need to generalize that to kind of any quadratic polynomial. So there's our particular solution. So we want to generate a quadratic, we better start with a quadratic. We don't know anything about the quadratic that we need to start with other than it needs to be some generic quadratic. So there's a generic quadratic. Now, before we go any further, certainly since y has an x squared in it and this has a y in it, that gives us the x squared term. So this term can generate an x squared term pretty obviously because it's in here negative two times. But in the other terms, we're going to have to take the derivative. Well, when we take the derivative of this, let's go ahead and do that, which is what? The derivative of this generic quadratic polynomial. Plus b. Is that all right? So we're going to generate some of those. Here they are. Well, we don't have any x squareds here. So what probably is going to have to happen to the x's that we have here and the x's that we have here and the constant that we have here and the constant that we have here? They're going to have to drop out somehow. Because all we want on the left side when all is said and done, the only thing we actually want is the x squared term. So it must be true that the x's are going to all knock each other out and the constants are all going to knock each other out. In fact, we have more stuff here. What's the second derivative? Two a. So we've got a constant of c, b and two a. We also have some other coefficients in here like a minus two y. Eventually we want all the constants to drop out. So we'll do what we normally do at this point in time. We plug into the original equation. y double prime is two a. We add to that y prime, which is two a x plus b. We add to that we subtract two y's and the right side we're supposed to, after we do all this stuff, we're supposed to generate an x squared. What do you think needs to happen at this point on the left side? Well, we can distribute the minus two, but after that, combine all like terms. What kind of terms do we have? We have x squared terms. We have x terms. And anything that doesn't have an x squared or an x is a constant, so we'll put all those together. So how many x squared do we have when all is said and done on the left side? That looks like a nice equation. What's negative two a have to equal? One, right? How many x squared do we have on the left side? Negative two a. How many x squared do we have on the right side? One. We have one x squared over here. So there's one of our equations. So in fact, we get a value out of that right away. One equation, one variable. How many x's do we have? There's two a x's and there's minus two b x's. Is that correct? And then everything else that doesn't have an x squared and doesn't have an x is a constant, so what are the constants? Two a plus b minus two c. So our three equations that result coefficient of x squared over here better equal the coefficient of x squared over here, which is one. So we get a solution out of that. A is negative one half. The coefficient of x over here better equal the coefficient of x on the right side, which is zero. We don't have any x on the right side. Let's go ahead and get a solution out of this, since we already know what A is. So we get a coefficient of x squared over here, which is one. Two a would be negative one. If A is negative a half, stay with me now. I'm starting to drift, getting that drift thing going on. So we have two negative two b equals one. So two b equals negative one b is negative a half. Does that look good? And two a plus b, which we know both of those now, minus two c. That is the constant on the left side. What's the constant on the right side? Zero. So two a that'd be negative one plus b, negative a half minus two c equals zero. So we get what? Four c three halves, negative three fourths. I was thinking that. I was thinking we were going to have negative three fourths for the constant. Right before we started this problem, and lo and behold that happened. I had no earthly idea. But I did remember that all three of these terms actually did appear in the particular solution. We really want a final answer, but let's go ahead and write down the particular quadratic, which we started out with an a x squared plus b x plus c. Now we know a b and c. So negative a half x squared minus a half x minus three fourths. So our final solution, what was our homogeneous solution? C one e to the x, C two e to the negative two x, kind of a lengthy solution. But I don't think getting there is like ridiculously complicated, it's just lengthy. It takes a while to get to these solutions. Question about any part of that? Easy, fairly straightforward. So now we've handled kind of an individual exponential individual trig function, or sine or cosine function, and now a kind of a generic polynomial. We can have combinations of those, which I guess that's probably where we need to go next. I wasn't going to do that next, but I think that's probably the appropriate thing to do. This is quite a combination of stuff on the right side. But everything is polynomial, exponential, or sine or cosine, or some combination of those. In this case we have a product of a polynomial, pretty simple polynomial, and an exponential. I don't know if we've had one like this. This kind of might be all kinds of stuff that we haven't encountered yet. Usually we have the y double prime, the y prime, and the y. So we're missing the y prime. That's going to change the characteristic equation, but it's still doable. In fact, what is the characteristic? Minus four. Minus four? Because we're missing the linear term, the first derivative term is missing, which normally translates to the r term. So we've got the r squared term, and we've got the constant difference of two squares. So we get two distinct real roots. Maybe I'm confusing all these answers today, but some of these answers are different than what I was expecting. I guess we're okay. Does that work? Now, you can take this all at once from this point. It can get a little messy. So I would recommend that you take the particular solution in pieces. The only way, these are so different. This piece of the non-homogeneous solution and this piece of the non-homogeneous solution, there's going to be no overlap. The terms that are going to generate the cosine of two x are completely different from the terms that are going to generate x e to the x. So you can take them in pieces when they're completely separate as far as what types of functions they are. So we'll actually do two of these and this combine our answer at the end, because that's all we do is add all our stuff up anyway. We add up the stuff that's going to generate zero. There it is. There's our homogeneous solution. We can add in our solution that's going to generate cosine two x and then we can add in our solution that's going to generate x e to the x. So all of it becomes part of our final answer. So we're going to do this in pieces. So let's do this one first. We've got to figure out how to get some x e to the x's. Well, we need a generic version of each one of those. This is a linear polynomial, first degree polynomial. So if we generalize that, what's a generic linear polynomial look like? A x plus b. A x plus b. And then we need a generic amount of e to the x's. And by the way, our e to the x's already part of the homogeneous solution. They are not, so we're okay to kind of go off with just e to the x's, since they're not a part of the homogeneous solution. So normally we would say we don't know how many of these to start with. Let's start with some unknown amount of these e to the x's. If this were by itself, that's what we would do. But do we really need that c there? Couldn't we distribute the c into here and get c times a? Well, we don't know what c nor a is, so isn't c times a some number? And c times b is again, we don't know what either one of them are, but c times b is some number. So we can really do without that. It's kind of already accounted for in the fact that we have unknown coefficient of x and an unknown constant. You can keep it if you want to, but it's just an added variable and it causes more trouble than it's worth. So our particular solution appears to be ax plus b, generic, linear, polynomial times some unknown amount of these e to the x's, which we've absorbed that in the preexisting unknown coefficients. Now, granted we haven't dealt with this yet, we're going to do that separately. So I'm going to rewrite the particular solution. So we really don't need the first derivative as far as subbing it into the equation, but we need to go through the first derivative so we can get the second derivative. So the first derivative, let's use the product rule first times derivative of second plus second times derivative of first. What's derivative of first? derivative of that. We've got the same thing again, right? So we use the same product rule first times derivative of second plus second times derivative of first. And then the derivative of this last piece, a, is a constant. We can bring it along or coefficient, bring it along for the ride derivative of e to the x is e to the x. So we need y double prime and we need y to plug back into the equation. Let's see if we can put some things together. I guess we can do most of that later. Certainly we've got a e to the x and we're going to add in another a e to the x. So we've got 2 a e to the x. So there is y double prime. We're going to subtract four y's and then we're going to attempt to generate this x e to the x term. So why don't we on the left side, we're going to have an x e to the x term. Let's kind of gather along how many of those we have. So how many of those do we have? So if we distribute this e to the x, so we've got a of them here minus 4 a of them here. I like the sound effects. Keep them coming. So how many of those do we have? How many x e to the x on the left side? We've got a of them here and minus 4 a of them here. Is that correct? Minus 3 a. What other terms are we going to have on the right side? Just e to the x terms. So let's gather those up. How many e to the x do we have? There's b and there's 2 a and here's a minus 4 b. So we had a b and now we have minus 4 b. So what? Negative 3 b? 2 a. And every term had an e to the x in it at least, right? So I think those are the only terms we're going to generate. X e to the x and just some number, arbitrary number times e to the x. I think we've taken care of everything. Does that look right? To you on the left side, x e to the x and e to the x are the only terms we have. On the right, we have 1 x e to the x. So what's an equation that results from that? Negative 3 a is equal to 1. 1? So a is negative 1 third and negative 3 b plus 2 a which we now know what a is. Better be what? Better be 0 because we don't have any of those over here. So negative 3 b plus 2 a's equals 0. So b is what? Negative 2 9ths. Does that sound right? So those were the coefficients in our generic linear expression that modified or was multiplied by e to the x. So at this point, we have our first particular solution. You know, I don't know what to call it. Let's call it p1 is a x plus b. So that is negative 1 third x minus 2 9ths times e to the x. So apparently if we plug that in for y and take its second derivative and plug it in for y double prime, we could generate this term right here. 1 x e to the x. Now we move on to the second piece of the non-homogeneous solution. So we did this already. So I'm just going to put a line through that. We've already done that but we haven't. What was it? Cosine 2 x. So we need a second part to the particular solution. Distinctly different so there's no overlap from the first piece. How are we going to generate some cosine of 2 x's? What could we call our original y thing in hopes that by throwing in the original y thing, actually negative 4 of them, and one of the second derivatives, we could generate cosine of 2 x. What's kind of a generic version that we need to use to generate sines or cosines or sines and cosines. Does that work? Now if it bothers you that we're using A and B again, it's a new one. So they're not at all related to our original A and B. Now do you see what this would look like if you decided to do it all at once? You'd have an A x plus B times e to the x plus c cosine 2 x plus d sine 2 x. So I think it's better to do them in pieces. You can do them all at once if you want to. Derivative of A cosine 2 x. Is that work? Derivative of cosines so it's going to be negative. Derivative of B sine 2 x. We really don't need that one but we do need the second derivative so we have to go through the first derivative to get it. Derivative of negative 2 A sine 2 x. Are there lots of opportunities for sine errors, numerical errors, and all kinds of stuff? There are along the way so it's not one where you can kind of lightly concentrate. Some kinds of problems that we do you can like. The homogeneous part of these problems. You could probably do them and you know ride the stationary bike at the same time or work on the treadmill. But this is probably not a treadmill problem because you're going to have some errors if you do that. Negative 4 A cosine what's derivative of 2 B cosine 2 x. Minus 4 B sine 2. Now if you want to kind of check down the line aren't you going to gather an extra coefficient of 2 along the way right? So you better have a 2 in each of these and you better have a 2 times 2 in each of these. Every time you differentiate a cosine you better have a sine change, SIGN change right? And every time you differentiate a sine you keep the same SIGN. So you can kind of check and it doesn't take much to check as you go down the page. Alright what do we need? We need y double prime minus 4 of the original y things. And what are we hoping to generate with this stuff on the left side? Cosine 2 x. We've already generated the other term on the right side. And in fact how many cosine of 2 x we've got one of them. So let's gather up the terms that we have. We have cosine of 2 x terms and we have sine of 2 x terms. How many cosine of 2 x do we have? Negative 4 A minus 4 more A negative 8 A is that right? And how about sine of 2 x terms? There's negative 4 B and negative 4 more B. Does that work? Negative 8 B. So what are our equations from this point? Negative 8 A better be 1 and negative 8 B is 0. So in order for that to be true B has to be 0. So we allowed for a certain term to be here. In fact it's not here. And we'll see if that kind of makes sense based on the left side of this equation. So our second piece to the particular solution what was A? A was the coefficient of cosine of 2 x and B was the coefficient of sine of 2 x. We don't have any of those so I'm not going to write it down. So there's our second one. Does it surprise you that we lost the sine of 2 x term? I want somebody to explain why that should not be a surprise. There isn't any sign on the other side. But what do we have on the left side that kind of made sure that we weren't going to generate any signs? It's going to go back to the same function. If we start with a what? A cosine and we take its second derivative aren't we going to be back to cosines? So we shouldn't have to mess with signs in this one. We only want signs present when we've generated them elsewhere and we want to get rid of them. Well we didn't generate them elsewhere. There's a cosine. The second derivative is cosines. No signs are generated on the left side. So it shouldn't be a mystery that we don't have any in our particular solution. Alright let's gather up our solutions and then we'll gather up our books and our gear and we'll leave. So what is the homogeneous part of the solution? Boy I got a quick answer on that one. Use that statement more often. Use it about halfway through the class and then just say now we're not leaving. E to the... Alright first particular solution. Wait a minute. What did we have here? Negative one-third. X minus two-nights. That was our first particular solution. So we did have a product there. We had a generic linear polynomial times a generic exponential and then we also had a completely separate term and it's permissible to do them separately. Alright I wasn't going to tell the laycomers but that's just not fair and I'm not that kind of person. We are not meeting tomorrow. That would have been kind of mean wouldn't it? And I will see you on Friday. Yes. That's kind of the next phase. Yes.