MATH-100 · Lesson 2 of 5 · 50 min
The derivative
The derivative is the most useful single idea in engineering mathematics. It measures how fast one quantity changes in response to another: how quickly a beam deflects as load increases, how fast a motor accelerates, how rapidly the temperature of a reactor climbs. Velocity, acceleration, current, power, strain rate and heat flux are all derivatives.
In Lesson 1 you learned what a limit is. In this lesson you will use limits to define the derivative precisely, compute derivatives directly from the definition, interpret them as slopes and as rates, write equations of tangent lines, and see when a derivative fails to exist. Lesson 3 then gives you shortcut rules so you rarely need the definition in practice. Understanding where the rules come from will make you far better at using them.
From average rate to instantaneous rate
Start with something you already know. If a quantity changes from \(f(a)\) to \(f(b)\) as the input goes from \(a\) to \(b\), its average rate of change is:
If \(f\) is position in meters and \(x\) is time in seconds, this is average velocity in m/s. If \(f\) is the volume in a tank and \(x\) is time, it is the average fill rate.
Averages hide detail. A car that averages 60 km/h over an hour may have been stopped at lights and briefly doing 90. What we often need is the rate at one instant. The trick is to compute the average over shorter and shorter intervals and see what value they approach.
Worked problem
Speed of a falling object at one instant
A tool dropped from a platform falls \(s(t) = 4.9t^2\) meters in \(t\) seconds. Estimate its speed at exactly \(t = 2\) s using average speeds over shrinking intervals, then find the exact value.
Show solution
- Average speed from \(t = 2\) to \(t = 2 + h\):
- \[\frac{4.9(2 + h)^2 - 4.9(2)^2}{h} = \frac{4.9(4h + h^2)}{h} = 19.6 + 4.9h\]
- With \(h = 1\): 24.5 m/s. With \(h = 0.1\): 20.09 m/s. With \(h = 0.01\): 19.649 m/s. With \(h = 0.001\): 19.6049 m/s.
- As \(h \to 0\), the average speed \(19.6 + 4.9h \to 19.6\).
Answer: 19.6 m/s at t = 2 s
That limiting value is the instantaneous rate of change: the derivative.
Secant lines become tangent lines
The average rate of change has a picture. On the graph of \(f\), it is the slope of the secant line through \((a, f(a))\) and \((a + h, f(a + h))\). As \(h\) shrinks, the second point slides along the curve toward the first, and the secant line pivots toward a limiting position: the tangent line.
So the derivative has two equivalent meanings, and it helps to keep both in mind:
- Geometrically, it is the slope of the tangent line to the graph.
- Physically, it is the instantaneous rate of change of the output with respect to the input.
The definition of the derivative
The derivative of \(f\) at \(x = a\) is
provided the limit exists. An equivalent form, useful for some problems, lets \(x\) approach \(a\):
Notice that substituting \(h = 0\) always gives \(0/0\). Every derivative is an indeterminate-form limit, which is why Lesson 1 spent so much time on them. The algebra techniques from that lesson (expand and cancel, rationalize, combine fractions) are exactly what you need here.
Worked problem
Derivative of x² from the definition
Find the derivative of \(f(x) = x^2\) at any point \(x\).
Show solution
- Write the difference quotient and expand:
- \[\frac{(x+h)^2 - x^2}{h} = \frac{x^2 + 2xh + h^2 - x^2}{h} = \frac{2xh + h^2}{h} = 2x + h\]
- Take the limit as \(h \to 0\): \(2x + h \to 2x\).
Answer: f'(x) = 2x. At x = 1 this gives a slope of 2, matching the figure above
Worked problem
Derivative of 1/x
Find the derivative of \(f(x) = \dfrac{1}{x}\).
Show solution
- Difference quotient with a common denominator on top:
- \[\frac{\frac{1}{x+h} - \frac{1}{x}}{h} = \frac{x - (x + h)}{h\,x(x + h)} = \frac{-h}{h\,x(x+h)} = \frac{-1}{x(x+h)}\]
- Take the limit: \(\dfrac{-1}{x \cdot x} = -\dfrac{1}{x^2}\).
Answer: f'(x) = −1/x². At x = 2 this is −1/4, the value you found in Lesson 1
Worked problem
Derivative of √x
Find the derivative of \(f(x) = \sqrt{x}\) for \(x > 0\).
Show solution
- Rationalize the difference quotient using the conjugate:
- \[\frac{\sqrt{x+h} - \sqrt{x}}{h} \cdot \frac{\sqrt{x+h} + \sqrt{x}}{\sqrt{x+h} + \sqrt{x}} = \frac{(x + h) - x}{h(\sqrt{x+h} + \sqrt{x})} = \frac{1}{\sqrt{x+h} + \sqrt{x}}\]
- Take the limit: \(\dfrac{1}{\sqrt{x} + \sqrt{x}} = \dfrac{1}{2\sqrt{x}}\).
Answer: f'(x) = 1/(2√x)
These three results are all special cases of the power rule you will meet in Lesson 3: \(\dfrac{d}{dx}x^n = nx^{n-1}\), with \(n = 2\), \(n = -1\) and \(n = \tfrac12\).
Notation and units
Several notations are in common use, and you need to read all of them:
- Prime notation: \(f'(x)\), or \(y'\) when \(y = f(x)\).
- Leibniz notation: \(\dfrac{dy}{dx}\) or \(\dfrac{d}{dx}f(x)\). It reminds you that the derivative is a limit of \(\Delta y / \Delta x\).
- Dot notation: \(\dot{x}\) means \(dx/dt\), a derivative with respect to time. It is standard in dynamics and control.
Leibniz notation makes units obvious. The units of \(dy/dx\) are the units of \(y\) divided by the units of \(x\).
- Position (m) with respect to time (s): velocity in m/s.
- Velocity (m/s) with respect to time: acceleration in m/s².
- Charge (C) with respect to time: current in C/s, which is amperes.
- Energy (J) with respect to time: power in J/s, which is watts.
- Volume (m³) with respect to time: flow rate in m³/s.
The tangent line and linear approximation
Once you know the slope \(f'(a)\) and the point \((a, f(a))\), the tangent line follows from the point-slope form of a line:
Worked problem
Equation of a tangent line
Find the tangent line to \(y = x^3\) at \(x = 1\). (Its derivative is \(3x^2\); you will prove this in the practice problems.)
Show solution
- Point: \(f(1) = 1\). Slope: \(f'(1) = 3(1)^2 = 3\).
- Tangent line: \(y = 1 + 3(x - 1)\), which simplifies to \(y = 3x - 2\).
Answer: y = 3x − 2
Close to the point of tangency, the tangent line and the curve are nearly identical. That makes the tangent line a cheap, accurate approximation, called the linear approximation or linearization:
Worked problem
Estimating a square root
Use the tangent line to \(f(x) = \sqrt{x}\) at \(x = 4\) to estimate \(\sqrt{4.1}\).
Show solution
- \(f(4) = 2\) and \(f'(4) = \dfrac{1}{2\sqrt{4}} = \dfrac14\).
- \(\sqrt{4.1} \approx 2 + \tfrac14(0.1) = 2.025\).
- The true value is 2.02485…, so the estimate is off by about 0.00015.
Answer: ≈ 2.025
Linearization is everywhere in engineering. Control engineers linearize nonlinear systems around an operating point so they can use linear design methods. Structural engineers use small-deflection theory, which is a linearization. The small-angle approximation \(\sin\theta \approx \theta\) is the linearization of sine at 0.
The derivative as a function
If you compute \(f'(x)\) at every point where it exists, you get a new function, \(f'\). Its graph tells you about the shape of the graph of \(f\):
- Where \(f'(x) > 0\), the tangent slopes upward, so \(f\) is increasing.
- Where \(f'(x) < 0\), \(f\) is decreasing.
- Where \(f'(x) = 0\), the tangent is horizontal. This often marks a peak or a valley.
Reading the graph of \(f'\) from the graph of \(f\), and the other way round, is a skill worth practicing. Look at where \(f\) is flat (\(f' = 0\)), where it climbs steeply (\(f'\) large and positive) and where it falls (\(f'\) negative).
Lesson 4 turns this into a systematic method for finding maximum and minimum values, which is the basis of optimization.
When a derivative does not exist
A function is differentiable at \(a\) when \(f'(a)\) exists. Differentiability is a stronger condition than continuity:
- If \(f\) is differentiable at \(a\), then \(f\) is continuous at \(a\).
- The reverse is false. A function can be continuous at a point and still have no derivative there.
There are four common ways for a derivative to fail to exist:
- A corner: the slopes from the left and right differ. For \(|x|\) at 0, the left slope is −1 and the right slope is +1.
- A cusp: the slopes from each side become infinite in opposite directions, as with \(x^{2/3}\) at 0.
- A vertical tangent: the slope becomes infinite, as with \(x^{1/3}\) at 0.
- A discontinuity: if the function jumps or has a hole, there is no tangent line at all.
Worked problem
Testing a corner
Show that \(f(x) = |x|\) has no derivative at \(x = 0\).
Show solution
- The difference quotient at 0 is \(\dfrac{|0 + h| - |0|}{h} = \dfrac{|h|}{h}\).
- For \(h > 0\), \(|h|/h = 1\). For \(h < 0\), \(|h|/h = -1\).
- The one-sided limits are 1 and −1. They differ, so the limit (and the derivative) does not exist.
Answer: No derivative at 0: the graph has a corner
Corners appear in real engineering models wherever behavior switches abruptly: a cable going slack, a contact closing, a material yielding. Models with corners need extra care in analysis and simulation.
Higher derivatives
The derivative of a derivative is the second derivative, written \(f''(x)\), \(\dfrac{d^2y}{dx^2}\) or \(\ddot{x}\) for time derivatives. You can keep going to third and higher derivatives.
In motion, if \(s(t)\) is position, then \(v = \dot{s}\) is velocity, \(a = \dot{v} = \ddot{s}\) is acceleration, and the derivative of acceleration is jerk. Elevator and rail designers limit jerk because sudden changes in acceleration feel uncomfortable.
The second derivative also describes curvature. Where \(f''(x) > 0\), the slope is increasing and the graph bends upward (concave up, like a cup). Where \(f''(x) < 0\), it bends downward (concave down, like a cap).
Worked problem
Motion of a slider
A slider on a guide rail has position \(s(t) = t^3 - 6t^2 + 9t\) meters. Find its velocity and acceleration, and describe its motion for \(0 \le t \le 4\) s.
Show solution
- Velocity: \(v(t) = 3t^2 - 12t + 9 = 3(t - 1)(t - 3)\) m/s.
- Acceleration: \(a(t) = 6t - 12\) m/s².
- The velocity is zero at \(t = 1\) and \(t = 3\). It is positive before 1 s, negative between 1 and 3 s, and positive after 3 s.
- So the slider moves forward, stops at 1 s (position 4 m), moves backward, stops at 3 s (position 0 m), then moves forward again.
- Acceleration is zero at \(t = 2\) s, where the slider is moving backward at its fastest: \(v(2) = -3\) m/s.
Answer: v = 3t² − 12t + 9, a = 6t − 12; it reverses direction at 1 s and 3 s
Higher derivatives appear throughout structural engineering. For a beam with deflection \(y(x)\), the slope of the beam is \(y'\), the bending moment is proportional to \(y''\), the shear force to \(y'''\), and the distributed load to \(y''''\) (with signs depending on the convention used). This is the Euler–Bernoulli beam equation, \(EI\,y'''' = w(x)\), which you will meet in Mechanics of Solids.
Worked problem
Current from charge
The charge that has flowed past a point in a wire is \(q(t) = 0.002t^2\) coulombs. Find the current at \(t = 5\) s.
Show solution
- Current is the rate of flow of charge: \(i = dq/dt = 0.004t\) A.
- At \(t = 5\): \(i = 0.02\) A.
Answer: 0.02 A, or 20 mA
Estimating derivatives from data
In practice, engineers often have measurements rather than formulas: a temperature logged every ten seconds, a displacement sensor read at 1 kHz, a survey of a road profile every 20 meters. The definition of the derivative still tells you what to do. Replace the limit with a small but finite step \(h\), the spacing of your data.
Three finite-difference formulas are in everyday use:
The forward and backward formulas are simply the difference quotient with \(h\) fixed. The central difference averages them, using one point on each side. It is usually far more accurate, because the errors of the forward and backward versions largely cancel.
Worked problem
How accurate are finite differences?
Estimate the derivative of \(\sin x\) at \(x = 1\) with \(h = 0.1\), using forward and central differences. Compare with the exact value \(\cos 1\).
Show solution
- Forward: \(\dfrac{\sin 1.1 - \sin 1}{0.1} \approx 0.4974\).
- Central: \(\dfrac{\sin 1.1 - \sin 0.9}{0.2} \approx 0.5394\).
- Exact: \(\cos 1 \approx 0.5403\). The forward estimate is off by about 0.043; the central estimate by about 0.0009, nearly fifty times better.
Answer: Use central differences whenever you have data on both sides of the point
Worked problem
Heating rate from a temperature log
A thermocouple on a curing concrete slab logs these temperatures: 20.0 °C at 0 min, 31.5 °C at 10 min, 40.2 °C at 20 min, 46.9 °C at 30 min and 51.8 °C at 40 min. Estimate the heating rate at 20 min.
Show solution
- Forward: \((46.9 - 40.2)/10 = 0.67\) °C/min.
- Backward: \((40.2 - 31.5)/10 = 0.87\) °C/min.
- Central: \((46.9 - 31.5)/20 = 0.77\) °C/min.
Answer: About 0.77 °C/min. The rate is falling over time, which is why the forward and backward estimates disagree
There is a catch. Making \(h\) smaller reduces the approximation error, but it amplifies measurement noise: a small error in each reading becomes a large error when divided by a tiny \(h\). Noisy data is usually smoothed or fitted with a curve before it is differentiated. This trade-off appears in every control system that uses a derivative term.
Common mistakes
MistakeSubstituting h = 0 into the difference quotient straight away and getting 0/0.
InsteadSimplify the difference quotient first (expand, cancel, rationalize), then let h → 0.
MistakeWriting f(x + h) as f(x) + h.
InsteadReplace every x in the formula with (x + h). For f(x) = x², f(x + h) = (x + h)² = x² + 2xh + h², not x² + h.
MistakeUsing the derivative value as the y-coordinate of the tangent point.
InsteadThe point on the tangent line is (a, f(a)). The derivative f′(a) is only the slope.
MistakeAssuming that a continuous function must have a derivative everywhere.
InsteadDifferentiable implies continuous, not the other way round. Look out for corners, cusps and vertical tangents.
MistakeDropping units, or reporting a rate in the wrong units.
InsteadA derivative has units of output per unit of input. Write them down and check them.
Summary and key terms
- The average rate of change over [a, b] is the slope of the secant line, (f(b) − f(a))/(b − a).
- The derivative is the limit of that average as the interval shrinks: f′(a) = lim h→0 (f(a + h) − f(a))/h.
- Geometrically, f′(a) is the slope of the tangent line. Physically, it is the instantaneous rate of change.
- The tangent line at a is y = f(a) + f′(a)(x − a). Near a it approximates the function well (linearization).
- Where f′ > 0, f increases; where f′ < 0, f decreases; where f′ = 0, the tangent is horizontal.
- Differentiable functions are continuous, but corners, cusps, vertical tangents and jumps prevent a derivative.
- Second and higher derivatives describe acceleration, curvature and, for beams, moment, shear and load.
- Average rate of change
- Δf/Δx over an interval; the slope of a secant line.
- Derivative
- The instantaneous rate of change f′(a), defined as a limit of difference quotients.
- Difference quotient
- (f(a + h) − f(a))/h, the slope of a secant line.
- Tangent line
- The line through (a, f(a)) with slope f′(a).
- Linear approximation
- Using the tangent line to estimate f near a.
- Differentiable
- Having a derivative at a point (or at every point of an interval).
- Second derivative
- The derivative of f′, written f″; it describes acceleration or curvature.
- Concave up / down
- Bending upward (f″ > 0) or downward (f″ < 0).
Practice problems
Work each problem on paper first, then reveal the answer to check.
Find the average rate of change of \(f(x) = x^2 + 3x\) on \([1, 4]\).
Show answer
(f(4) − f(1))/(4 − 1) = (28 − 4)/3 = 8.
Use the definition of the derivative to show that the derivative of \(x^3\) is \(3x^2\).
Show answer
(x + h)³ − x³ = 3x²h + 3xh² + h³. Dividing by h gives 3x² + 3xh + h², which approaches 3x² as h → 0.
Use the definition to find the derivative of \(f(x) = 5x - 7\). Explain the answer geometrically.
Show answer
(5(x + h) − 7 − (5x − 7))/h = 5h/h = 5. The graph is a straight line with slope 5, so its slope is 5 everywhere.
Use the definition to find the derivative of \(f(x) = \dfrac{1}{x + 1}\).
Show answer
Combine fractions: (1/(x + h + 1) − 1/(x + 1))/h = −1/((x + h + 1)(x + 1)) → −1/(x + 1)².
Find the equation of the tangent line to \(y = x^2\) at \(x = 3\).
Show answer
Point (3, 9), slope 2(3) = 6. y = 9 + 6(x − 3), or y = 6x − 9.
Use a linear approximation of \(\sqrt{x}\) at \(x = 9\) to estimate \(\sqrt{9.2}\).
Show answer
f(9) = 3, f′(9) = 1/6. √9.2 ≈ 3 + 0.2/6 ≈ 3.0333. (True value 3.03315.)
A tank holds \(V(t) = 500 + 20t - 0.5t^2\) liters after \(t\) minutes. Find the flow rate at \(t = 10\) min and say whether the tank is filling or draining.
Show answer
V′(t) = 20 − t, so V′(10) = 10 L/min. It is positive, so the tank is still filling, at 10 L/min.
Where is \(f(x) = |x - 3|\) not differentiable? Explain why.
Show answer
At x = 3. The slope is −1 to the left and +1 to the right, so the graph has a corner and the difference quotient has different one-sided limits.
For \(s(t) = 2t^3 - 15t^2 + 24t\) meters, find when the velocity is zero and the acceleration at those times.
Show answer
v = 6t² − 30t + 24 = 6(t − 1)(t − 4), zero at t = 1 s and t = 4 s. a = 12t − 30: a(1) = −18 m/s², a(4) = 18 m/s².
A displacement sensor reads 2.10 mm at t = 0.30 s, 2.46 mm at t = 0.32 s and 2.90 mm at t = 0.34 s. Estimate the velocity at t = 0.32 s with a central difference.
Show answer
(2.90 − 2.10)/(0.04) = 20 mm/s.
A power plant delivers energy \(E(t) = 3.6t + 0.1t^2\) GJ over the first \(t\) hours of a run. What is its power output at \(t = 2\) h, in megawatts? (1 GJ/h ≈ 0.2778 MW)
Show answer
E′(t) = 3.6 + 0.2t, so E′(2) = 4.0 GJ/h. Converting: 4.0 × 0.2778 ≈ 1.11 MW.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.