 Okay? Yeah. And so I want to remind you that tomorrow has a Tuesday schedule, so no, tomorrow has a Thursday schedule, which probably makes no difference for you because you don't have a Tuesday, Thursday registration. So what? But maybe three other classes. There, I want to remind you also that there's a little weather sign that's due on Wednesday or Tuesday night if you want. And I will put up another one probably tomorrow that will be short, that will be due the Wednesday after Thanksgiving. So it will be short because it's short. Okay. So what were we doing last time? Okay, so we're doing differential equations and in particular last time, I mean we're going to talk about direction materials and Euler's method and ways of approximating solutions. And last time we talked about one technique for solving certain kinds of differential equations which was separable ones which is a relatively straightforward technique which says that if we have an equation of the form dy dx is some function of x over some function of y, which obviously it doesn't mean over it being a product. So you can sort of separate the x's from the y's, then you rewrite it by putting the y's on one side and integrating and putting the x's on the other side and integrating. And then that just gives you a function g of y is some f of y plus c and then you solve it. Okay. So for separable equations this is pretty straightforward. We did a few examples of this last time. Maybe the simplest separable equation. So a lot of models that come up in a lot of applications are separable. Not all of them but a lot of them are. And so the simplest one, the exponential one, say I have what letter I use dy dx equals 3y. So here the f of x is just 1 and g of y is 1 over 3y. So we can separate to write this as 3y. I could do 3 over there just to have something. Y du y equals 3 dx. And then you integrate both sides. Wait, isn't it y over y? Yeah, 2y over y. Thank you. So did I do this already last time? Maybe not. Doesn't matter. So I integrate both sides and I get that the log of y is 3x plus a constant. So we solve this for y. I can exponentiate both sides to get so e to the log of y is the absolute y and then this is e to the 3x plus some constant which e to the 3x plus a constant is e to the 3x times e to the c. And since c is just some arbitrary number then e to the c is some arbitrary number. And so I have, I guess I'll just continue it here. I have the absolute value of y is some number e to the 3x but that means that y is plus minus some number e to the 3x. Now there's something here that I left off. I mean it came back. It came back in some subtle way but you see when I was here I'm missing a solution. What solution is it? So if I just say that y equals e to some constant times e to the 3x. This is not wrong except that there's one solution that I'm missing. It doesn't satisfy this formula. What? The c? Well the c is obscuring some certain fact here. So here if you pick any c, e to the c is a positive number. So I've called this a. It has to be positive. But I have absolute value of y so that means I pick up the negative ones too. But what about the zero solution? The zero work here? Suppose I give you the initial conditions for this. But I have this equation and I say that at time zero I've got nothing. Then what value of c works for this? None of that. There's no value of c that will make this work except minus infinity. But minus infinity is not much of a number. Yet somehow magically when I did this manipulation, let's call it b, it came back because I can take b equals zero. That doesn't always happen. What went wrong? Where did this zero solution go? It somehow got lost during my manipulations. How did it get lost? Everything I did was algebraically fine and I'm not making the algebraic mistakes unusual for me yet. So you think it went here. So that is a good guess. It's not right. It's related to that. It actually happened before that. So think about what I'm saying. What if y of zero is zero? Or y of five is zero. Yeah. Well it actually happened before that. It's when I divided by y. You can't divide by zero. Whoops. So sometimes you have to pay attention that right here I'm assuming to go from here to here I'm assuming that y is not equal to zero. Because if y is equal to zero this is nonsense. One over y equals three. Yeah. If y is equal to zero we wouldn't have to do that anyway. If y equals zero we don't have anything to do anyway. The derivative is zero. So the derivative is zero. So the function is the constant. We're done. But so I didn't have to worry about y equals zero. But here I assumed y was zero and then went merrily along and found all of the solutions except this one. So you have to think about what you're doing because sometimes you'll make assumptions that will rule out solutions that might be just the ones you're looking for. You have to think about oh, I made an assumption that y is not zero so I can divide by it. But if y is zero the problem is really easy anyway. So we have to pay attention to certain little cases. So I guess what I'm saying is you know don't get too carried away with the formulaic manipulations. And here we're lucky because the form of the solution that we come up with allows us to take the constant equals zero anyway. So the zero solution sort of magically comes back. But it doesn't always do that. And similarly sometimes when you're doing it you have to make a choice oh let's assume this is a positive because you have a square root floating around or something like that. And if it's negative you get different answers. So sometimes you just have to pay attention to what you're doing. And when you get to the end you have to say did that make sense? Okay. Alright. So I don't know why I wanted to point that out now but I did. Okay. So these several equations are in general pretty easy. They come down just doing some integrals. Let me do another. So there's a bunch of applications that are standard for these kinds of differential equations. One of them, well I guess I did one before. Let me do that one again. So there's one I did for Euler's equation. I don't know, should I do the same? Let me do the same one. So I had a block of clay that I put in and killed or whatever. Was that Friday or Wednesday? Sometimes last week I had a heating problem. Does anybody want to see that one? I can solve it explicitly. You want to see me solve it explicitly? Okay. So we have, so we're heating block of bricks. Yes. And it starts at 15 degrees Fahrenheit and the kiln at 100 degrees Fahrenheit and after what, one hour? Temperature is what? 100. Is that what they did last time? 100 degrees. So now what's the temperature at 6 hours? Or maybe, I guess I did 4. We use the fact of Newton's law of cooling or Newton's law of heating or whatever you want to call it, which says that the rate of change, so cooling says that, so let's let T of, I guess, H, so let's let H be the hours. T of H be the temperature of the clay, the only clay once it gets to that temperature. And Newton's law of cooling says that the rate of change in the temperature of the stuff is proportional to the difference between the current temperature and the ambient temperature. Right? I have my kiln here and this is cooler and the rate of change of the temperature of the cool stuff, this is 500 degrees and this is less than 500. So this means that you don't want to heat up. And so it says that the rate of change in the temperature of the stuff is proportional to, which means it's at constant times, the difference in the current temperature and the ambient. So that's our differential equation. This applies to not just heating things but also the heating things. If I take, when I take the clay out of the oven and I set it down so it's now a beautiful bowl. So when I take my ceramic sculpture out of the oven and I set it to cool in a 70 degree room, the rate at which it will cool will be proportional to the temperature that it is when it comes out of the oven. The difference between that and how do we solve this? Well, we try and write it as a separable equation. Oh, I guess this has the initial condition that T of zero is 50 and we also know that T of one is something. Right? So that's, once we have this, this is the whole problem written without words. Well, it's a fine T of four. So we have DTDH equals constant and drop the of H's T minus 500 and so I can separate this equation and write it as DT over T minus 500 equals a constant DH and then I can just integrate. Well, OK, so I can just do this. Yeah, it's exactly the same equation. It's just that T of zero will be, say, 95 and this will be, say, 20. It's exactly the same equation. It's just, you know, the k will be different. In this case, the k will be negative and the cooling case, the k will be positive. I think so. One or the other. But it's the same. Yeah. You said the k is a constant, right? Yes. I have to figure it out. Right? So I have to use this information to figure out what k is. Yeah. So I can do this or I could also make a substitution if I want and turn it into an equation I already know. So, well, let's do this and now I'll move both of those. And so if I integrate this, I get the log T minus 500 equals kT plus some other constant. So now I have two constants. And so that means that exponential, so again, this is assuming that T minus T is not 500 because if T is 500, what I did is just wrong. But if T is 500, it stays 500, so we're okay. Yeah. Because I can't write. So that means that T minus 500 is, well, E to the C is some constant A, E to the kH. And so that means that this is really the member T of H. That means that T is 500 plus A E to the kH. And so now I have a formula for the temperature. But there are two constants here I don't know. I don't know A and I don't know k. But A is easy to find. But I know T is zero. So to find A, so I know that 50 is T of zero is 500 plus A E to the zero. So A is 450. So 50 is 500 and A is 450. Okay. So we have that. And now we can find k. So here I have, I've lost track. I have T of H is 500 minus 450 E to the kH. And so when H is 1, that's 100 and that's 500 minus 450 E to the 8, E to the k. So that means minus 400 equals minus 450 E to the k. So 400 450, which is 40 over 45, which is 8 over 9, I think so, is E to the k. So this k is the log, k is the log of 8 times. Okay. So that means that T of H is now 500 minus 450 to the log of 8 times H. So then to figure out what T of, I think your favorite number is, you just plug it. If you want, you know, this is, this is, log of 8 times is a negative number and you can manipulate it a little bit longer. This is good for you. So you can't calculate it right now. It's, so I think last time we got something like 260 something here. We need to do it a little bit later to see what it is. Okay. Now really this is just an exponential growth problem. Or exponent, I mean this problem is really the same as this problem. The only difference here, instead of going through this business and solving the equation I already solved once, I could just make the substitution mu equals T minus 500, or how to call it x, because I called it x there, y. Y equals T minus 500 and that would transform, so if I let T minus 500 then dy dt dH is the same as dt dH. And so this equation just becomes, so dt equals K, T minus 500, becomes the same as dy dH, which we already know the solution to without having to solve. Equal some constant. So a lot of times by making the substitution, you can transform one variable into another, but you have to remember that your substitution also changes the derivative. So we have to remember to substitute not only for the variable, but also for the derivative. And it's the same. They're really the same problem exactly. Any questions on that one? Okay, good. So he's exponential, so I think someone, I don't know, we posted on Piazza or something once that they want to understand why E shows up all over the place. This is why almost all differential equations, not almost all, many differential equations, a lot of differential equations somehow show up to say the derivative of a thing has some relation to its value. So exponential growth, exponential decay, heating cooling, a lot of these things have exponentials hiding in it. And as we saw when we played with power series, sines and cosines are really exponentials in disguise. Right? And also in the paper homework that was due last week, another family of things called hyperbolic sine and cosine are just sums of exponentials in some little disguise. So a lot of things exponentials show up in. Typical class of applications that show up in these introductory differential equations are mixing type problems. These are, oh actually let me stick to exponentials in just a minute and then I'll come back. These exponential problems, they model lots of things. Right? They model population growth in many cases. They model compound interest. They model motion of a you know, you have a door on a spring then when you shut the door there's an exponential involved. There's a whole ton of things. So you know what I'm talking about, right? Like in the back. When you close the door and with that damper you keep it from slamming. That damper causes it to slow down with an exponential speed. So this exponential stuff shows up in lots of applications. Another standard application, emission kinds of problems I'll need to say. The short homework that's going to be you next week, there'll be a bunch of application e-times and things like that. So you have say some tank that's filled with, so I might as well just deal with this problem here. 200 kilograms of salt in 5,000 meters of water. So I have some salty water, 200, I said 20. Okay, so 20 kilograms of salt in 500 meters of water in here full of some salty water. If you don't want it to be salt and you don't want it to be water it doesn't matter. You can have it be anything you like. What we're going to do here is we're going to drain some off and we're going to fill it up with some other stuff. So some comes in and some goes out. And there's a big stirrer in here. As soon as the big stuff is all this state stirrer. And 3 kilograms of salt per liter. So what comes in out of the mixture is 3 kilograms of .03. I'm going to take some out at 25. So it comes in at 25 meters per minute. So it comes in at 25, 25. So the rate in and the rate out is the same. And that way it doesn't overflow and it doesn't go empty. And so now what is the concentration at some time? So here's the setup. I have some salty water in a tank. I give you an initial concentration. I'm pouring some stuff in and I'm taking stuff out at the same rate and I want to know how I can describe the concentration. So how would I do this? Do a differential equation. I would do a differential equation. That's a good start. So what differential equation would I do? The right one over dx equals something. Okay so when you're doing these problems, if you think back to when you had these work problems in calculus or the work problems in algebra or the work problems in whatever, you have to think about what your variables are. So what is it that we want to describe? The concentration. So maybe that should be some variable that we want. This is a function. What does it depend on? So we have to set up our variables. Okay. So we want c of t. What do we know about? Okay so we know c of zero is whatever 20 over 500 kilograms per liter. And we want c of t. I guess I already wrote that. So I don't need to write it again. Okay. And we know something else. C of t. Well okay so how do we figure out c of t? We do. Where? 25 liters per minute. Well that's not how much the concentration. So this is the concentration in the tank. And there's stuff coming in at 25 liters per minute. And there's stuff going out at whatever rate it is. This is 25 liters per minute of something with 3 kilograms per liter. So in fact this is a little bit misleading. We don't really, it's not easy to write. So to actually think about it in terms of the concentration. Because the amount of the tank is different from the amount in coming in and going out and there's different units. Instead let's just think about how much salt we're at. Right? Well so if we just think about the amount of salt in the tank rather than the concentration we can get the concentration very easily by dividing the amount of salt in the tank by 500. So c is in some sense not the natural variable that we want. It's okay it just makes life a lot more complicated. It would be much easier to just forget about concentrations and think about amount of salt. Because then the amount of salt in the tank divided by how much there is, well you have how much you start with and the rate of change of salt is how much you create minus how much you take out. And that's very easy. We could rephrase it in terms of c but let's just phrase it in terms of salt. Clearly our differential equation let's let s of t and then the differential equation becomes easy. This is the amount in or actually the rate minus the liquid in salt we take salt out. The water is just the stuff you're carrying the salt with. I mean if you would prefer to rephrase this in terms of something else, well it doesn't matter. The water is just the carrier of the salt. And so now we have an easy differential equation. At what rate does the salt come in? How much salt comes in per minute? Well we're adding .3 kilograms per liter at 25 liters per minute trying to give me .3. Shouldn't have done 24 liters per minute and that's a multiply. Oh well. So this is .75, right? So our rate in is .03 kilograms per liter at 25 liters per minute. So that means I'm adding .75 kilograms of salt per minute. I'm going to take away . Well what am I taking away? I'm taking away somewhere, oh the same rate but I'm taking away some stuff at 25 liters per minute. How much salt is in the stuff? I wait an hour and a half. How much salt is in the stuff? I don't know. But what do I know that tells me how much salt there is? There's a variable that I wrote down. It's the concentration, right? Well what's the concentration? The concentration is the amount of salt divided by 500. So I have some amount of salt s in the tank at any given moment and so its concentration is s over 500. Now if you want to write this in terms of the concentration but it's sort of a little more natural to think of this the amount of stuff at least to me. So now we have a relatively straightforward s and t is in kilograms and this is in liters so the units all work. I have kilograms per liter and liters per minute is kilograms per minute, kilograms per minute. And dT is the rate of change of salt. So that's kilograms per minute so the units are all good. We can forget about them now because they all match. So I have ds dT is .75 minus 25 over 500 is 50 over 1,000 which is .05. This is the differential equation we just did. Once again some number minus some number times s. It's really the same as this differential equation. Some exponential that's shifted you can just do it again if you want. Oh I guess we have the initial s of zero is s is the amount in the tank. Yeah that's the amount in the tank so s of zero is 20. So there's the differential equation does anyone want me to complete this or is everyone confident they can do this? Is there anyone who's not confident? Okay since you're all confident you can do it I won't. Okay so now there's a little bit so you know I can go through 20 different applications that all turn out to be some separable equation you can rank both sides blah blah blah blah You can do that you can read about several more in the book you will get to do several more on homework so the other we have to talk a little bit about exponential growth which I think everybody has seen a jillion times before but I have to say a few words about it the standard growth or decay the standard applications that this models are population growth and no constraints so this is a differential equation like I just did it d y d let's put it t so we think of it as a model in time d y d t some constant times y which gives us that y equals a e k t so in population growth here k is usually positive this is the growth rate and a is the initial population also decay of some radioactive particle like uranium or something like that there's a half life and a is dependent on the half life so here our constant is negative you invest some money that's compounded continuously and this is an exponential growth problem and as we saw a slight variation is heating and cooling and mixing these things they're not strictly exponentials they're exponentials from a constant so the distinction between these guys and these guys is just what you call zero or what you call your baseline if we look at if we look at the slope field the direction field for an exponential by we have the zero solution here and then we see things like this this is the direction field for k is positive and so you have some initial population or you make an initial investment and then it grows exponentially or if k is negative then these things like this instead and you make your initial you have your initial amount of uranium or whatever it is and it decays exponentially like that and then these mixing problems or cooling or whatever they just shift this picture up so in that heating the block of play this is 500 and we have a picture just like we made the direction field it looks something like this and we have we put it in the oven and we heat it and it tends towards 500 or in the cooling problem you take it out of the oven and you cool it and it tends towards the equilibrium solution these are all the same thing and solving these problems analytically always comes down to not necessarily have to separate variables but for example I bet you did these problems in high school and when you did them in high school you just had this formula you didn't have a differential equation but you had this formula and you probably also did them in calculus one which was what you did in high school and again you kind of had this differential equation but you did a lot of proofing around and then it came out but they're really all the same thing and they all come down to fiddling with the constants and awaiting them now in practice a lot of times you have some kind of an experiment and you have some data which may grow exponentially or you believe in some kind of exponential model so you have some data which fits some sort of what you believe to be exponential line and then you try and fit the curve of this type to it and I just want to point out I'm not going to spend a lot of time on this because I think you've all done this before if you just choose two points and fit a curve it doesn't always fit so well it's the same problem if you have linear data you always have some kind of noise so you can do some kind of a least square thing or you can just eyeball it and make a guess so everybody know what I'm talking about here am I saying anything new? I can't tell whether you guys are paying attention or at least you're paying attention so I don't want to beat this dead horse I feel like this just goes on and on and on about the same stuff so rather than just going on and on about the same stuff I will assign some problems along this line you'll do them, we'll make sure you can do this and move along so I didn't get to explain how to do this but anyways, it's kind of easy so how did I stand skimming? I remember that you came from homework 8, that's critical you've got to put a second