Derivatives — Limit Definition, First Principles & Differentiation Rules (Layered)

2271 words
11 min read
2026-09-12
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

Layered chapter on differential calculus: limit definition, difference quotient, product/quotient/chain rules, differentiability vs continuity, and question-pattern anatomy. # Derivatives — Limit Definition, First Principles & Differentiation Rules > **Acceptance Standard:** This chapter serves as a stand-alone text...

Derivatives — Limit Definition, First Principles & Differentiation Rules

Acceptance Standard: This chapter serves as a stand-alone textbook for any beginner studying IIT Madras BSMA1001 (Mathematics for Data Science I). It develops differential calculus from first principles, bridges geometry with symbolic computation, proves the fundamental differentiation rules, and dissects all eight recurring exam question patterns.

1. Orientation & Mental Model: The Geometry of Instantaneous Change

The Tangent Line Problem

In elementary algebra, you learned that the slope of a straight line between two distinct points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is constant: m=y2−y1x2−x1=ΔyΔxm = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\Delta y}{\Delta x}
However, real-world relationships—from vehicle trajectories and radioactive decay to loss surfaces in deep neural networks—are non-linear curves. If you pick two points on a curve y=f(x)y = f(x), the line connecting them is a secant line:
        y ^
          |                 * (x + h, f(x + h))
          |                /
          |        *      /  <-- Secant line slope = [f(x+h) - f(x)] / h
          |       /      /
          |      * (x, f(x))
          |     /
          +----+--------+-------------> x
               x       x + h
The slope of this secant line represents the average rate of change over the interval [x,x+h][x, x + h]: msec=f(x+h)−f(x)hm_{\text{sec}} = \frac{f(x + h) - f(x)}{h}

The Limiting Transition: Secant to Tangent

Now, let hh shrink closer and closer to 00. As h→0h \to 0:
  1. The point (x+h,f(x+h))(x + h, f(x + h)) slides smoothly along the curve toward (x,f(x))(x, f(x)).
  2. The secant line pivots around (x,f(x))(x, f(x)).
  3. At the exact boundary limit h→0h \to 0, the secant line freezes into the tangent line—a unique line that grazes the curve at (x,f(x))(x, f(x)), matching its instantaneous trajectory.
The slope of this tangent line is the derivative f′(x)f'(x).

2. Terminology, Notation & Etymology

Term / NotationEtymology / OriginExact Mathematical Meaning
DerivativeLatin derivare ("to draw off, lead away from a source").The instantaneous rate of change of a function with respect to its independent variable.
Difference QuotientLatin quotient ("how many times").The expression f(x+h)−f(x)h\frac{f(x + h) - f(x)}{h}, representing average slope over span hh.
Leibniz Notation (dfdx\frac{df}{dx})Gottfried Wilhelm Leibniz (1684).Suggests a ratio of infinitesimal changes dfdf over dxdx. Exceptionally powerful for the Chain Rule.
Lagrange Notation (f′(x)f'(x))Joseph-Louis Lagrange (1770).Prime notation; compact and ideal for functional operations.
Differentiable—A function ff is differentiable at x=ax = a if the limit of the difference quotient exists and is finite.
Normal LineLatin normalis ("made according to a carpenter's square").The unique line perpendicular to the tangent line at the point of tangency: mnormal=−1f′(a)m_{\text{normal}} = -\frac{1}{f'(a)}.

3. Foundational Mechanics: Formal Definition & First Principles

The Definition of the Derivative

\bbox[10px,border:2pxsolidvar(−−teal)]f′(x)=lim⁡h→0f(x+h)−f(x)h\bbox[10px,border:2px solid var(--teal)]{f'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}}
Equivalently, evaluating the derivative at a specific point x=ax = a: f′(a)=lim⁡x→af(x)−f(a)x−af'(a) = \lim_{x \to a} \frac{f(x) - f(a)}{x - a}

Deriving Standard Derivatives from First Principles

1. The Power Rule: f(x)=xnf(x) = x^n (for n∈Nn \in \mathbb{N})

Using the binomial theorem: (x+h)n=xn+nxn−1h+(n2)xn−2h2+⋯+hn(x + h)^n = x^n + n x^{n-1}h + \binom{n}{2}x^{n-2}h^2 + \dots + h^n Substitute into the difference quotient: f′(x)=lim⁡h→0(xn+nxn−1h+(n2)xn−2h2+… )−xnhf'(x) = \lim_{h \to 0} \frac{\left(x^n + n x^{n-1}h + \binom{n}{2}x^{n-2}h^2 + \dots\right) - x^n}{h} Cancel xnx^n and divide by hh: f′(x)=lim⁡h→0(nxn−1+(n2)xn−2h+… )=nxn−1f'(x) = \lim_{h \to 0} \left( n x^{n-1} + \binom{n}{2}x^{n-2}h + \dots \right) = \mathbf{n x^{n-1}}

2. The Exponential Function: f(x)=exf(x) = e^x

f′(x)=lim⁡h→0ex+h−exh=lim⁡h→0ex(eh−1)h=exlim⁡h→0eh−1hf'(x) = \lim_{h \to 0} \frac{e^{x + h} - e^x}{h} = \lim_{h \to 0} \frac{e^x(e^h - 1)}{h} = e^x \lim_{h \to 0} \frac{e^h - 1}{h} By the fundamental definition of Euler's number ee, lim⁡h→0eh−1h=1\lim_{h \to 0} \frac{e^h - 1}{h} = 1. ∴ddx(ex)=ex\therefore \frac{d}{dx}(e^x) = \mathbf{e^x}

3. The Natural Logarithm: f(x)=ln⁡xf(x) = \ln x (for x>0x > 0)

f′(x)=lim⁡h→0ln⁡(x+h)−ln⁡(x)h=lim⁡h→01hln⁡(1+hx)f'(x) = \lim_{h \to 0} \frac{\ln(x + h) - \ln(x)}{h} = \lim_{h \to 0} \frac{1}{h} \ln\left(1 + \frac{h}{x}\right) Let u=hx  ⟹  h=xuu = \frac{h}{x} \implies h = x u. As h→0h \to 0, u→0u \to 0: f′(x)=lim⁡u→01xuln⁡(1+u)=1xlim⁡u→0ln⁡((1+u)1/u)=1xln⁡(e)=1xf'(x) = \lim_{u \to 0} \frac{1}{xu} \ln(1 + u) = \frac{1}{x} \lim_{u \to 0} \ln\left((1 + u)^{1/u}\right) = \frac{1}{x} \ln(e) = \mathbf{\frac{1}{x}}

4. Operational Rules: Product, Quotient & Chain Rules

Rule NameAlgebraic FormulaLeibniz Notation
Constant Multiple(c⋅f)′=c⋅f′(c \cdot f)' = c \cdot f'ddx[cu]=cdudx\frac{d}{dx}[c u] = c \frac{du}{dx}
Sum & Difference(f±g)′=f′±g′(f \pm g)' = f' \pm g'ddx[u±v]=dudx±dvdx\frac{d}{dx}[u \pm v] = \frac{du}{dx} \pm \frac{dv}{dx}
Product Rule(f⋅g)′=f′⋅g+f⋅g′(f \cdot g)' = f' \cdot g + f \cdot g'ddx[uv]=udvdx+vdudx\frac{d}{dx}[uv] = u \frac{dv}{dx} + v \frac{du}{dx}
Quotient Rule(fg)′=f′⋅g−f⋅g′g2\left(\frac{f}{g}\right)' = \frac{f' \cdot g - f \cdot g'}{g^2}ddx[uv]=vdudx−udvdxv2\frac{d}{dx}\left[\frac{u}{v}\right] = \frac{v \frac{du}{dx} - u \frac{dv}{dx}}{v^2}
Chain Rule(f∘g)′(x)=f′(g(x))⋅g′(x)(f \circ g)'(x) = f'(g(x)) \cdot g'(x)dydx=dydu⋅dudx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}

Proof of the Product Rule (The Add-and-Subtract Trick)

Consider P(x)=f(x)g(x)P(x) = f(x)g(x): P′(x)=lim⁡h→0f(x+h)g(x+h)−f(x)g(x)hP'(x) = \lim_{h \to 0} \frac{f(x + h)g(x + h) - f(x)g(x)}{h} Add and subtract f(x+h)g(x)f(x + h)g(x) in the numerator: =lim⁡h→0f(x+h)g(x+h)−f(x+h)g(x)+f(x+h)g(x)−f(x)g(x)h= \lim_{h \to 0} \frac{f(x + h)g(x + h) - f(x + h)g(x) + f(x + h)g(x) - f(x)g(x)}{h} Factor into two limits: =lim⁡h→0f(x+h)[g(x+h)−g(x)h]+lim⁡h→0g(x)[f(x+h)−f(x)h]= \lim_{h \to 0} f(x + h) \left[\frac{g(x + h) - g(x)}{h}\right] + \lim_{h \to 0} g(x) \left[\frac{f(x + h) - f(x)}{h}\right] Since ff is differentiable, it is continuous, so lim⁡h→0f(x+h)=f(x)\lim_{h \to 0} f(x + h) = f(x): =f(x)g′(x)+g(x)f′(x)= \mathbf{f(x) g'(x) + g(x) f'(x)}

5. Failure Modes & Common Exam Pitfalls

         The Non-Negotiable Hierarchy:
             Differentiability
                   │
                   ▼ (Guaranteed)
               Continuity
                   │
                   ▼ (NOT reversible!)
            Does NOT imply Differentiability!

Pitfall 1: Continuity Does NOT Guarantee Differentiability

A function can be continuous everywhere yet fail to be differentiable at a point. The Canonical Non-Example: f(x)=∣x∣f(x) = |x| at x=0x = 0.
  • Continuous at 00: lim⁡x→0∣x∣=0=f(0)\lim_{x \to 0} |x| = 0 = f(0).
  • Left-hand derivative: lim⁡h→0−∣0+h∣−0h=lim⁡h→0−−hh=−1\lim_{h \to 0^-} \frac{|0 + h| - 0}{h} = \lim_{h \to 0^-} \frac{-h}{h} = \mathbf{-1}.
  • Right-hand derivative: lim⁡h→0+∣0+h∣−0h=lim⁡h→0+hh=+1\lim_{h \to 0^+} \frac{|0 + h| - 0}{h} = \lim_{h \to 0^+} \frac{h}{h} = \mathbf{+1}.
  • Because the left and right limits do not match, f′(0)f'(0) does not exist. Graphically, this is a sharp corner (cusp).

Pitfall 2: The Chain Rule "Forgotten Tail"

When differentiating composite functions like y=ln⁡(3x2+5)y = \ln(3x^2 + 5):
  • Correct: 13x2+5×ddx(3x2+5)=6x3x2+5\frac{1}{3x^2 + 5} \times \frac{d}{dx}(3x^2 + 5) = \frac{6x}{3x^2 + 5}.
  • Common blunder: Writing 13x2+5\frac{1}{3x^2 + 5}, forgetting to multiply by the derivative of the inside g′(x)=6xg'(x) = 6x.

Pitfall 3: Quotient Rule Numerator Sign Inversion

  • Correct: f′g−fg′g2\frac{f'g - fg'}{g^2} ("Low d-High minus High d-Low over Low squared").
  • Blunder: fg′−f′gg2\frac{fg' - f'g}{g^2}. This flips the sign of the entire derivative, turning positive slopes negative!

6. Question-Pattern Anatomy (8 Finite Exam Shapes)

Shape 1: First Principles Limit Recognition

  • Cue: "Find the value of lim⁡h→0sin⁡(x+h)−sin⁡(x)h\lim_{h \to 0} \frac{\sin(x + h) - \sin(x)}{h}."
  • Attack: Do not expand trigonometry with angle-sum formulas! Recognize this as the exact limit definition of ddx[sin⁡x]=cos⁡x\frac{d}{dx}[\sin x] = \cos x.

Shape 2: Differentiability at Piecewise Junctions

  • Cue: "For what values of aa and bb is f(x)={x2x≤1ax+bx>1f(x) = \begin{cases} x^2 & x \le 1 \\ ax + b & x > 1 \end{cases} differentiable everywhere?"
  • Attack:
    1. Continuity at x=1x = 1: 12=a(1)+b  ⟹  a+b=11^2 = a(1) + b \implies a + b = 1.
    2. Matching derivatives at x=1x = 1: ddx(x2)∣x=1=2(1)=2\left.\frac{d}{dx}(x^2)\right|_{x=1} = 2(1) = 2. Right derivative is aa. Thus a=2a = 2.
    3. Solve for bb: 2+b=1  ⟹  b=−12 + b = 1 \implies b = -1.

Shape 3: Equation of Tangent and Normal Lines

  • Cue: "Find the equation of the normal line to y=x3−2x+4y = x^3 - 2x + 4 at x=1x = 1."
  • Attack:
    1. Point: y(1)=1−2+4=3  ⟹  (1,3)y(1) = 1 - 2 + 4 = 3 \implies (1, 3).
    2. Derivative: y′=3x2−2  ⟹  mtangent=3(1)2−2=1y' = 3x^2 - 2 \implies m_{\text{tangent}} = 3(1)^2 - 2 = 1.
    3. Normal slope: mnormal=−1mtangent=−1m_{\text{normal}} = -\frac{1}{m_{\text{tangent}}} = -1.
    4. Equation: y−3=−1(x−1)  ⟹  y=−x+4y - 3 = -1(x - 1) \implies y = -x + 4.

Shape 4: Repeated Chain Rule with Trig & Exponentials

  • Cue: "Find ddx[esin⁡(x2)]\frac{d}{dx}[e^{\sin(x^2)}]."
  • Attack: Work from outside to inside: ddx[eu]=eu⋅u′=esin⁡(x2)⋅cos⁡(x2)⋅2x=2xcos⁡(x2)esin⁡(x2)\frac{d}{dx}[e^u] = e^u \cdot u' = e^{\sin(x^2)} \cdot \cos(x^2) \cdot 2x = \mathbf{2x \cos(x^2) e^{\sin(x^2)}}

Shape 5: Logarithmic Differentiation for Variable Exponents (f(x)g(x)f(x)^{g(x)})

  • Cue: "Differentiate y=xxy = x^x."
  • Attack:
    1. Take natural log: ln⁡y=xln⁡x\ln y = x \ln x.
    2. Implicit differentiation: 1yy′=1⋅ln⁡x+x⋅1x=ln⁡x+1\frac{1}{y} y' = 1 \cdot \ln x + x \cdot \frac{1}{x} = \ln x + 1.
    3. Multiply by yy: y′=xx(ln⁡x+1)y' = x^x (\ln x + 1).

Shape 6: Linear Approximation via Differentials

  • Cue: "Use linear approximation to estimate 4.08\sqrt{4.08}."
  • Attack:
    1. f(x)=xf(x) = \sqrt{x}, anchor point a=4a = 4, Δx=0.08\Delta x = 0.08.
    2. f(4)=2f(4) = 2, f′(x)=12x  ⟹  f′(4)=14=0.25f'(x) = \frac{1}{2\sqrt{x}} \implies f'(4) = \frac{1}{4} = 0.25.
    3. L(4.08)=f(4)+f′(4)Δx=2+0.25(0.08)=2.02L(4.08) = f(4) + f'(4)\Delta x = 2 + 0.25(0.08) = \mathbf{2.02}.

Shape 7: Evaluating Indeterminate Limits via L'Hôpital's Rule

  • Cue: "Evaluate lim⁡x→0ex−1−xx2\lim_{x \to 0} \frac{e^x - 1 - x}{x^2}."
  • Attack: Form is 00\frac{0}{0}. Differentiate top and bottom: lim⁡x→0ex−12x(00)  ⟹  lim⁡x→0ex2=12\lim_{x \to 0} \frac{e^x - 1}{2x} \quad \left(\frac{0}{0}\right) \implies \lim_{x \to 0} \frac{e^x}{2} = \mathbf{\frac{1}{2}}

Shape 8: Corner and Vertical Tangent Testing

  • Cue: "Is f(x)=x1/3f(x) = x^{1/3} differentiable at x=0x = 0?"
  • Attack: f′(0)=lim⁡h→0h1/3−0h=lim⁡h→01h2/3=+∞f'(0) = \lim_{h \to 0} \frac{h^{1/3} - 0}{h} = \lim_{h \to 0} \frac{1}{h^{2/3}} = +\infty The limit is infinite. Thus, the curve has a vertical tangent, and ff is not differentiable at 00.

7. Interactive Verification & Attempt-First Self-Checks

1

Question 1

Type: MCQ | Marks: 1 | Topic: Continuity vs differentiability of piecewise functions
Consider the piecewise function: f(x)={3x2+1x<212x−11x≥2f(x) = \begin{cases} 3x^2 + 1 & x < 2 \\ 12x - 11 & x \ge 2 \end{cases}
Which of the following statements is true regarding f(x)f(x) at x=2x = 2?
MCQ
Continuity vs differentiability of piecewise functions
3 Unit Assessment
A
f(x)f(x) is continuous at x=2x = 2, but not differentiable at x=2x = 2.
B
f(x)f(x) is both continuous and differentiable at x=2x = 2.
C
f(x)f(x) is differentiable at x=2x = 2, but not continuous at x=2x = 2.
D
f(x)f(x) is neither continuous nor differentiable at x=2x = 2.

2

Question 2

Type: MCQ | Marks: 1 | Topic: Horizontal tangent lines via quotient rule
If y=ln⁡xxy = \frac{\ln x}{x}, at what value of xx is the tangent line to the curve horizontal (y′=0y' = 0)?
MCQ
Horizontal tangent lines via quotient rule
3 Unit Assessment
A
x=1x = 1
B
x=ex = e
C
x=e2x = e^2
D
x=0x = 0

3

Question 3

Type: MCQ | Marks: 1 | Topic: Nested chain rule with trigonometric powers
What is the derivative of f(x)=sin⁡2(3x)f(x) = \sin^2(3x) with respect to xx?
MCQ
Nested chain rule with trigonometric powers
3 Unit Assessment
A
6sin⁡(3x)cos⁡(3x)6 \sin(3x) \cos(3x)
B
2sin⁡(3x)cos⁡(3x)2 \sin(3x) \cos(3x)
C
3sin⁡(3x)cos⁡(3x)3 \sin(3x) \cos(3x)
D
6cos⁡(3x)6 \cos(3x)

8. Next Action & Spacing Rail

  • Next Invariant Chapter: Proceed to Applications of Derivatives — Maxima, Minima & Tangents to use first and second derivative tests for curve sketching and optimization.
  • Data Science Optimization Connection: In BSMA1003 (Maths 2), you will extend this 1D derivative into partial derivatives and the gradient vector ∇f\nabla f, the mathematical foundation of training modern neural networks.
  • Flashcard Prompt: What are the three non-differentiable scenarios? (Sharp corner, vertical tangent, discontinuity).

Chapter provenance: authored 2026-09-12 to the layered-chapter standard (docs/roadmaps/2026-09-12-claude-content-ecosystem.md, syntax per docs/authoring/AUTHORING_COOKBOOK.md), scoped against the BSMA1001 syllabus vault and the imported 698 - Derivatives — Definition and Rules.md (untouched; this file is its new sibling).
Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.