MathematicsGrade 10–11

From secant to tangent

Let a point Q move towards P: the secant becomes the tangent, and the average slope becomes the derivative.

Loading simulation …

What is it about?

The secant is the line through two points of the graph: P(x0∣f(x0))P(x_0 \mid f(x_0)) and Q(x0+h∣f(x0+h))Q(x_0 + h \mid f(x_0 + h)). Its slope is the difference quotient

ms=f(x0+h)−f(x0)h.m_s = \frac{f(x_0 + h) - f(x_0)}{h}.

It describes the average rate of change of ff between x0x_0 and x0+hx_0 + h. In the slope triangle, hh is the horizontal side and Δy=f(x0+h)−f(x0)\Delta y = f(x_0 + h) - f(x_0) the vertical side.

If QQ moves closer and closer to PP (h→0h \to 0), the secant turns into a limiting position: the tangent at PP. Its slope is the derivative of ff at x0x_0 (instantaneous rate of change):

f′(x0)=lim⁡h→0f(x0+h)−f(x0)h.f'(x_0) = \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h}.

Important: you must not plug in h=0h = 0. That would give 00\frac{0}{0}, and you cannot divide by 00. Instead you look at what msm_s approaches as hh gets smaller – from the right (h>0h > 0) and from the left (h<0h < 0).

Example: f(x)=x2f(x) = x^2 (h-method)

ms=(x0+h)2−x02h=2x0h+h2h=2x0+h  →  h→0    2x0m_s = \frac{(x_0 + h)^2 - x_0^2}{h} = \frac{2x_0 h + h^2}{h} = 2x_0 + h \;\xrightarrow{\;h \to 0\;}\; 2x_0

Cancelling hh is allowed as long as h≠0h \neq 0. So f′(x0)=2x0f'(x_0) = 2x_0, e.g. f′(1)=2f'(1) = 2. The tangent at P(1∣1)P(1 \mid 1) has the equation y=2(x−1)+1=2x−1y = 2(x - 1) + 1 = 2x - 1.

When there is no limit: the kink of ∣x∣|x|

For f(x)=∣x∣f(x) = |x| and x0=0x_0 = 0 we get ms=∣h∣hm_s = \frac{|h|}{h}. For every h>0h > 0 this is 11, for every h<0h < 0 it is −1-1. From the right and from the left you get different values. The limit does not exist, and ff is not differentiable at 00. The graph has a kink there, and there is no tangent.

Try it

  1. Drag QQ towards PP or press h → 0. Watch the difference quotient and the table.
  2. Choose a negative hh: then QQ lies to the left of PP. Is the limit the same? Negative h
  3. Set h=0h = 0. What does the simulation show, and why?
  4. Show the tangent and move PP. Where is the tangent horizontal? Cubic function
  5. Switch on Trace the derivative f′ and slowly drag PP from left to right. Which function appears for sin⁡x\sin x? Sine
  6. Choose f(x)=∣x∣f(x) = |x| with x0=0x_0 = 0. Compare the table for positive and for negative hh. Kink of |x|

Exercises

Exercise 1: Difference quotients

For f(x)=x2f(x) = x^2 and x0=1x_0 = 1, compute the difference quotient for h=1h = 1, h=0.5h = 0.5 and h=0.1h = 0.1. Work it out by hand first, then compare with the table. Which value do the results approach?

Show solution
  • h=1h = 1: 4−11=3\frac{4 - 1}{1} = 3
  • h=0.5h = 0.5: 2.25−10.5=2.5\frac{2.25 - 1}{0.5} = 2.5
  • h=0.1h = 0.1: 1.21−10.1=2.1\frac{1.21 - 1}{0.1} = 2.1

In general ms=2+hm_s = 2 + h; the values approach f′(1)=2f'(1) = 2. Show in the simulation

Exercise 2: h-method with negative h

Use the h-method to find the derivative of f(x)=x2f(x) = x^2 at x0=−2x_0 = -2. Also compute msm_s for h=1h = 1 and for h=−1h = -1. What does the sign of f′(−2)f'(-2) mean?

Show solution

ms=2x0+h=−4+hm_s = 2x_0 + h = -4 + h. For h=1h = 1, ms=−3m_s = -3; for h=−1h = -1, ms=−5m_s = -5. From both sides msm_s approaches −4-4, so f′(−2)=−4f'(-2) = -4. The tangent goes down: the graph is decreasing at this point. Show in the simulation

Exercise 3: Horizontal tangents

The graph of f(x)=0.25x3−xf(x) = 0.25x^3 - x has two points with a horizontal tangent. Find them in the simulation and compute them with f′(x)=0.75x2−1f'(x) = 0.75x^2 - 1.

Show solution

0.75x2−1=0⇒x2=43⇒x=±23≈±1.150.75x^2 - 1 = 0 \Rightarrow x^2 = \frac{4}{3} \Rightarrow x = \pm\frac{2}{\sqrt{3}} \approx \pm 1.15. There is a maximum (x≈−1.15x \approx -1.15) and a minimum (x≈1.15x \approx 1.15). At x0=1.15x_0 = 1.15 the simulation shows f′(1.15)≈−0.008f'(1.15) \approx -0.008, because 1.151.15 is only rounded. Show in the simulation

Exercise 4: Derivative of the sine function

For f(x)=sin⁡xf(x) = \sin x, switch on the derivative graph and drag the point PP across the graph. Which well-known function appears?

Show solution

The cosine function: (sin⁡x)′=cos⁡x(\sin x)' = \cos x. For example, the slope at x=0x = 0 is 11, and at the maxima and minima it is 00. Show in the simulation

Exercise 5: Tangent to the exponential function

For f(x)=exf(x) = e^x and x0=0x_0 = 0, use a calculator to compute the difference quotient for h=1h = 1 and h=0.1h = 0.1. Estimate f′(0)f'(0) and give the equation of the tangent at P(0∣1)P(0 \mid 1).

Show solution
  • h=1h = 1: e−11≈1.718\frac{e - 1}{1} \approx 1.718
  • h=0.1h = 0.1: e0.1−10.1≈1.052\frac{e^{0.1} - 1}{0.1} \approx 1.052

The values approach f′(0)=1f'(0) = 1. The tangent is y=x+1y = x + 1. Show in the simulation

Exercise 6: The kink of ∣x∣|x|

For f(x)=∣x∣f(x) = |x| at x0=0x_0 = 0, compute the difference quotient for h=0.1h = 0.1 and for h=−0.1h = -0.1. Does the graph have a tangent at 00?

Show solution

h=0.1h = 0.1: 0.1−00.1=1\frac{0.1 - 0}{0.1} = 1.   h=−0.1\;h = -0.1: 0.1−0−0.1=−1\frac{0.1 - 0}{-0.1} = -1. On the right you always get 11, on the left always −1-1. There is no common limit, so there is no derivative and no tangent at 00. At every other point ∣x∣|x| is differentiable (f′(x)=−1f'(x) = -1 for x<0x < 0, f′(x)=1f'(x) = 1 for x>0x > 0). Show in the simulation

Ideas for the classroom

  • Use: Upper secondary, introduction to calculus (slopes of secants and tangents, average and instantaneous rate of change, derivative function, tangent equation). The h → 0 animation shrinks hh logarithmically, so the approach stays evenly visible.
  • Table: The table shows the difference quotients for h=1; 0.1; 0.01; 0.001h = 1;\ 0.1;\ 0.01;\ 0.001 with the sign of the chosen hh. It is a good way to prepare the idea of a limit numerically. Let the class guess or compute the values by hand first.
  • h = 0: If you set h=0h = 0, the difference quotient is undefined (00\frac{0}{0}); the simulation then shows only the tangent. This is a good moment to discuss the difference between “plugging in h=0h = 0” and “the limit as h→0h \to 0”.
  • Two-sided limit: Compare h>0h > 0 and h<0h < 0 first for x2x^2 (same limit) and then for ∣x∣|x| (different values). This makes it tangible why differentiability needs more than “the graph has no jump”.
  • Common pitfalls:
    • “The tangent touches the graph at only one point” – for the cubic function the tangent often cuts the graph at another point.
    • Secant and tangent get mixed up. In the simulation the secant is a solid line and the tangent is dashed; the legend shows both line styles.
    • When cancelling hh, students forget that this only works for h≠0h \neq 0.