Differential Calculus us concerned with finding out how fast a function's value is changing as [math]x[/math] changes. We call this the Rate of Change of the function. For linear functions, this is the slope of the line. For non-linear (curved) functions, we can find the Rate of Change in two forms. We can calculate the slope of the line passing through two distinct points on the curve, called a secant line. The slope of the secant line is called the [b]Average Rate of Change[/b] (AROC). We can also find the slope of the line tangent to the function at a single point, which turns out to be equal to the function's [b]Instantaneous Rate of Change [/b](IROC) at that point. The slope of the tangent line can be found as the limit of the slope of the secant line, as the distance between the two points on the secant line goes to zero.
At the start of the app, we see our function [math]f[/math] in [color=#0000ff]blue[/color]. If we check the "Point P" box, the point [color=#ff0000][b]P[/b][/color] appears (red), which is the point at which we want the IROC. Check the "Tangent Line" box to see the [color=#ff0000][b]tangent line to f[/b][/color] at P. Notice how the tangent line's slope matches the direction of [color=#0000ff][math]f[/math][/color] at the point of tangency. This is the slope we want to find. The [math]x[/math]-coordinate of [color=#ff0000][b]P[/b][/color] will be called [color=#ff0000][b][math]c[/math][/b][/color], so that the y-coordinate is [math]y=f(c)[/math].[br][br]If we now check the "Point Q" box, a second point [b][color=#9900ff]Q[/color][/b] appears. We think of [b][color=#9900ff]Q[/color][/b]'s [math]x[/math]-coordinate being [math]\Delta x[/math] units away from [math]c[/math]. So [b][color=#9900ff]Q[/color][/b]'s [math]x[/math]-coordinate is [math]x+\Delta x[/math], and therefore [color=#9900ff][b]Q[/b][/color]'s y-coordinate is [math]f(c+\Delta x)[/math].[br][br]Checking the "Secant Line" box shows the [b][color=#274e13]secant line[/color][/b] through both [color=#ff0000][b]P[/b][/color] and [b][color=#9900ff]Q[/color][/b]. The slope of this line is the AROC of [math]f[/math] on the interval [math][c,c+\Delta x][/math].[br][br]As we slide [b][color=#9900ff]Q[/color][/b] closer and closer to [b][color=#ff0000]P[/color][/b], notice how the slope of the [b][color=#274e13]secant line[/color][/b] becomes closer and closer to the slope of the [b][color=#ff0000]tangent line[/color][/b]. We can easily calculate the [b][color=#274e13]secant line[/color][/b] slope as "rise over run", or [math]\frac{\Delta y}{\Delta x}[/math]. [math]\Delta y[/math] is the difference between the [math]y[/math]-coordinates of [b][color=#ff0000]P[/color][/b] and [b][color=#9900ff]Q[/color][/b], and is calculated as [math]f(c+\Delta x)-f(c)[/math]. Thus, the [b][color=#274e13]secant line[/color][/b]'s slope is calculated as [math]\frac{f\left(c+\Delta x\right)-f\left(c\right)}{\Delta x}[/math].[br][br]We have seen that moving [b][color=#9900ff]Q[/color][/b] closer to [b][color=#ff0000]P[/color][/b] makes the [color=#274e13]secant line[/color]'s slope closer to the [b][color=#ff0000]tangent line[/color][/b]'s slope. The distance between [color=#ff0000][b]P[/b][/color] and [b][color=#9900ff]Q[/color][/b] can be anything [b][u][i]EXCEPT[/i][/u][/b] zero. If [color=#ff0000][b]P[/b][/color] and [b][color=#9900ff]Q[/color][/b] are the same point, then[math]\Delta x=0[/math] and [math]\Delta y=0[/math], and the [b][color=#274e13]secant line[/color][/b]'s slope is suddenly undefined.[br][br]In essence, the graph of the difference quotient [math]\frac{f\left(c+\Delta x\right)-f\left(c\right)}{\Delta x}[/math] is a continuous, well-behaved function everywhere [u][i]except [/i][/u]for a "hole" where [math]\Delta x=0[/math]. We know that we can determine what the value of the quotient "should be" in such a case, by [u][i]taking the limit of the difference quotient as [math]\Delta x[/math] approaches zero[/i][/u].[br][br]This limit of the difference quotient is called the function's [b][u][i]derivative[/i][/u][/b], [math]f'\left(c\right)[/math], and gives the IROC of [math]f[/math] at [math]x=c[/math]:[br][br][center][math]{f}'(c)=\lim_{\Delta x\to 0} \frac{f(c+\Delta x)-f(c)}{\Delta x} [/math][/center]