MathMastery.Beta
Learning Resources

Differentiation

Interactive curriculum lessons, worked examples, and geometric problem-solving techniques designed to help Kenyan students master CBC, KPSEA, KCSE, and IGCSE mathematics.

Form 4 Pathway: N/A

First Principles

Objective

Understand the derivative from first principles, master the power rule for differentiating polynomial functions, and apply differentiation to determine gradients, tangents, and turning points.

Kenyan Context: Imagine a matatu accelerating away from the Machakos Country Bus terminal onto Mombasa Road. Its displacement from the stage after \(t\) seconds is recorded along a continuous curve. An average speed calculated over 10 minutes does not tell you whether the driver is exceeding the 80 km/h speed limit at a speed-trap camera at one exact instant. Differentiation is the mathematical tool that provides that instantaneous velocity \(\frac{ds}{dt}\) right at that split second.

Geometric Meaning: Consider a secant line connecting two points \(P(x, f(x))\) and \(Q(x+h, f(x+h))\) on a curve. As the step \(h\) decreases toward zero (\(h \to 0\)), the point \(Q\) slides down the curve toward \(P\). The secant line gradually rotates until it becomes the tangent line that touches the curve at exactly point \(P\). The gradient of this tangent line represents the instantaneous derivative \(f'(x)\).

The Power Rule: By applying the definition \(f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}\) to \(f(x) = x^n\), we obtain the fundamental power rule: bring the exponent down to multiply the coefficient, then reduce the power by 1: \[\frac{d}{dx}\left(a x^n\right) = a \cdot n x^{n-1}\]

Use the interactive widget below to vary \(x_0\) and observe what happens as interval \(h\) shrinks towards 0. Watch the red secant line merge onto the green tangent line!

Key Formulas

\[\mathbf{Definition\;from\;First\;Principles:}\quad f'(x) = \lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]

The limit of the secant gradient as the interval \(h\) approaches zero gives the exact derivative.

\[\mathbf{Power\;Rule:}\quad \frac{d}{dx}\left(a x^n\right) = a \cdot n x^{n-1}\]

Multiply by the existing power \(n\), then subtract \(1\) from the power.

\[\mathbf{Constant\;Rule:}\quad \frac{d}{dx}(c) = 0\quad\text{and}\quad \frac{d}{dx}(a x) = a\]

A constant has no rate of change (gradient = 0). A linear term has a constant gradient \(a\).

\[\mathbf{Sum/Difference\;Rule:}\quad \frac{d}{dx}\left(f(x) \pm g(x)\right) = f'(x) \pm g'(x)\]

Differentiate each term independently.

\[\mathbf{Stationary\;/\;Turning\;Points:}\quad \frac{dy}{dx} = 0\]

Points where the tangent line is perfectly horizontal.

  • Local Maximum: \(\frac{d^2y}{dx^2} < 0\) (gradient changes from positive to negative).
  • Local Minimum: \(\frac{d^2y}{dx^2} > 0\) (gradient changes from negative to positive).
\[\mathbf{Kinematics\;Relations:}\quad v = \frac{ds}{dt},\quad a = \frac{dv}{dt} = \frac{d^2s}{dt^2}\]

Velocity \(v\) is the rate of change of displacement \(s\); acceleration \(a\) is the rate of change of velocity.

Worked Examples

Example 1: Gradient of a Quadratic Curve (Easy)

Find the gradient of the curve \(y = 3x^2 - 5x + 2\) at the point where \(x = 4\).

  1. Differentiate term-by-term:
    \[\frac{dy}{dx} = 3(2x^{2-1}) - 5(1x^{1-1}) + 0 = 6x - 5\]
  2. Substitute \(x = 4\) into the derivative expression:
    \[\text{Gradient } m = 6(4) - 5 = 24 - 5 = 19\]

Answer: \(19\)

Example 2: Stationary Points and Curve Characteristics (Medium)

Find the coordinates of the turning points on the cubic curve \(y = 2x^3 - 3x^2 - 12x + 5\), and determine their nature.

  1. Differentiate the function:
    \[\frac{dy}{dx} = 6x^2 - 6x - 12\]
  2. Set \(\frac{dy}{dx} = 0\) for stationary points:
    \[6x^2 - 6x - 12 = 0 \implies x^2 - x - 2 = 0\]
    \[(x - 2)(x + 1) = 0 \implies x = 2 \quad \text{or} \quad x = -1\]
  3. Find corresponding \(y\)-values:
    When \(x = 2\): \(y = 2(8) - 3(4) - 12(2) + 5 = 16 - 12 - 24 + 5 = -15\). Point: \((2, -15)\).
    When \(x = -1\): \(y = 2(-1) - 3(1) - 12(-1) + 5 = -2 - 3 + 12 + 5 = 12\). Point: \((-1, 12)\).
  4. Determine nature using the second derivative:
    \[\frac{d^2y}{dx^2} = 12x - 6\]
    At \(x = -1\): \(\frac{d^2y}{dx^2} = 12(-1) - 6 = -18 < 0 \implies\) Local Maximum at \((-1, 12)\).
    At \(x = 2\): \(\frac{d^2y}{dx^2} = 12(2) - 6 = 18 > 0 \implies\) Local Minimum at \((2, -15)\).

Example 3: Optimization / Real-World Modeling (Hard)

A tea farmer in Kericho has \(120\text{ m}\) of wire mesh to fence off a rectangular nursery divided into two equal compartments by an interior fence parallel to the width \(w\). Find the maximum possible total area of the nursery in square metres.

  1. Formulate the constraint equation:
    The perimeter with the internal divider requires \(2\) lengths \(L\) and \(3\) widths \(w\):
    \[2L + 3w = 120 \implies 2L = 120 - 3w \implies L = 60 - 1.5w\]
  2. Express total area \(A\) as a single-variable function:
    \[A = L \cdot w = (60 - 1.5w)w = 60w - 1.5w^2\]
  3. Differentiate and find stationary point:
    \[\frac{dA}{dw} = 60 - 3w\]
    For maximum area, set \(\frac{dA}{dw} = 0\):
    \[60 - 3w = 0 \implies 3w = 60 \implies w = 20\text{ m}\]
  4. Check second derivative:
    \[\frac{d^2A}{dw^2} = -3 < 0 \quad (\text{Confirms maximum})\]
  5. Compute the maximum area:
    \[A_{\max} = 60(20) - 1.5(20^2) = 1200 - 1.5(400) = 1200 - 600 = 600\text{ m}^2\]

Answer: \(600\text{ m}^2\)

Common Mistakes

Misconception 1: Differentiating a constant into the same constant.

Incorrect: Differentiating \(y = 5x^3 + 8\) to get \(\frac{dy}{dx} = 15x^2 + 8\).
Correction: The derivative of any constant \(c\) is \(0\). Thus, \(\frac{dy}{dx} = 15x^2\).

Why it feels right Students feel like all terms present in the original expression must survive in some form. But a constant does not change when \(x\) changes, so its rate of change is strictly zero.

Misconception 2 Forgetting to subtract 1 from the power.

Incorrect: Writing \(\frac{d}{dx}(x^4) = 4x^4\) or \(\frac{d}{dx}(x) = 1x = x\).
Correction: You must always reduce the power by 1: \(\frac{d}{dx}(x^4) = 4x^3\) and \(\frac{d}{dx}(x^1) = 1x^0 = 1\).

Misconception 3 Confusing stationary points with the \(x\)-intercepts.

Incorrect: Solving \(y = 0\) to locate turning points.
Correction: \(y = 0\) gives where the graph crosses the \(x\)-axis (roots/intercepts). Turning points occur where the tangent is horizontal, which is found strictly by solving \(\frac{dy}{dx} = 0\).

Real World

Traffic Police & Speed Enforcement: When a matatu travels between Nakuru and Nairobi, radar speed guns measure the instantaneous derivative of displacement with respect to time, \(v = \frac{ds}{dt}\). An average speed of 60 km/h over the journey does not prevent a speeding citation if \(\frac{ds}{dt} > 80\text{ km/h}\) at a speed trap.
Civil Engineering on the SGR & Highways: Road gradients on escarpments (such as the Great Rift Valley escarpment on the Nairobi-Naivasha highway) are calculated as tangents along the vertical alignment profile curve. Engineers set turning points (\(\frac{dy}{dx}=0\)) to safely design hill crests and drainage sags.
Agricultural Crop Yield Optimization: Agronomists in Uasin Gishu model maize harvest yield \(Y(f)\) in bags per hectare as a function of fertilizer quantity \(f\) in kg/ha using parabolic models. Maximizing harvest occurs when \(\frac{dY}{df} = 0\).

Practice

Given the quadratic curve \(y = 3x^2 - 5x + 2\), calculate the gradient \(\frac{dy}{dx}\) of the curve at \(x = 4\). (Type only the number, e.g., 42)
Review the concepts above.
A logistics firm in Nairobi models the daily fuel operating cost \(C(x)\) in shillings by the formula \(C(x) = 0.5x^2 - 20x + 500\), where \(x\) is the number of deliveries made. Find the number of deliveries \(x\) that minimizes the operating cost. (Type only the number, e.g., 42)
Review the concepts above.
Expand and differentiate the function \(y = (2x + 1)(x^2 - 3)\). Find the gradient of the curve at \(x = 2\). (Type only the number, e.g., 42)
Review the concepts above.
A matatu's total fare collection revenue in shillings over a distance of \(x\) km is modeled by \(F(x) = 3x^2(x + 4)\). Determine the rate of change of revenue with respect to distance when \(x = 2\) km. (Type only the number, e.g., 42)
Review the concepts above.
The displacement \(s\) in metres of a toy car moving along a straight track after \(t\) seconds is given by \(s(t) = t^3 - 6t^2 + 9t + 5\). Find the displacement \(s\) in metres when the car reaches its second stationary point (i.e. at the larger time \(t\) where velocity \(v = 0\)). (Type only the number, e.g., 42)
Review the concepts above.
A farmer has \(120\text{ m}\) of fencing to construct a rectangular sheep pen with an internal dividing fence parallel to its width \(w\), so that total perimeter wire used is \(2L + 3w = 120\). Find the maximum possible total enclosed area in square metres. (Type only the number, e.g., 42)
Review the concepts above.