 Hi, I'm Zor. Welcome to Unizor education. Let's continue talking about different theorems about derivatives. It's again one of the main theorem today. It has a name of Lagrange, French mathematician. It's basically a little bit more involved than the previous Roll's theorem, but it's very much like it and it's basically using it anyway. So here is what we are talking about. Let's consider we have a function. Now in the Roll's theorem, we had a certain segment where the function took the same values in both ends. And then we said that there is a point where the tangential line is horizontal or a derivative is equal to zero. In this case we have different values at the end of a and b. But here is what's important. Let me again draw a picture with Roll's theorem. So if the values at both ends are the same, then this line is parallel to this one, to the axis, right? And the horizontal tangential line existence of this means that it's parallel to this one. In this case, in the case of Lagrange's theorem, we're talking about relatively the same thing. So if you have a function which has different values at a and b, then there is still some point in between where a tangential line is parallel to this chord which connects the ends of the function in both ends. So all I have to do is to express it mathematically. So geometrically you understand what's the meaning of it, right? Okay, so what is it mathematically? All I have to do is basically to say that this angle has the same tangent as the angle of this chord, right? So what's the angle of the chord? Well, we can always have this line which is parallel to the x-axis. So the tangent of this angle is this divided by this, right? So this piece is difference between two values, which is f of b minus f of a. Now this piece is b minus a. So that's the tangent of this angle. Now the tangent of my tangential line to a curve is obviously the derivative at point x0. So the theorem states that there is such a point x0 where the derivative is equal to this ratio. For any relatively smooth function, which means it's differentiable, its derivative is continuous and stuff like this. So for a nice and smooth function, there is always x0 between a and b where this equation is true. Okay. So to prove it, I will basically reduce this to the previous theorem, to the Rolls theorem. And here is how. Let's just consider a different function. So what do they do right now? Well, this is a linear function which has this as its slope, right? Which is this. And it's shifted by a from from this one. So I took first line which is parallel to this chord because it has the same slope as the chord, right? And then shifted it to the a by a to the right, which means it's basically the equation which describes my slope, my chord. Now if I subtract from this function the chord what do I have? Well, I have basically the new function which is difference between them, right? Which is this one. And what's good about this function? Well, it takes the same variable sense, right? So let's just make sure that this is true. g of a is equal to f of a minus a minus a which is 0, which is f of a. g of b is equal to f of b minus b minus a, b minus a. So that's reduced and that's what I have which is also f of a. So this function has the same property which we were using in the Rolls theorem. It has the same value on both ends, okay? So let's just use the Rolls theorem. Now what does it mean that we can use the Rolls theorem, which means there is some point x0 where the derivative of this function is equal to 0, right? So let's take derivative of this function. It's derivative of x. Remember derivative of a sum is equal to sum of derivatives or a difference minus this is a polynomial function. This is the coefficient. If you remember you can always take the factor out of the derivative. So the factor is going out times derivative of this. Derivative of x minus a, again derivative of sum is sum of derivatives. So it's basically derivative of x which is 1 because derivative of a is equal to 0, right? So let's forget about this one. And we know that g derivative at point x0 equals to 0. So there is some point x0 where this derivative is equal to 0. Okay? So it means that f derivative at x0 minus fb minus fa divided by b minus a is equal to 0. So which means that this derivative is equal to this ratio. And that's exactly what we what we wanted to prove. So derivative at this point, which is tangent of tangential line is equal to this which is tangent of this angle. So the tangential line is parallel to a chord, which geometrically obvious, but it needs some proof, obviously, and that's the proof. All right, that's it. I do suggest you to read the same thing on the UNISOR.com website. It has also some nice picture. And well, that's it. Good luck. Thank you.