 In this final video for lecture 28 about related rates, I wanna look at another example. And this time we're gonna have cars driving towards some common location. Now don't worry, lecture 29 of our lecture series will also include some more examples of related rates. So this is not gonna be our last video. Check out those other ones if you wanna see some more practice. But imagine we have two cars traveling to some common destination. So car A is traveling westbound at 50 miles per hour, as you see in this diagram right here. And car B is traveling northbound at 60 miles per hour that you see right here. Both are headed for the intersection, they're both headed towards an intersection of two roads. So you see that there's this north and south road, there's this east and west road, they're driving together. So at what rate are the cars approaching each other when car A is 0.3 miles away from the intersection and car B is 0.4 miles away from the intersection? So what are we asking about? We're asking about the distance between the two cars. How quickly is this shrinking over time? Cause we know how fast the car A is approaching the intersection. We know how quickly car B is approaching the intersection but how quickly are they approaching each other? You'll notice here at this diagram there's a right triangle in play because we have a northbound road hitting hitting an east west road. This is gonna be formed as a right triangle. Is then gonna be a relationship between these cars, right? When you look at the speeds of the car once traveling 50 miles per hour, once traveling 60 miles per hour, these speeds, these are speeds which say something about velocity. Velocity is the derivative of a motion function of a position function. Therefore these are statements about the derivatives of things. So this what makes it into a related rates problem. We wanna figure out at what rate the cars are approaching each other. So what we have here is information about derivatives. Some derivatives we know, another derivative we don't know and we need to figure out what that derivative is. So how are we gonna relate these things together? Well, given that we have this right triangle it makes sense we could try to make it some type of argument using the Pythagorean equation. Let's say that x is the distance between the intersection and car A and let's say that the distance between the intersection and car B is y at any given time, right? And then the distance that between car A and car B we'll call that z. So because these distances form a right triangle the Pythagorean equation applies and we get that x squared plus y squared is equal to z squared, okay? So there's a relationship between the variables. What can we say about the derivatives of these things? We know that for car B, I'm not sure why I'd start that one. Let's start with car A. So car A is approaching the intersection at 50 miles per hour. This tells us that the derivative of x with respect to time is equal to negative 50. Why negative 50, right? Well, if x is the length of this triangle over time that side is getting smaller. As time elapses the car is getting closer and closer intersection x is gonna get smaller and smaller and smaller. So we actually see that until they meet at the intersection the derivative is gonna be negative 50 so it should be getting smaller. What about car B, right? As car B is approaching the intersection right here, its distance between the intersections is also getting smaller. So based upon the information we were provided, based upon direction and the speed, we see that dy dt, the change of y with respect to time is gonna equal negative 60. 60 miles per hour, measuring everything here in miles per hour. What can we say about z? Well, it turns out we don't know what z is, right? We need to figure, I should say we need to know what dz over dt is. We don't know the rate in which z is changing. That's the unknown. This is what we need to figure out. And we specifically need to know this when x, y is equal to 0.3 and 0.4. That's what we're looking for right now. The derivative at that moment in time. This is where the Pythagorean equation comes into play. Now, if you've been following along with this lecture series, you might recall a previous video for which we had a related rates problem. We found an equation that had three variables but we were able to remove one of the variables using some other relationship that was going on here. We don't need to do that in this example. The fact that we have three variables is okay because notice what we also have. We know one derivative, we know two derivatives and we need to know a third derivative. So here we know two of the derivatives, we don't know the third derivative. So we can solve for the third missing derivative. In our previous video that I'm referencing right now, we knew one derivative, we needed to know a second derivative and we knew nothing about this third one. And so we removed it from the equation by substitution because we didn't have any information about the missing derivative. That's not the case here. So there's no need to remove any of the variables because we know all of the derivatives except for one, the one we don't know is the one we want to know. So because of that, we're then gonna proceed to calculate the derivative here. Take the derivative with respect to time on both sides of the equation. So we take D, D, T, both sides. On the left-hand side, we can, because we have a sum of two things, we can distribute the derivative. So we're gonna get X squared prime plus Y squared prime. On the right-hand side, we just have a Z squared prime. In which case, in which we do all of these, we're gonna take by the power rule, the derivative, but we also need to invoke the chain rule here because we're taking the derivative with respect to time, not with respect to X, not with respect to Y, not with respect to Z. All of these numbers, X, Y and Z are functions of time. So we have to take the derivative with respect to time. So we take the derivative of the two X, excuse me, the derivative of X squared, get a little ahead of myself there. When you take the derivative of X squared, you're gonna get a two X, X prime. You have your outer derivative and your inner derivative. The inner derivative is critical. If you've been following along with this Calculus series, you might be in the habit of taking the derivative with respect to X. So when you take the derivative of X squared, it's very tempting just to say two X and walk away. No, you pick up that mic and you finish it. You need two X times X prime, the derivative. Because the derivative of X here is not one. It's actually negative 50. The derivative of Y squared is gonna be a two Y, Y prime by the chain rule. And the derivative of Z squared will be two Z, Z prime by the chain rule. For simplicity's sake, I notice everything's divisible by two. So I'm just gonna divide both sides of the equation by two. And that then gives us the equation X, X prime plus two, excuse me, I got rid of the twos. Y, Y prime is equal to Z, Z prime. We need to figure out the derivative of Z. So divide everything by Z and we end up within the formula that Z prime is equal to X, X prime plus Y, Y prime all over Z, like so. So that's the derivative we're looking for, but there was a specific derivative we had in mind, right? Well, the derivative when X is 0.3 and Y is 0.4. So let's plug in the information we know. So X is gonna be 0.3 miles. And then X prime was a negative 50 miles per hour. Then for Y, we have a 0.4 and then the speed of Y, the velocity I should say is negative 60. And then the only thing we don't know is Z. So we need to figure out what Z is. But this is where the original equation can be very useful right here, right? Because X, Y and Z form this relationship that X squared plus Y squared equals Z squared. So we can plug in specifically the 0.3 and the 0.4. So we get 0.3 squared plus 0.4 squared. That's gonna equal Z squared. So we compute this, we're gonna get 0.09 plus 0.16. This is equal to Z squared. Add those together, you're gonna get 0.25, which is equal to Z squared. Take in the square root, we see that Z equals 0.5. So basically this is just the classic 3, 4, 5 triangle. I just divide all the lengths by 10, ha ha ha. You didn't see that ever coming, did you? So we get this 0.5 right here. Another clever thing, if you're paying attention, let's times the top and bottom by 10, right? So because if you times 0.5 by 10, that's just gonna give you five. This will just give you five and you can distribute the 10 right here. And so this quantity simply just becomes three times negative 50 minus four times 60 all over five. And then we proceed to try to simplify these things where we're gonna get negative 150 minus 240 all over five. You know, add those things together, we get negative 390 all over five. And so then that goes in there, you're gonna get negative 78, negative 78 what, miles per hour. You will notice that the number here is a negative. This velocity should be a negative quantity because as the cars are getting closer and closer to each other, I should say, as they're getting closer and closer to the intersection, the distance between them is shrinking and a negative derivative implies that the quantity is shrinking. So the correct answer would be negative 78 miles per hour. If you're struggling, like if you're working on a problem like this, you don't understand why you can't get the right answer, maybe you'll be able to check the signs because if you said the answer was 78 miles per hour, that would be incorrect. That's gonna be, well, it depends also on how you say it. Let me make a comment about that. If I just say, oh, Z prime is negative 78 miles per hour, that is correct. But if I didn't say something like in words, if I say that, oh, the cars are approaching each other at a rate of 78 miles per hour, that's appropriate as well because by saying approaching each other, that gives me the information on direction. That's all that this negative sign is here. It's a statement on direction. Positive means one way, negative means the other way. So if you describe in words that the cars are approaching each other at 70 miles per hour, then you don't need the negative. And so be careful on the language you're using to decide whether you need that negative sign or not. So that then brings us to the end of lecture 28, like I said, we'll do some more examples of this in lecture 29 by all means, check out the link you can see right now to see those videos. If you learned anything, please give us a like. If you wanna see some more videos like this, either hit the links or subscribe and you'll see lots of cool math videos like this in the future. Bye everyone.