Derivatives and Slope

A derivative answers one question: how fast is this changing right here?

A road climbs out of a valley along a curve: nearly flat at the bottom, steeper with every step. Ask for its grade and there's no one number to give. Yet a car parked anywhere on it sits on one definite grade. That grade at a single spot is a derivative, and a line or two of algebra will get it from the curve's equation.

Straight lines first

A straight road is the easy case, because its grade is the same everywhere. Pick any two points, and the slope is rise over run:

m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}

A road that climbs 3 ft per 100 ft across has a slope of 0.03, a 3% grade. The Handbook's Straight Line section prints three ways to write a line:

Three forms of a straight line
FormEquationIts slope
Slope-intercepty=mx+by = mx + bm, in plain sight
Point-slopey−y1=m(x−x1)y - y_1 = m(x - x_1)m, with a known point
GeneralAx+By+C=0Ax + By + C = 0m=−A/Bm = -A/B

Adapted from the FE Reference Handbook, Straight Line

Point-slope is the definition of slope with the fraction cleared, so use it whenever you know a slope and a point. The general form hides its slope, and the Handbook doesn't print it, so solve for yy to dig it out:

Ax+By+C=0⇒y=−ABx−CBAx + By + C = 0 \quad\Rightarrow\quad y = -\frac{A}{B}x - \frac{C}{B}

So the slope is −A/B-A/B: for 2x+5y−10=02x + 5y - 10 = 0, it's −2/5-2/5.

Two lines are parallel when they tilt the same way, so they share a slope. Perpendicular takes a moment more. Draw a slope triangle with a run of 4 and a rise of 3, then give it a quarter turn counterclockwise. The run of 4 now points up, so it's a rise of 4. The rise of 3 now points left, so it's a run of −3. The new slope is 4/(−3)=−4/34/(-3) = -4/3: the old fraction, flipped, with its sign changed.

x y quarter turn run 4 rise 3 rise 4 run −3 slope = 3/4 slope = −4/3
A quarter turn swaps rise and run and flips a sign

The Handbook states this as m1=−1/m2m_1 = -1/m_2, and slopes related that way are called negative reciprocals.

Worked Example A perpendicular line through a point
1 of 3

Find the line through (2,5)(2, 5) that is perpendicular to 3x+4y−12=03x + 4y - 12 = 0. Write it in general form.

The slope of a curve

Now back to the curved road. The ground under your feet looks flat even though the Earth is a ball, because you only see a tiny piece of it. Any smooth curve behaves the same way: zoom in far enough around a point, and it looks like a straight line.

full view (1, 1) slope 2 y = x2 zoomed 5× zoomed 25×
Zooming in on y = x² at the point (1, 1)
The dashed line has slope 2 in all three views. At full view the curve pulls away from it. At 25× you can barely tell them apart.

That line is the tangent line, and its slope is the derivative at that point. The Handbook's Differential Calculus section says it flatly: y′y' is "the slope of the curve." Slope is rise per unit of run, so the derivative is also the rate of change: how fast yy is changing with xx, right at that spot. If yy were a tank's water level and xx were time, it would be how fast the level is climbing at this instant.

Rise over run takes two points, though, and a single point has no run. So take a second point a distance Δx\Delta x away, compute the slope the ordinary way, then slide the second point in. For y=x2y = x^2 starting from (1,1)(1, 1):

x y 1 2 3 0 1 2 3 4 5 6 7 slope 3.5 slope 3 slope 2.5 tangent: slope 2 y = x2 (1, 1)
Lines through (1, 1) closing in on the tangent
Rise over run on y = x², starting from (1, 1)
Run, Δx\Delta xSecond pointRiseRise ÷ run
1.5(2.5, 6.25)5.253.5
1(2, 4)33
0.5(1.5, 2.25)1.252.5
0.1(1.1, 1.21)0.212.1
0.01(1.01, 1.0201)0.02012.01

The slopes settle toward exactly 2. You never set Δx\Delta x to zero, since that would give 0/0. You only ask what value the slopes are closing in on. That's a limit, and it's how the Handbook defines the derivative:

y′=lim⁡Δx→0f(x+Δx)−f(x)Δxy' = \lim_{\Delta x \to 0} \frac{f(x + \Delta x) - f(x)}{\Delta x}

You'll see the derivative written f′(x)f'(x), y′y', or dy/dxdy/dx, all meaning the same thing. Read dy/dxdy/dx as a tiny rise over a tiny run.

The power rule

Nobody wants to grind through that limit for every curve, and there's a pattern that saves you the trouble. Think of x2x^2 as the area of a square with side xx. Stretch the side by a sliver dxdx, and the area grows by two strips, each xx long and dxdx thick. The tiny corner, (dx)2(dx)^2, is a sliver of a sliver, and it vanishes as dxdx shrinks. So the area grows at a rate of 2x2x, and at x=1x = 1 that's the 2 the table was closing in on.

area x2 x dx x dx x dx x dx (dx)2
Stretching a square's side by dx

Make it a cube, x3x^3. Stretching the side grows slabs on three faces, each with area x2x^2, so the rate is 3x23x^2. The pattern keeps going whether or not you can draw it:

ddx xn=nxn−1\frac{d}{dx}\,x^n = n x^{n-1}

Bring the exponent down, then drop it by one. The Handbook's Derivatives list prints this as d(un)/dx=nun−1 du/dxd(u^n)/dx = nu^{n-1}\,du/dx. That extra du/dxdu/dx matters when uu is a whole expression, which is the business of Differentiation Rules. When uu is just xx, it equals 1. The rule also holds for negative and fractional powers, though this Lesson sticks to polynomials.

The same list gives the rest of the toolkit, and each entry matches a picture:

  • A constant has zero slope, dc/dx=0dc/dx = 0. Sliding a curve up or down doesn't change its tilt.
  • A constant multiple carries through, d(cu)/dx=c du/dxd(cu)/dx = c\,du/dx. Stretch a curve vertically by cc, and every rise gets cc times bigger.
  • Sums and differences go term by term. The rises simply add.

Together, those handle any polynomial:

y=4x3−5x2+7x−2⇒dydx=12x2−10x+7y = 4x^3 - 5x^2 + 7x - 2 \quad\Rightarrow\quad \frac{dy}{dx} = 12x^2 - 10x + 7

The derivative is itself a function, so you can differentiate again. For f(x)=x3f(x) = x^3, you get f′(x)=3x2f'(x) = 3x^2 and f′′(x)=6xf''(x) = 6x. That f′′f'', the derivative of the derivative, says how fast the slope is changing, and it comes into its own in Maxima, Minima, and Inflection Points.

For the slope at a point, put its xx into the derivative.

Worked Example The slope of a cubic at a point
1 of 3

Find the slope of y=2x3−5x2+4x−7y = 2x^3 - 5x^2 + 4x - 7 at x=2x = 2.

Working backward from a slope

So far you've been handed an xx and asked for the slope. The exam also runs it backward: here's a slope, so where on the curve does it occur? Set the derivative equal to that slope and solve for xx. To find where y=x2+xy = x^2 + x has a slope of 5, write 2x+1=52x + 1 = 5, which gives x=2x = 2.

The slope may be hiding behind the word "parallel." A tangent parallel to a given line has that line's slope, so get the slope from the line first.

Checkpoint
1 of 2

At what xx is the tangent to y=x2−5x+4y = x^2 - 5x + 4 parallel to the line 3x−y+7=03x - y + 7 = 0?

Tangent and normal lines

You now have everything needed to write the line that just touches a curve. A line takes a point and a slope, and on a curve those two come from different places, which is where most mistakes live. The point's height comes from the function, y1=f(x1)y_1 = f(x_1). The slope comes from the derivative, m=f′(x1)m = f'(x_1). Then point-slope form does the rest:

y−y1=m(x−x1)y - y_1 = m(x - x_1)

The normal line goes through the same point but stands square to the tangent, the way a wheel's spoke stands square to the road at the spot where the tire touches it. So its slope is the negative reciprocal, −1/m-1/m. The Handbook prints no formula for either line, and it doesn't need to: its slope statement and its point-slope form are enough.

x y y = f(x) (x1, y1) tangent: slope m = f′(x1) normal: slope −1/m
The tangent and normal at one point
Worked Example The tangent and normal to a parabola
1 of 3

Find the tangent and normal lines to y=x2−2x+3y = x^2 - 2x + 3 at x=2x = 2.

Reading the derivative from a graph

You can do a lot with no equation at all. Walk along a graph from left to right and, at each spot, ask one question: am I going uphill or downhill? Uphill means f′f' is positive. Downhill means f′f' is negative. At the top of a peak or the bottom of a valley you're level for an instant, and f′f' is zero.

Notice what's missing from that list: your height. You can walk uphill below sea level. Where ff crosses the x-axis it's just passing through a height of zero, and its slope there can be anything. In the figure below, ff crosses the axis at x=0x = 0 in the middle of its steepest descent, with f′=−3f' = -3.

−2 −1 0 1 2 x −2 0 2 −2 −1 0 1 2 x −3 0 3 6 9 f(x) f′(x) peak valley f crosses the axis f′ = 0 f′ = 0 f′ = −3 f rising, f′ > 0 f falling, f′ < 0 f rising, f′ > 0
A function and its derivative on the same x-scale
Here f(x)=x3−3xf(x) = x^3 - 3x and f′(x)=3x2−3f'(x) = 3x^2 - 3.

Steepness shows up too: the steeper ff is, the farther f′f' sits from zero. To match a function to the graph of its derivative, find the flat spots first, because they fix where f′f' is zero. Then check the signs between them.

Checkpoint
1 of 2
0 1 2 3 4 5 6 x −2 0 2 f(x)
The graph of a function f

On which intervals is f′(x)f'(x) negative?

A.
2<x<42 < x < 4
B.
0<x<1 and 3<x<50 < x < 1 \text{ and } 3 < x < 5
C.
1<x<3 and 5<x<61 < x < 3 \text{ and } 5 < x < 6
D.
0<x<2 and 4<x<60 < x < 2 \text{ and } 4 < x < 6

Recap

  • A derivative is a slope: zoom in until a smooth curve looks straight, and it's the slope of that line, the rate of change at that spot.
  • Term by term, xnx^n becomes nxn−1nx^{n-1} and constants vanish. Put xx into the derivative for the slope at a point, or set the derivative equal to a stated slope and solve for xx.
  • A tangent takes its height from ff, its slope from f′f', and its form from point-slope. A normal has the same point and a slope of −1/m-1/m.
  • The line Ax+By+C=0Ax + By + C = 0 has slope −A/B-A/B. Parallel lines share a slope, and perpendicular slopes are negative reciprocals.
  • The sign of f′f' says whether ff is rising or falling. It's zero at peaks and valleys, not where ff crosses the axis.