Jugami Calculus

Jugami › Calculus › Derivatives

Derivatives

The slope of a curve, at a single point.

A straight line has one slope everywhere. A curve keeps changing direction: steep here, flat there, downhill somewhere else. The derivative tells you the slope of a curve at one exact point. It measures how fast something is changing at a single instant, like the reading on a speedometer.

On this page: the big idea, a secant-to-tangent explorer, linked graphs of f and f′, four places a derivative fails, the six rules, five worked examples, nine practice problems, and an eight-question quiz.

Graph of y = x³ − 3x with three short tangent lines: a flat one at the peak where x = −1 (slope 0), a steep downhill one at x = 0 (slope −3), and a steep uphill one at x = 1.6 (slope 4.68).−2−1012−202slope 0slope −3slope 4.68
Three tangent lines on y = x³ − 3x. Each one shows the curve’s slope at a single point.

Section IThe big idea: zoom in on a slope

You already know how to find the slope between two points: rise over run. Pick a point P = (a, f(a)) on a curve and a second point Q a little to the right, at x = a + h. The line through them is a secant line, and its slope is

secant slope = f(a + h) − f(a) over h

This fraction is called the difference quotient. Now slide Q toward P by shrinking h. The secant line swings around until it just grazes the curve at P. That limiting line is the tangent line, and its slope is the derivative.

Derivative (definition). The derivative of f at x = a is f′(a) = limh → 0f(a + h) − f(a) over h, as long as this limit exists. If it does, we say f is differentiable at a.

Plugging in h = 0 directly would give 0/0, which is exactly the kind of problem the Limits lesson taught you to handle: simplify first, then let h shrink.

There are several ways to write a derivative. All of these mean the same thing:

  • f′(x), said “f prime of x” (Lagrange’s notation);
  • dy over dx, said “d y d x” (Leibniz’s notation), when y = f(x);
  • ẏ, a dot over the letter (Newton’s notation). Physicists still use it for rates of change over time.

Section IISecant to tangent explorer

Pick a function. The dashed line is the tangent at P. Drag the slider to shrink h and move Q toward P. The red secant line tilts toward the tangent, and the table records each secant slope.

Section IIIThe derivative is a function too

Find the slope at every point and you get a whole new function, f′(x). Its graph tells you about the shape of f:

  • where f is rising, f′(x) is positive (above the axis);
  • where f is falling, f′(x) is negative (below the axis);
  • where f has a peak or a valley with a level tangent, f′(x) = 0.

Move the slider below. The red tangent line on top and the dot on the bottom graph move together: the dot’s height is the tangent line’s slope.

Section IVFour ways a derivative can fail

A function is differentiable at a point when its graph, zoomed in far enough, looks like a straight line that isn’t vertical. Here are the four ways that can go wrong. In each graph the trouble is at the marked point.

Graph of y = |x|: a V shape with a sharp corner at the origin. The slope is −1 on the left and 1 on the right.−2−1012012

1. A corner

|x| has slope −1 on the left and 1 on the right. The one-sided limits of the difference quotient disagree, so f′(0) does not exist.

Graph of y = x to the two-thirds power: two branches that come down and meet in a sharp point, a cusp, at the origin, where both sides become vertical.−2−101201

2. A cusp

x2/3 comes to a sharp point. The slope heads to −∞ from the left and +∞ from the right.

Graph of the cube root of x: a smooth S-shaped curve whose tangent line at the origin is vertical (shown dashed), so its slope is undefined there.−2−1012−101

3. A vertical tangent

The cube root ∛x is smooth, but its tangent at 0 is vertical. A vertical line has no slope, so there’s no derivative.

Graph of a function equal to x for x less than 1 and x + 1 for x at least 1: the graph jumps from an open dot at (1, 1) up to a filled dot at (1, 2).−101230123

4. A discontinuity

A graph with a jump, a hole or a break can’t have a tangent line there. To be differentiable, a function must first be continuous.

The rule to remember: differentiable implies continuous, but not the other way round. All four graphs above except the jump are continuous, and still have no derivative at the marked point.

Section VThe derivative rules

Using the limit definition every time would be slow. Luckily, a handful of rules, each proved once from the definition, handle almost every function you’ll meet.

The derivative rules (c is a constant)
RuleFunctionDerivativeNote
Constantc0A flat line has slope 0.
Powerxⁿnxⁿ⁻¹Works for any real power n, such as x⁻¹ or x1/2.
Constant multiplec · f(x)c · f′(x)Constants ride along.
Sum and differencef(x) ± g(x)f′(x) ± g′(x)Differentiate term by term.
Productf(x) · g(x)f′(x)g(x) + f(x)g′(x)Not f′ · g′.
Quotientf(x) over g(x)f′(x)g(x) − f(x)g′(x) over g(x)²Order matters because of the minus sign; g(x) ≠ 0.
Chainf(g(x))f′(g(x)) · g′(x)Outside derivative at the inside, times the inside’s derivative.

Two more facts you’ll use (with x in radians): (sin x)′ = cos x and (cos x)′ = −sin x.

Why the power rule works

Take f(x) = x². The difference quotient is (x + h)² − x² over h = 2xh + h² over h = 2x + h, which closes in on 2x. For x³ the same steps give 3x² + 3xh + h², which closes in on 3x². The pattern (xⁿ)′ = nxⁿ⁻¹ holds every time.

In Leibniz notation the chain rule looks almost like canceling fractions: dy over dx = dy over du · du over dx. That neat look is one reason his notation won out.

Section VIWorked examples

Example 1: from the definition

Use the definition to find f′(3) for f(x) = x², then the tangent line at x = 3.

limh → 0(3 + h)² − 9 over hSet up the difference quotient with a = 3limh → 06h + h² over hExpand: 9 + 6h + h² − 9limh → 0(6 + h) = 6Cancel h, then let h → 0y − 9 = 6(x − 3), so y = 6x − 9Tangent line through (3, 9) with slope 6
Graph of y = x² with the dashed tangent line y = 6x − 9 touching it at the point (3, 9).01234504812(3, 9), slope 6
The tangent line y = 6x − 9 touches y = x² at (3, 9).

✓ Numerical check: with h = 0.001 the difference quotient is 6.001; with h = −0.001 it is 5.999.

Example 2: power, sum and constant multiple rules

Differentiate f(x) = 3x⁴ − 5x² + 2x − 8.

3 · 4x³ − 5 · 2x + 2 − 0Each term on its own; constants vanishf′(x) = 12x³ − 10x + 2Answer

✓ Numerical check at x = 1: the formula gives 4, and the slope between 0.999 and 1.001 is 4.000012.

Example 3: product rule

Differentiate y = x² sin x.

first = x², second = sin xTwo factors multiplied togethery′ = 2x · sin x + x² · cos xFirst′ · second + first · second′

✓ Numerical check at x = 1: 2 sin 1 + cos 1 ≈ 2.223244, and the slope between 0.999 and 1.001 is 2.223244 to six decimals.

Example 4: quotient rule

Differentiate y = x over x² + 1.

y′ = (1)(x² + 1) − x(2x) over (x² + 1)²Low · d(high) − high · d(low), over low squaredy′ = 1 − x² over (x² + 1)²x² + 1 − 2x² = 1 − x²

✓ Numerical check at x = 2: (1 − 4)/25 = −0.12, and the slope between 1.999 and 2.001 is −0.120000 to six decimals.

Example 5: chain rule

Differentiate y = (2x + 1)³.

outer: u³, inner: u = 2x + 1A function inside a functiony′ = 3(2x + 1)² · 2Outer′ at the inner, times inner′ = 2y′ = 6(2x + 1)²Answer

✓ Numerical check at x = 0: 6 · 1 = 6, and the slope between −0.001 and 0.001 is 6.000008.

Section VIICommon mistakes

  • “The derivative of a product is the product of the derivatives.” No: (x · x)′ is (x²)′ = 2x, not 1 · 1 = 1. Use the product rule.
  • Forgetting the inside. ((x² + 1)⁴)′ is not 4(x² + 1)³. The chain rule needs the extra factor 2x.
  • Mixing up the quotient rule’s order. The bottom’s derivative comes second, after the minus sign. Swap them and the sign of your answer flips.
  • Using the power rule on 2ˣ. The power rule needs x in the base and a constant power. A variable in the exponent needs a different rule, coming in a later lesson.
  • Answering with f′(a) when asked for the tangent line. The derivative is the slope. The tangent line also needs the point: y − f(a) = f′(a)(x − a).
  • Assuming “continuous” means “differentiable.” Corners, cusps and vertical tangents are all continuous and still fail.

Section VIIIPractice problems

Try each one on paper first, then open the answer to check your steps. Every answer includes a numerical check: the slope between two very close points, which you can repeat on a calculator.

  1. Find f′(x) for f(x) = 5x⁴ − 3x² + 7. Power rule

    Show answer and steps
    5 · 4x³ − 3 · 2x + 0Power rule on each term; a constant’s derivative is 0f′(x) = 20x³ − 6xAnswer

    ✓ Check at x = 1: the slope of f between x = 0.999 and 1.001 is 14.00002, and 20 − 6 = 14.

  2. Find y′ for y = 4√x + 2 over x. Rewrite first

    Show answer and steps
    y = 4x1/2 + 2x⁻¹Write roots and fractions as powersy′ = 4 · ½x−1/2 − 2x⁻²Power ruley′ = 2 over √x − 2 over x²Answer

    ✓ Check at x = 4: the formula gives 2/2 − 2/16 = 0.875, and the slope between 3.999 and 4.001 is 0.875000 to six decimals.

  3. Use the limit definition to find f′(x) for f(x) = x² + 3x. Definition

    Show answer and steps
    limh → 0(x + h)² + 3(x + h) − x² − 3x over hSet up the difference quotientlimh → 02xh + h² + 3h over hExpand; x² and 3x cancellimh → 0(2x + h + 3)Divide every term by hf′(x) = 2x + 3Let h → 0

    ✓ Check at x = 2: the formula gives 7; the difference quotient with h = 0.001 gives 7.001.

  4. Differentiate y = (x² + 1)(3x − 5). Product rule

    Show answer and steps
    y′ = (2x)(3x − 5) + (x² + 1)(3)First′ · second + first · second′= 6x² − 10x + 3x² + 3Multiply outy′ = 9x² − 10x + 3Answer

    ✓ Check at x = 1: 9 − 10 + 3 = 2, and the slope between 0.999 and 1.001 is 2.000003.

  5. Differentiate y = 2x + 1 over x − 3. Quotient rule

    Show answer and steps
    y′ = 2(x − 3) − (2x + 1)(1) over (x − 3)²Low · d(high) − high · d(low), over low squaredy′ = −7 over (x − 3)²2x − 6 − 2x − 1 = −7

    ✓ Check at x = 4: −7/1 = −7, and the slope between 3.999 and 4.001 is −7.000007.

  6. Differentiate y = (3x² − 1)⁵. Chain rule

    Show answer and steps
    outer: u⁵, inner: u = 3x² − 1Spot the function inside a functiony′ = 5(3x² − 1)⁴ · 6xOuter′ at the inner, times inner′y′ = 30x(3x² − 1)⁴Answer

    ✓ Check at x = 1: 30 · 1 · 2⁴ = 480, and the slope between 0.999 and 1.001 is 480.01.

  7. Differentiate y = sin(4x) (radians). Chain rule

    Show answer and steps
    outer: sin u, inner: u = 4x(sin u)′ = cos uy′ = 4 cos(4x)cos(4x) times the inner derivative 4

    ✓ Check at x = 0: 4 cos 0 = 4, and the slope between −0.001 and 0.001 is 3.99999.

  8. Find the tangent line to y = x³ − 2x at x = 2. Tangent line

    Show answer and steps
    y(2) = 8 − 4 = 4The point is (2, 4)y′ = 3x² − 2, so y′(2) = 10The slope at that pointy − 4 = 10(x − 2)Point-slope formy = 10x − 16Answer

    ✓ Check: at x = 2.001 the curve is at 4.010006 and the line is at 4.01. They nearly touch, as a tangent should.

  9. Find the slope of y = √(x² + 9) at x = 4. Challenge

    Show answer and steps
    y = (x² + 9)1/2Rewrite the root as a powery′ = ½(x² + 9)−1/2 · 2x = x over √(x² + 9)Chain rule4 over √25 = 4 over 5Plug in x = 4

    ✓ Check: the slope between 3.999 and 4.001 is 0.8000000 to seven decimals.

Section IXSelf-guided quiz: eight quick questions

Choose one answer for each question, then press “Check my answers.” Your best score is saved only in this browser.

1. What is the derivative of x⁷?
2. For f(x) = x², what is the slope of the secant line from x = 1 to x = 1 + h?
3. Where does f(x) = |x| fail to have a derivative?
4. Use the product rule: what is the derivative of x³ cos x?
5. What is the derivative of (x² + 1)⁴?
6. If f′(2) = 0, what does the tangent line to the graph at x = 2 look like?
7. Which statement is true?
8. What is the derivative of 1 over x²?

Section XNewton, Leibniz and the derivative

In the summer of 1665, plague closed the University of Cambridge and the young Isaac Newton went home to Lincolnshire. Over the next two years he worked out what he called the method of fluxions. He pictured a point moving along a curve: the changing quantities were “fluents,” and their rates of change were “fluxions,” our derivatives. He wrote a tract on fluxions in October 1666, but he didn’t publish it. His Method of Fluxions, written in 1671, did not appear in print until an English translation came out in 1736, after his death.

Meanwhile, in Paris, the German scholar Gottfried Wilhelm Leibniz developed calculus his own way. In a manuscript dated 11 November 1675 he wrote dx, dy and dy over dx, the notation we still use. In 1684 he published the first paper on differential calculus, Nova Methodus pro Maximis et Minimis (“A new method for maxima and minima”), in the Leipzig journal Acta Eruditorum.

The result was one of the bitterest quarrels in science. Newton’s supporter John Keill accused Leibniz of plagiarism in the Royal Society’s Philosophical Transactions. When Leibniz asked the Society to correct the record, it set up a committee to rule on who came first. Newton was the Society’s president. He appointed the committee and, without his name on it, wrote its official report himself, which, unsurprisingly, sided with Newton. Historians today agree that the two men discovered calculus independently.

The “prime” notation f′(x) came later still, from Joseph-Louis Lagrange, who used it in his Théorie des fonctions analytiques of 1797.

NotesSources and credits

Credits: every graph and diagram on this page is original SVG, computed from the actual functions, made for Jugami. The interactive graphs are drawn live in your browser with plain JavaScript, no outside libraries.