Discord

INAIO Guide Stage 1 5Calculus and Optimisation

5.1 Basic differentiation

See why a curve needs a local slope, then use differentiation to find its instantaneous rate of change.

A straight line has one slope: each equal step to the right changes its height by the same amount. A curve does not. Its steepness can change as we move along it, so one slope for the whole graph cannot tell us what is happening at a particular point. Differentiation finds that local slope. It answers questions such as how fast an object is moving now, how a small change in production affects cost, and where a graph changes direction. Those local changes are also the starting point for optimization.

This is intermediate mathematics. Review the slopes of linear and quadratic functions and be comfortable with powers and algebra first. OpenStax's derivative introduction explains secant and tangent slopes; its differentiation rules give calculation practice.

A basic idea: from an average slope to a local slope

Slope means vertical change divided by horizontal change, often called rise over run. For a curve, choose two points and draw the line through them. This secant line measures the curve's average slope between those points. For f(x)=x2f(x)=x^2, the graph goes from (2,4)(2,4) to (3,9)(3,9): the rise is 9−4=59-4=5, the run is 3−2=13-2=1, and the average slope is 55.

To find the slope at x=2x=2, bring the second point closer. From 22 to 2.12.1, the average slope is (4.41−4)/0.1=4.1(4.41-4)/0.1=4.1. From 22 to 2.012.01, it is (4.0401−4)/0.01=4.01(4.0401-4)/0.01=4.01. The slopes approach 44. The secant line approaches the tangent line, which follows the curve's direction at (2,4)(2,4); its slope there is 44.

The algebra shows why. Write the second input as 2+h2+h, where hh is a nonzero horizontal step:

f(2+h)−f(2)h=(2+h)2−4h=4+h(h≠0).\frac{f(2+h)-f(2)}{h} =\frac{(2+h)^2-4}{h} =4+h\qquad(h\ne0).

We do not divide by zero. We look at what 4+h4+h approaches as the step hh approaches zero: 44, whether the second point comes from the left or the right. This is the derivative at x=2x=2, written f′(2)=4f'(2)=4. At a sharp corner, slopes approaching from the two sides can disagree, so there may be no derivative. Repeating the calculation at a general input xx gives (f(x+h)−f(x))/h=2x+h(f(x+h)-f(x))/h=2x+h, so f′(x)=2xf'(x)=2x. At x=3x=3, the curve is steeper: its tangent slope is 66.

The derivative is useful for small-change estimates too. Near x=2x=2, a step of 0.10.1 raises ff by about f′(2)(0.1)=0.4f'(2)(0.1)=0.4. The actual rise is 4.41−4=0.414.41-4=0.41; the tangent gives a close local estimate, not the exact change over a whole interval.

On the curve y equals x squared, the secant from (2,4) to (3,9) has rise 5 and run 1, giving slope 5. The tangent at (2,4) has local slope 4.On the curve y equals x squared, the secant from (2,4) to (3,9) has rise 5 and run 1, giving slope 5. The tangent at (2,4) has local slope 4.
The secant measures average change; the tangent shows the limiting slope at one point.

A quick tour of rules

The definition is f′(x)=lim⁡h→0[f(x+h)−f(x)]/hf'(x)=\lim_{h\to0}[f(x+h)-f(x)]/h when that limit exists. You usually calculate with rules instead of repeating the limit:

Function Derivative Small example
Constant cc 00 (7)′=0(7)'=0
xnx^n nxn−1nx^{n-1} (x3)′=3x2(x^3)'=3x^2
cf+gcf+g cf′+g′cf'+g' (4x2+x)′=8x+1(4x^2+x)'=8x+1
Product fgfg f′g+fg′f'g+fg' (x⋅x2)′=x2+2x2(x\cdot x^2)'=x^2+2x^2
Quotient f/gf/g (f′g−fg′)/g2(f'g-fg')/g^2 Only where g≠0g\ne0
Composition f(g(x))f(g(x)) f′(g(x))g′(x)f'(g(x))g'(x) ((x+1)2)′=2(x+1)((x+1)^2)'=2(x+1)

The last line is the chain rule: differentiate the outside, then multiply by the inside's derivative. The product rule is not just f′g′f'g', and the quotient rule is not f′/g′f'/g'. Check by expanding a simple expression when possible.

A positive derivative means the graph is rising locally, and a negative one means it is falling locally. A zero derivative marks a flat tangent, but it need not be a maximum or minimum: x3x^3 has derivative 00 at 00 and keeps rising. A sharp corner such as ∣x∣|x| has no derivative at its corner. If the input is time and the output is metres, the derivative has units metres per unit of time.

Application 1: speed at an instant

A position model is s(t)=t2+2ts(t)=t^2+2t metres for t≥0t\ge0 seconds. What is the instantaneous speed at t=3t=3?

  1. Differentiate. s′(t)=2t+2s'(t)=2t+2 metres per second.
  2. Evaluate. s′(3)=8s'(3)=8 metres per second.
  3. Compare with an interval. From 33 to 44 seconds, position changes from s(3)=15s(3)=15 to s(4)=24s(4)=24 metres, an average of 99 metres per second. The instant at 33 is slower because this model's speed is increasing.

Application 2: cost near ten units

A simplified cost model is C(q)=100+5q+0.1q2C(q)=100+5q+0.1q^2 units for quantity q≥0q\ge0. Estimate the extra cost of one more unit near q=10q=10.

  1. Differentiate. C′(q)=5+0.2qC'(q)=5+0.2q cost units per item.
  2. Evaluate the local rate. C′(10)=7C'(10)=7, so a small increase near 1010 costs about 77 units per item.
  3. Check a whole-item step. C(11)−C(10)=7.1C(11)-C(10)=7.1 units. The derivative gives a local approximation; the exact one-item change is slightly larger because the curve rises.

Resources

SourceTitleWhy read it
OpenStaxDefining the derivativeStart with secant and tangent slopes.
OpenStaxDifferentiation rulesPractise the constant, power, sum, product, and quotient rules.

Finished this module? Mark it done.

Comments

Stuck on something, spotted a mistake, or found a resource that helped you? Tell us below.

Loading comments