Derivative from first principles — difference quotient definition
WHY do we even need this?
You already know how to find the slope of a straight line: pick two points, do "rise over run." Easy.
But a curve like has a different steepness at every point. The slope at is gentle; at it's steep. "Rise over run" needs two points — so how do we measure the slope at one point?
WHAT is the difference quotient?
- Numerator = the rise (change in output).
- Denominator = the run (change in input).

HOW to compute it — the algorithm
Worked Example 1 —
Goal: find from first principles.
Step 1 — write . Why this step? We must know the output at the nearby point before we can compare.
Step 2 — numerator. Why this step? The terms cancel — this cancellation is why a finite slope exists.
Step 3 — divide by , factor & cancel. Why this step? Factoring out removes the problem. Now the expression is safe at .
Step 4 — take the limit. Why this step? As the leftover vanishes. Answer: .
Sanity check: at , slope (steep); at , slope (the bottom of the parabola is flat). ✓
Worked Example 2 —
Step 1. .
Step 2 — numerator (common denominator). Why this step? Subtracting fractions needs a common denominator — this surfaces the hidden .
Step 3 — divide by . Why this step? The cancels, killing the .
Step 4 — limit. Answer: . (Always negative — always slopes downward where defined.) ✓
Worked Example 3 — (the "conjugate" trick)
Step 1–2. — looks stuck, no to factor.
The move: multiply by the conjugate .
=\frac{(x+h)-x}{h\big(\sqrt{x+h}+\sqrt{x}\big)}=\frac{h}{h(\cdots)}$$ *Why this step?* $(\sqrt a-\sqrt b)(\sqrt a+\sqrt b)=a-b$ — this *manufactures* an $h$ in the numerator so it can cancel. **Step 3–4.** $$=\frac{1}{\sqrt{x+h}+\sqrt{x}}\ \xrightarrow{h\to 0}\ \frac{1}{2\sqrt{x}}$$ **Answer: $f'(x)=\dfrac{1}{2\sqrt{x}}$.** ✓ --- ## Forecast-then-Verify > [!example] Predict before you compute > Before reading the answer: for $f(x)=3x+5$ (a straight line), **forecast** $f'(x)$. > **Forecast:** the slope is constant $=3$. > **Verify:** $\dfrac{[3(x+h)+5]-[3x+5]}{h}=\dfrac{3h}{h}=3 \to 3$. ✓ A line's "first-principles" slope is just its slope. > [!mistake] Steel-man: "$f'$ is the value of $f$, just smaller." > It *feels* right because differentiating $x^2$ gave $2x$ which looks "related." **But** the derivative measures **rate of change**, not size. $f(10)=100$ while $f'(10)=20$ — totally different things. **Fix:** always read $f'$ as "slope / how fast," never "a shrunk copy of $f$." > [!mistake] Forgetting to substitute $x+h$ *everywhere*. > Students write $f(x+h)=x^2+h$ for $f(x)=x^2$. Wrong — every $x$ becomes $(x+h)$: $(x+h)^2$. **Fix:** treat $x+h$ as one block and expand carefully. --- ## #flashcards/maths What is the difference quotient of $f$? ::: $\dfrac{f(x+h)-f(x)}{h}$, the slope of the secant line. Define the derivative from first principles. ::: $f'(x)=\lim_{h\to0}\dfrac{f(x+h)-f(x)}{h}$ Why can't we set $h=0$ immediately in the difference quotient? ::: It gives $\tfrac{0}{0}$ (undefined); we must algebraically cancel $h$ first, then take the limit. Geometrically, what does the derivative equal? ::: The slope of the tangent line to the curve at that point. As $h\to 0$, the secant line becomes the ___ line. ::: tangent Derive $f'(x)$ for $f(x)=x^2$. ::: $\lim_{h\to0}\frac{2xh+h^2}{h}=\lim_{h\to0}(2x+h)=2x$ What trick handles $f(x)=\sqrt{x}$ from first principles? ::: Multiply by the conjugate $\sqrt{x+h}+\sqrt{x}$ to create an $h$ to cancel; answer $\frac{1}{2\sqrt x}$. Derivative of $1/x$ from first principles? ::: $-1/x^2$ What does the numerator $f(x+h)-f(x)$ represent? ::: The rise (change in output). --- > [!recall]- Feynman: explain to a 12-year-old > Imagine driving a car. Your **position** changes over time. To find your **speed at one exact instant**, you can't just look at a single clock-tick — speed needs a *change*. So you check where you were a tiny moment ago and where you are now, and divide distance by time. Make that "tiny moment" smaller and smaller, and the answer settles on your **exact speed right now**. The derivative is that settling-down number. For a curve, "speed" means "steepness" — and we measure it by picking a buddy point super close by, finding the slope of the line between them, then sliding the buddy in until they touch. > [!mnemonic] Remember the recipe > **"Plug, Subtract, Cancel, Shrink"** — **P**lug in $x+h$, **S**ubtract $f(x)$, **C**ancel the $h$, **S**hrink $h\to 0$. --- ## Connections - [[Limits — formal definition and one-sided limits]] — the derivative *is* a limit; this is its parent idea. - [[Indeterminate forms 0 over 0]] — explains *why* we must cancel before substituting. - [[Secant and Tangent lines]] — the geometric picture behind the algebra. - [[Power Rule]] — a shortcut proven *from* these first principles ($\frac{d}{dx}x^n=nx^{n-1}$). - [[Continuity and Differentiability]] — differentiable $\Rightarrow$ continuous, but not vice versa. - [[Average vs Instantaneous Rate of Change]] — secant = average, tangent = instantaneous. ## 🖼️ Concept Map ```mermaid flowchart TD SLOPE[Slope needs two points] CURVE[Curve has different slope everywhere] TRICK[Second point x plus h] DQ[Difference quotient] SECANT[Secant line slope] LIMIT[Take limit as h approaches 0] DERIV[Derivative f prime x] TANGENT[Tangent line slope] ZERO[Cannot set h=0 first gives 0/0] RECIPE[4-step recipe factor out h] SLOPE -->|fails on| CURVE CURVE -->|solved by| TRICK TRICK -->|forms| DQ DQ -->|measures| SECANT DQ -->|apply| LIMIT ZERO -->|forces| RECIPE RECIPE -->|cancels h then| LIMIT LIMIT -->|yields| DERIV DERIV -->|equals slope of| TANGENT SECANT -->|rotates into| TANGENT ``` ## 🔊 Hinglish (regional understanding) > [!intuition]- Hinglish mein samjho > Dekho, derivative ka matlab simple hai: kisi point par function **kitni tezi se change ho raha hai**, yaani uska slope. Straight line ka slope toh easy hai — "rise over run" — lekin curve (jaise $x^2$) ka slope har point pe alag hota hai. Toh problem ye hai ki ek single point pe slope kaise nikalein, jab slope ke liye do points chahiye? > > Trick ye hai: apne point $x$ ke pass ek doosra point lo, thoda sa door — $x+h$. In dono ke beech ki line (secant line) ka slope hota hai $\frac{f(x+h)-f(x)}{h}$. Ab $h$ ko chhota karte jao, aur chhota, $0$ ki taraf. Jaise jaise $h$ chhota hota hai, doosra point pehle wale ke upar aa jaata hai, aur secant line **tangent line** ban jaati hai. Us tangent ka slope hi derivative hai: $f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}$. > > Sabse important baat — **$h=0$ ko shuru mein hi mat daalo**, warna $\frac{0}{0}$ aa jaayega jo undefined hai. Pehle algebra karo: numerator expand karo, $h$ ko factor out karo, cancel karo, aur **tab** $h\to0$ lo. $x^2$ ke liye dekho: $(x+h)^2-x^2 = 2xh+h^2$, divide by $h$ gives $2x+h$, aur $h\to0$ pe answer $2x$. Bas yahi pura khel hai. > > Yaad rakho recipe: **Plug, Subtract, Cancel, Shrink**. Ye first-principles method hi hai jisse aage Power Rule, Product Rule sab prove hote hain — toh foundation strong rakho! ![[audio/4.1.10-Derivative-from-first-principles-—-difference-quotient-definition.mp3]]