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.

## Differential Calculus (2017 edition)

### Unit 5: Lesson 3

Derivative as instantaneous rate of change

# Estimating derivatives with two consecutive secant lines

Sal approximates the instantaneous rate of change of stores per year in a popular coffee chain. Created by Sal Khan.

## Want to join the conversation?

• Why not (S(2004)-S(2002))/2?
• Given that you are using the same information, but in a different order, you should get the same answer. What you are missing in that order of calculation is what the slopes are on either side of the point of interest, but you do end up with an average slope for the 2-year interval, of which the data for 2003 represents the midpoint.
In other videos and exercises, we compare a wide variety of the secant slopes near a point. Rock on!
• What is a tangent line . I know that secant line intersects a curve but what about tangent?
• A tangent line is a one that touches a curve at one and only one point. A 3d example might be placing a flat ruler on a ball. The ruler will touch the ball at only one single point on the curve, the rest of the ball curves away from the ruler. Ruler in this case is "tangent" to the ball.

Every point on a curve has exactly one tangent line that (locally at least) touches that single point, but none of the other points of the curve.
• I think it is easier to take slope of line from 2002 to 2004 as an average of instantaneous slope of 2003
• Think of it this way. Say you had a graph that looked kind of like a parabola. 2003 is at, say, y=2. 2002 has a value of y=2 as well, but 2004 has a value of y=6. If you took the average slope between 2002 and 2004, you would get something that is so far out from 2003 that it would be completely incorrect. This might be a bad example, but the point is that not all graphs are generally linear like this and it might just do something that you can't get just by taking the average of both sides.
• What if we collected data of the number of stores 2 times/year, one in Jan and one in Oct; and ended up with the data in Jan 2002, Oct 2002, Jan 2003, Oct 2003, Jan 2004 and Oct 2004. Which data should we use to approximate the instantaneous rate of change?
• I believe you would take the weighted average. For instance, to approximate the instantaneous rate of change for January of 2003, you would use the approximations from October of 2002 to January of 2003 and from January to October of 2003. You would then multiply each derivative by a fraction corresponding to how close it is to the value you are approximating. These fractions should add to one. In this case, they would be 9/12 = 3/4 for the left derivative and 3/12 = 1/4 for the right derivative. Adding the weighted derivatives together would give you an approximation for the derivative at January of 2003.

It would be interesting to do this in the abstract, with variables instead of numbers, so we could create a calculus of uneven derivatives on a discrete range (a function that’s defined by a list of coordinates, rather than a continuous function). I’m not sure it’s taught on Khan Academy, or even in the AP materials.
(1 vote)
• What is Secant slopes? Sorry im trying to learn this but im in 8th grade
• In what video does he explain why taking the avg of the slopes of the surrounding secant lines gives us the slope at the middle point? Because I watched his previous videos and I still don't get this concept. I don't know if it's me or if there is another video with the explanation. Thank you.
• A simple answer first, then a more detailed/broad attempt at explaining why it works: in this case, the secant line to the left underestimates the tangent slope; the secant line to the right overestimates the tangent slope. By averaging the two together, we can somewhat negate the error on each side to find a more accurate answer. Mathematically, if `x = tangent slope` and `e = error`, we're finding `[(x+e) + (x-e)] /2 = (2x + e - e)/2 = 2x/2 = x`. (x+e) would be the slope of the secant line that overestimates, (x-e) the secant slope that underestimates; so the average of the secant slopes approximates the actual tangent slope.

Here's the extra: to begin with, the method is based on the fact that the slope of a secant line from `x to (x+h)` approaches the slope of a tangent line at `x` as `h approaches 0`. Let's look at the graph at around . You can see that the points Sal chooses to approximate the slope of the tangent take the form of a secant line from `x to (x+h)` if (x+h) represents the surrounding year (2002 or 2004) and x represents the year of interest (2003). To calculate the slope of the tangent, we assume that both secant lines are good approximations of the slope of the tangent, so we calculate each; then, as a form of error correction, we take the average of the two slopes so that we end up with a line that represents a "blend" of the two secant lines. So that's the mathematical foundation of this.

The average of the two slopes (what I called the "blend") is probably going to be a better approximation most of the time precisely because it uses the average of two data for the slope of the tangent rather than just finding one slope and assuming that particular slope is representative of what is actually going on. It's like trying to determine the average grade on a test; if you just ask one student, he/she may have gotten a 96 or a 32, and while that could be representative, it's less likely to be accurate than if you asked both and took the average of their grades (or asked even more people, for that matter). That's kind of a statistical way of thinking about Sal's process here, but I hope it helps answer your question.
• "it is a function of time" can someone rephrase that please, in a very simple way @
• "A function of time" meaning that as time passes the number of things change.
In this example as the year goes by the number of stores built is increased which can be represented by a function with respect to time. A function being something along the lines of y = x + 1.
• can we calculate the instantaneous rate of change by getting the slope between S(2002) & S(2004) ?
• Correct, we know ( by looking at the graph ) the rate of change is always increasing. We then know that the rate of change for 2003 is definitely more than that of 2002, and definitely less than 2004. What's a good method of finding a value that you know is (reasonably looking) about in the middle of 2 other values? Averaging of course!
• If you found a line of best fit or a least squares regression line for the plotted data, would it be more accurate?
• The best fit (also called linear regression) method only works if the data are linear. If they are not linear, then that is not going to be very accurate. There are other means of doing regression that are not linear, but all such methods are approximations.

So, yes, you could do this kind of problem by linear regression, but ONLY if the data really are linear. If the data are not linear, you might try power regression, exponential regression, or logarithmic regression.