Math Applets

Secant Tangent and Derivative at a point

Derivative at a point:

Let DRD \subseteq \mathbb{R} and f:DRf : D \to \mathbb{R}. The function ff is called differentiable in x0Dx_0 \in D, if x0x_0 is an accumulation point of DD and if the limit f(x0):=limxx0f(x)f(x0)xx0f'(x_0) := \lim_{x \to x_0} \frac{f(x) - f(x_0)}{x - x_0} exists. In this case, f(x0)f'(x_0) is called the derivative of ff in x0x_0.


How to use the applet

  • Drag the green point (a,f(a))(a,f(a)) along the curve to choose the base point aa.
  • Move the slider hh to choose a second point B=(a+h,f(a+h))B=(a+h,f(a+h)).
  • The red line is the secant through (a,f(a))(a,f(a)) and (a+h,f(a+h))(a+h,f(a+h)). Its slope is
f(a+h)f(a)(a+h)a=f(a+h)f(a)h. \frac{f(a+h)-f(a)}{(a+h)-a}=\frac{f(a+h)-f(a)}{h}.
  • The orange arrows highlight the horizontal change hh and the vertical change Δf=f(a+h)f(a)\Delta f=f(a+h)-f(a).
  • When hh is very small, the applet switches to the purple tangent line at (a,f(a))(a,f(a)), whose slope equals the derivative f(a)f'(a).
  • As h0h\to 0, the secant slope approaches the tangent slope:
limh0f(a+h)f(a)h=f(a). \lim_{h\to 0}\frac{f(a+h)-f(a)}{h}=f'(a).
  • For the example f(x)=x2f(x)=x^2, the applet displays f(a)=2af'(a)=2a. Try moving aa and check how the tangent steepness changes.

Loading graph…
  • Hold Shift + scroll to zoom
  • Hold Shift + drag to move
  • Points shaped like <> act as sliders

Description

Link to code.

Reference: Lecture Notes Calculus 1 ( May22,2022 ) Figure 6.1 page 91, Figure 6.2 and Definition 6.1

The example is an geometric interpretation of the derivative, specifically showing the connetcion between the slope of the secant between two points and the slope of the tangent at a point. Here a link where i took inspiration from.

The slope of the secant is given by:

    () => `Secant: slope = ${((pointB.Y() - pointA.Y()) / (pointB.X() - pointA.X())).toFixed(3)}`

Meaning:

f(a+h)f(a)(a+h)a=f(a+h)f(a)h\frac{ f(a+h) - f (a)}{(a+h) - a} = \frac{ f(a+h) - f (a)}{h}

Where pointB = (a+h, f(a+h)), and the value h is controlled by a slider.

When h approaches zero (the slider sets a minimum value of 0.001), the secant slope corresponds to the slope of the tangent at pointA, showing that the tangent line is the best approximation of a derivative at a point.

The tangent is calculated using the derivative of f since:

limh0f(a+h)f(a)h=f(a)\lim_{h \to 0} \frac{ f(a+h) - f (a)}{h} = f'(a)