If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Local linearity

Sal introduces the idea of approximating curves using their tangent line equations. This is also called "local linearization.". Created by Sal Khan.

Want to join the conversation?

  • blobby green style avatar for user Charles Campbell
    I'm in the same situation as "willwassell". I thank you for the explanation of how to plug values into L(x), but the important thing is that we're not told where the evidently general form L(x) =f(a)+f'(a)(x-a) comes from. First, isn't willwassell is correct in asking whether the f'(a)(x-a) isn't simply a manipulation of the slope formula? I.e., aren't we saying " m=dy/dx and therefore dy=mdx " ? Secondly, even if this is correct, there's STILL the problem of why L(x) = f(a) PLUS this value f'(a)(x-a). The explanation just before is too circular. It assumes we know why L(x) equals this.
    Finally, the glitch in the audio at , about "4.36" vs ".36" comes at too critical a point not to cause real confusion. I'm sorry to be such a dweeb about this, but I really feel the need to know where this formula comes from. Thank you for your patience, and I still really love your program. I really do :)
    (22 votes)
    Default Khan Academy avatar avatar for user
    • orange juice squid orange style avatar for user Madeline
      I was confused about this too; however, it's simply another way to write point-slope form: y - y1 = m (x - x1), where (x1, y1) is a point on the line.
      In L(x) = f(a) + f'(a) (x - a), the point is (a, f(a)) instead of (x1, y1). As you already know, f'(a) represents the slope (m) of the equation at the point where x = a. Therefore:
      y - y1 = m (x - x1)
      is the same as
      f(x) - f(a) = f'(a) (x - a)
      Add f(a) to both sides:
      f(x) = f(a) + f'(a) (x - a)
      And we call f(x) L(x) just to be fancy, I suppose. I hope this is accurate and helps!
      (74 votes)
  • marcimus orange style avatar for user Grace Pfohl
    At , how is Sal using the Power Rule to find the derivative? I don't understand how he got 1/2x^-1/2.
    (28 votes)
    Default Khan Academy avatar avatar for user
  • ohnoes default style avatar for user Cyan Wind
    Can local linearization be used to calculate the value of f(x₁) which is far away from f(x₀)? Say, in this scenario, can I calculate √16 by using L(x)?
    (12 votes)
    Default Khan Academy avatar avatar for user
    • leafers ultimate style avatar for user Angelo Neto
      The answer to your question is yes/no. The farther away you move from your original point, the more precision you lose. It will all depend on how good of an approximation you want. Majority of the time local linearization is only used on points that are close to your original point. I will show you why....

      Let us say f(x)=x^(1/2) and we wanted an estimation of (25.1)^(1/2). Therefore my a=25
      when you work everything out your L(x)= 5 + (1/10)(x-25)
      now we want L(25.1)=5+ (1/10)(25.1-25)=5.01
      The actual answer to five decimal places for (25.1)^(1/2)=5.00999...
      You see how close of an answer we got!!
      Now if we do the same procedure and if we wanted to figure out (37)^(1/2). a=25
      L(x) = 5+(1/10)(x-25)
      L(37)=5+(1/10)(37-25)=6.2
      The actual answer to five decimal places for (37)^(1/2)=6.08276...
      You see that our estimation is not as precise as the last. The farther away you go from "a" the more precision you lose. To fix that choose an "a" that is close to the number you want an estimation. In our case if you let a = 36, L(37)=73/12 which is 6.08333... You see how better our approximation became by choosing a different "a"! Hope this helps
      (28 votes)
  • hopper cool style avatar for user Wilson Cheung
    at , why the formula of the line is f(4)+f'(4)(x-4)?
    (10 votes)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user Phi
      Remember point-slope form from Algebra? It went:
      y-y1 = m(x2-x1)

      (This comes from rearranging the slope formula:
      m = (y2-y1)/(x2-x1) )

      Anyway, if you take the point-slope formula and add y1 to both sides you get:
      y= m(x2-x1) +y1
      Now, the slope of a tangent line at a certain point is the derivative of the function at that point. The point we were looking at was 4, and the function was named f(x), so m was replaced by f'(4). x1 or the x value that we chose was 4. So we replace (x-x1) with (x-4). Finally, y1 is the output of the function at the point x1. x1 was 4, so f(4) would be the output of the function at the x-value 4. Now we have derived the formula used.

      (The slope formula that was shown in parenthesis is derived from rise over run, where the rise is the difference between the y outputs and the run is the difference between the x inputs.
      (21 votes)
  • leaf green style avatar for user Lemuel Taeza
    How does a calculator compute square roots? does it employ the same steps/reasoning as in the video?
    (15 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Ham
      There are a lot of algorithms to approximate these things. A calculator may use any one of them, after looking at the trade offs. Another, very much related way is Newton's method.

      If you look at your calculator's user manual, they might provide the actual functions used. My Casio calculator for example, uses newton's method to solve simple 1=variable equations
      (4 votes)
  • aqualine ultimate style avatar for user ennotagem
    Around , Sal calls this technique local linearization. Just to clarify, is local linearization equivalent to the linear approximation? And is process creating a tangent line to a curve and looking at a specific point? I'm unsure about the definition.
    (9 votes)
    Default Khan Academy avatar avatar for user
    • aqualine seed style avatar for user Nate
      Yes, my AP Calculus teacher also introduced this topic as "Tangent Line Approximation." They all mean the same thing: using the tangent line at a point on the graph to approximate the value of another point very close to the original point.
      (8 votes)
  • aqualine seed style avatar for user Tiger2000
    Would it be possible to use the second derivative to do "local linearization" on the first derivative, THEN use the first derivative to do "local linearization" on the function? Would this make it more accurate? What if you used even higher-order derivatives? Could you ever reach the actual value of the function or would you just get better approximations?
    (6 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user kubleeka
      You've hit on a very powerful concept in calculus and analysis.

      Yes, you can use higher-order derivatives to approximate a function as closely as you like. When you construct the approximation, you end up with a polynomial called a Taylor polynomial. It looks like this:

      Say you want to approximate a function f(x) near a point c. The zeroth term of the polynomial is f(c).

      The first term is f'(c)(x-c).

      Second term is (f''(c)*(x-c)^2)/2!.

      Third is (f'''(c)*(x-c)^3)/3!

      And in general, the nth term is (f^n(c)*(x-c)^n)/n! , where f^n(c) means the nth derivative of f(x), evaluated at c.

      Taylor polynomials are covered in the integral calculus playlist on Khan Academy.
      (12 votes)
  • duskpin ultimate style avatar for user paperangel220
    Could I also do this by finding the slope of the tangent line at x = 4, which is 1/4, then make an equation with the slope (y = 1/4x + 1), and then just plug in 4.39 as the x value to get 2.09?
    (6 votes)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user Parthik Patel
    Starting at about , Sal write the equation for L(x). Where does he get f(4) from? Also, is L(x) just the tangent line to f(x) at x = 4?
    (5 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user robshowsides
      Yes, L(x) is the tangent line to f(x) at x=4. Sal uses f(4) because he is writing the equation of the line tangent to f(x) at the point (4, f(4)) (if the x-value is 4, then the y-value is f(4), right?). You might be more used to always writing y = mx +b, where you put in the slope (which in this case would be f'(4)), and then plug in a point to find b, but Sal's method is faster and easier. Basically, he is using the "point-slope" form instead of the "slope-intercept" form.
      (7 votes)
  • aqualine seedling style avatar for user Afifa Ahmed
    At I didn't really understand why Sal added (x-4) to the equation.
    (7 votes)
    Default Khan Academy avatar avatar for user

Video transcript

Let's say that we're interested in approximating what the square root of 4.36 is equal to. So we want to figure apro, we want to figure out an approximation of this, and we don't have a calculator at hand. Well, one way to think about it is we know what, we know what the square root of 4 is. We know that this is positive 2. The principle root of 4 is positive 2. So, okay, this is going to be a little bit more than two. Well, let's say that we wanna get a little bit more accurate, and so what I'm going to show you in this video is a method for doing that, for approximating the value of a function near, near a value where we already know the value. So what am I talking about? So let's just imagine that we had the function. We have the function f of x is equal to the square root of x, which is, of course, the same thing as x to the one-half power. So we know what f of 2 is. We know, we know that f of 2, I'm sorry, we know that f of 4 is. We know that f of 4 is the square root of 4, which is going to be equal to 2 or the principle root of 4, which is equal to positive 2 and what we want to approximate, we wanna figure out what f of, we wanna figure out what f of 4.36 is equal to. This is just another way of framing the exact same question that we started off this video. So let's just imagine our function. Let's just imagine it for a second. So, let me draw some axes. This is my y-axis. This is my, this is my x-axis, and let's graph y is equal to f of x. So let's say it looks something like this. Y equals f of x looks something like that. That's pretty decent. All right, so that's, that right there is y is equal to f of x, and we know f of 4 is equal to 2. F of 4 is equal to 2, so this is when x is equal to 4. I haven't drawn it really to scale, but hopefully, this is clear enough. So that right over here is going to be 2. That's f of 4. And what we wanna approximate is f of 4.36, so 4.36 might be right around, right around there, and so we want to approximate, we wanna approximate this y value right over here. We want to approximate that. Right over here is f of 4.36, and, once again, we're assuming we don't have a calculator at hand. So, how can we do that using what we know about derivatives? Well, what if we were to figure out an equation for the line that is tangent to the point, to tangent to this point right over here. So the equation of the tangent line at x is equal to 4, and then we use that linearization, that linearization defined to approximate values local to it, and this technique is called local linearization. So what I'm saying is, let's figure out what this, the equation of this line is. Let's call that l of x. And then we can use that to appro, and then we can evaluate that at 4.36, and hopefully that will be a little bit easier to do than to try and figure out this right over here. So how would we do that? Well, one way to think about it, and obviously, there are many ways to express a line, but one way to think about it is, okay, it's going to l of x is going to be f of 4, which is 2. It's going to be f of 4 plus the slope, the slope at, at x equals 4, which is, of course, the derivative f prime of 4, so that's going to be the slope of this line of l of x is f prime of 4. Let me make that clear. So this right over here is the slope. The slope when x is at, at x equals 4, so this is a slope of this entire line, and so any other point on this is gonna be f' of 4 plus the slope times how far you are away from x equals 4. So it's going to be times x minus 4. Let's just, let's just validate that this makes sense. When we put 4.36 here, when we put 4.36 here, actually let me zoom in on this graph just to make things a little bit clearer. So, if this is, so I'm gonna do a zoom in. I'm gonna do a zoom in. I'm gonna try to zoom in into this region right over here. So, this is the point. This is the point (4, f of 4), and we are going to graph l of x. So let me do that. So this right over here is l of x. That's l of x. And let's say this, right over here, this right over here, is the point (4.36, f of 4.36), and the way that we're, we're gonna approximate this value is to figure out what, to figure out, what this value is right over here. And what is this one going to be? This right over here is going to be, this is going to be (4.36, L of 4.36). This line evaluated when x is equal to 4.36, and what is that going to be? What is that going to be equal to? Well, let's see. Let's just evaluate it. L of 4.36 is going to be f of 4. So, it's going to be 2 plus the derivative, so the slope of this line plus f prime of 4 times x minus 4. So, 4.36 minus 4 is going to be times 0.36, and that makes sense. You're starting at 2 and you're saying, okay, my change in x, my change in x is 4.36. So, my change in y is going to be my slope times that change in x to get me that value, to get me that value right over there. So, let's figure out, let's figure out what this, let's figure out what this thing, what this thing actually is. So to do that, we need to figure out f prime of 4, so let's go back up here. I'll try to leave actually, I'll leave this little visualization here. So let's see, f prime, f prime of x is going to be one-half x to the negative one-half just using the power rule over here. So f prime of 4, f prime of 4 is equal to one-half times 4 to the negative one-half, which is, of course, equal to one-half times one-half. 4 to the one-half would be 2. 4 to the negative one-half is going to be one-half. So, this is equal to 1 4th. So L of, we deserve a little bit of a drum roll now, L of 4.36 is equal to f of 4, is equal to f of 4, which is eq, let me just rewrite it. It's f of 4 plus f prime of 4 plus, gee, why am I switching to that color. Let me do the yellow. Plus f prime of 4, times, times, times, 4.36. 4.36. Let me make this actually a new color, just so we see it. So, 4.36, so times 4.36 minus 4, minus 4, and actually let me make all the 4s one color, too, so you see it's the same, so just like that. So what is this going to be? Well, this we already established is positive 2. This we already established, and we do this in a yellow color. This, we already established is 1 4th, and this part right over here is 0.36. So, this is going to be equal to 2 plus 1 4th times 0.36, is 0.9 or is 0.09, so this is going to be equal to, this is going to be equal to 2.09. So that is our approximation and should be at least the way, based on how I graphed it, a little higher than the actual value of the square root of 4.36, but we could write that up here. This is going to be approximately, let me just write it this way. The square root, I'll just write it down here. So we could say the square root of 4.36, which is the same thing as f of 4.36. This is approximately equal to 2.09. Now let's just say we happen to find a calculator, and just out of curiosity let's see how good of an approximation that is. Let's get a calculator out. And so, we wanna do the square root of 4.36, and we get 2.088. So, we actually, if we round to the nearest hundredths, we got a pretty good approximation just like we saw. In this, in this indicative graph right over here, it is, our approximation was indeed a little bit higher than the actual value.