The horizontal distance between the two points is given by [math]h[/math]. Use the slider to change the value of [math]h[/math]. Decreasing the value of [math]h[/math] will bring the two points closer together.[br][br]You will notice as [math]h[/math] decreases and approaches zero, the line between the two points approaches the tangent of the curve at [math]x[/math].[br][br]Therefore we can say that as [math]h\longrightarrow0[/math], the gradient of the secant will approach the gradient of the function at [math]x[/math].
Use the slider to change the value of [math]a[/math], moving the point ([math]a[/math], [math]f\left(a\right)[/math]) on the graph.[br][br]Moving the slider for [math]h[/math], we can see that the the above holds true for any point [math]x[/math].
In the graph below we have a curve [math]f\left(x\right)[/math]. [br]The point A is fixed at [math]x=a[/math], and therefore has a y-coordinate of [math]f\left(a\right)[/math].[br]The point B is at the point where [math]x=a+h[/math], and therefore has a y-coordinate of [math]f\left(a+h\right)[/math].[br][br]The gradient of the secant is therefore given by:[br][math]m_{sec}=\frac{rise}{run}=\frac{y_2-y_1}{x_2-x_1}=\frac{f\left(a+h\right)-f\left(a\right)}{a+h-a}=\frac{f\left(a+h\right)-f\left(a\right)}{h}[/math][br][br]Therefore to generalise for any function [math]f\left(x\right)[/math]:[br]At any [math]x[/math], when [math]a=x[/math], as [math]h\longrightarrow0[/math]:[br][math]m_{tangent}=\lim_{h\to0}\frac{f(x+h)-f(a)}{h}[/math][br][br]Move the point B towards A to see how the line through the secant approaches the tangent and watch how the values change.[br]