Skip to main content

Why Calculus Needs Limits

Algebra gives us the slope of a straight line between two distinct points:

msec=f(x+h)−f(x)hm_{\text{sec}} = \frac{f(x + h) - f(x)}{h}

This secant slope measures the average rate of change over an interval of width hh (for example, your average speed over a 22-hour road trip).

But what if you want your instantaneous speed at the exact moment you pass a speed camera? If you set h=0h = 0 directly in the slope formula, you get 00\frac{0}{0}, which is undefined. Differential calculus resolves this paradox using a limit: we keep h≠0h \ne 0 and examine what the secant slope approaches as hh shrinks arbitrarily close to 00:

f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}

Computing a Derivative from First Principles

Let’s see the limit definition in action on f(x)=x2f(x) = x^2:

  1. Form the difference quotient: (x+h)2−x2h=x2+2xh+h2−x2h=2xh+h2h\frac{(x + h)^2 - x^2}{h} = \frac{x^2 + 2xh + h^2 - x^2}{h} = \frac{2xh + h^2}{h}
  2. Factor out hh (valid because h≠0h \ne 0 in the limit): =2x+h= 2x + h
  3. Let h→0h \to 0: f′(x)=lim⁡h→0(2x+h)=2xf'(x) = \lim_{h \to 0}(2x + h) = 2x

At x=3x = 3, the slope of y=x2y = x^2 is f′(3)=6f'(3) = 6; at x=0x = 0, the slope is 00 (the flat bottom of the parabola).

Core Differentiation Rules

Computing limits from scratch for every problem would be tedious. Using the limit definition once gives us a permanent toolkit of differentiation rules:

RuleFunctionDerivativeNotes
Constantcc00Constants never change
Power Rulexnx^nnxn−1n x^{n-1}Works for any real nn (negative, fractional, etc.)
Constant Multiplec⋅f(x)c \cdot f(x)c⋅f′(x)c \cdot f'(x)Constants factor out
Sum / Differencef(x)±g(x)f(x) \pm g(x)f′(x)±g′(x)f'(x) \pm g'(x)Differentiate term by term
Exponentialexe^xexe^xexe^x is its own derivative
Natural Logln⁡(x)\ln(x)1/x1/xFor x>0x > 0
Sine / Cosinesin⁡(x), cos⁡(x)\sin(x),\ \cos(x)cos⁡(x), −sin⁡(x)\cos(x),\ -\sin(x)Requires xx in radians
Product Rulef(x)g(x)f(x)g(x)f′(x)g(x)+f(x)g′(x)f'(x)g(x) + f(x)g'(x)Never (f′)(g′)(f')(g')
Quotient Rulef(x)g(x)\frac{f(x)}{g(x)}f′(x)g(x)−f(x)g′(x)[g(x)]2\frac{f'(x)g(x) - f(x)g'(x)}{[g(x)]^2}Low d-High minus High d-Low, over Low²
Chain Rulef(g(x))f(g(x))f′(g(x))⋅g′(x)f'(g(x)) \cdot g'(x)Outer derivative at inner, times inner derivative

When a Function Is Not Differentiable

Continuity is necessary for differentiability, but not sufficient. A function fails to have a derivative at x=ax = a if:

  1. Discontinuity: A jump, hole, or vertical asymptote.
  2. Sharp corner or cusp: E.g., f(x)=∣x∣f(x) = |x| at x=0x = 0, where the left slope is −1-1 and the right slope is +1+1.
  3. Vertical tangent: E.g., f(x)=x1/3f(x) = x^{1/3} at x=0x = 0, where the slope approaches +∞+\infty.

Optimization & Critical Points

One of the greatest superpowers of derivatives is finding maximum and minimum values of real-world systems. At any smooth local peak or valley, the tangent line is horizontal (f′(x)=0f'(x) = 0).

To find the extrema of f(x)f(x) on an interval:

  1. Solve f′(x)=0f'(x) = 0 (or find where f′(x)f'(x) is undefined) to locate critical points.
  2. Use the First Derivative Sign Test (f′f' changes +→−+\to - for a maximum; −→+-\to + for a minimum) or the Second Derivative Test (f′′(c)<0  ⟹  f''(c) < 0 \implies local max; f′′(c)>0  ⟹  f''(c) > 0 \implies local min).

Progressive Worked Examples

Example 1 (Foundational): Tangent Line to a Polynomial

Find the equation of the tangent line to f(x)=x3−3xf(x) = x^3 - 3x at x=2x = 2:

  1. Point on curve: f(2)=23−3(2)=8−6=2  ⟹  (2,2)f(2) = 2^3 - 3(2) = 8 - 6 = 2 \implies (2, 2).
  2. Derivative: f′(x)=3x2−3f'(x) = 3x^2 - 3.
  3. Slope at x=2x = 2: m=f′(2)=3(4)−3=9m = f'(2) = 3(4) - 3 = 9.
  4. Point-slope form: y−2=9(x−2)  ⟹  y=9x−16y - 2 = 9(x - 2) \implies y = \mathbf{9x - 16}

Example 2 (Intermediate): Product & Chain Rule Combined

Differentiate h(x)=x2e3xh(x) = x^2 e^{3x}:

  1. Apply the Product Rule with f(x)=x2f(x) = x^2 (f′=2xf' = 2x) and g(x)=e3xg(x) = e^{3x}.
  2. Differentiate g(x)=e3xg(x) = e^{3x} using the Chain Rule: g′(x)=e3x⋅ddx[3x]=3e3xg'(x) = e^{3x} \cdot \frac{d}{dx}[3x] = 3e^{3x}.
  3. Combine: h′(x)=2xe3x+x2(3e3x)=xe3x(2+3x)h'(x) = 2x e^{3x} + x^2 (3e^{3x}) = \mathbf{x e^{3x}(2 + 3x)}

Example 3 (Applied Optimization): Maximizing Rectangular Area

A farmer has 120 m120\text{ m} of fencing to enclose a rectangular pasture along a straight river (no fence needed along the river). What dimensions maximize the enclosed area?

  1. Let xx be the width perpendicular to the river and yy be the length parallel to the river.
  2. Constraint: 2x+y=120  ⟹  y=120−2x2x + y = 120 \implies y = 120 - 2x.
  3. Area function to maximize: A(x)=x(120−2x)=120x−2x2A(x) = x(120 - 2x) = 120x - 2x^2
  4. Differentiate and set to zero: A′(x)=120−4x=0  ⟹  x=30 mA'(x) = 120 - 4x = 0 \implies x = \mathbf{30\text{ m}}
  5. Verify maximum: A′′(x)=−4<0A''(x) = -4 < 0 (concave down, guaranteed maximum).
  6. Find yy: y=120−2(30)=60 my = 120 - 2(30) = \mathbf{60\text{ m}}, giving maximum area 30×60=1,800 m230 \times 60 = \mathbf{1{,}800\text{ m}^2}.

Why Derivatives Matter

Every modern machine learning model trains via gradient descent—stepping downhill opposite the derivative of a loss function. Physics, economics (marginal cost/revenue), and control theory all speak the language of derivatives.

Common Misconceptions

  • Differentiating a product as f′(x)g′(x)f'(x)g'(x): Always use the Product Rule f′g+fg′f'g + fg'.
  • Applying the power rule to axa^x: ddx[2x]≠x⋅2x−1\frac{d}{dx}[2^x] \ne x \cdot 2^{x-1}. Because xx is in the exponent, ddx[2x]=2xln⁡(2)\frac{d}{dx}[2^x] = 2^x \ln(2).
  • Forgetting the inner derivative in the Chain Rule: ddx[(3x+1)4]=4(3x+1)3⋅3=12(3x+1)3\frac{d}{dx}[(3x + 1)^4] = 4(3x + 1)^3 \cdot 3 = 12(3x + 1)^3.

Quick Summary

  • f′(x)=lim⁡h→0f(x+h)−f(x)hf'(x) = \lim_{h \to 0}\frac{f(x+h)-f(x)}{h} is the instantaneous rate of change / tangent slope.
  • Master the Power, Product, Quotient, and Chain rules.
  • Critical points (f′(x)=0f'(x) = 0) locate maxima and minima for optimization.

Practice Problems

Common Questions

Frequently Asked Questions