Quiz 2
Registry Synced

Derivatives — Definition and Rules

1200 words
6 min read

Reading compass

Now · 🎯 Learning Objectives

Derivatives — Definition and Rules

🎯 Learning Objectives

By the end of this topic, you will be able to:
  1. Define the derivative as the limit of the difference quotient
  2. Apply power, product, quotient, and chain rules
  3. Find derivatives of exponential, logarithmic, and trigonometric functions
  4. Use L'Hôpital's rule for limit evaluation
  5. Compute linear approximations using tangent lines

📋 Prerequisites


📖 Core Content

13.1 Intuition: Instantaneous Rate of Change

The derivative is the instantaneous rate of change — it tells you how fast a quantity is changing at exactly one moment. If distance s(t)s(t) describes a car's position, s(t)s'(t) is the speedometer reading at time tt. Geometrically, the derivative at x=ax = a is the slope of the tangent line to the curve y=f(x)y = f(x) at that point.
💡 Why this matters: Derivatives are the mathematical language of change. In ML, gradient descent uses derivatives to minimize loss functions. In physics, derivatives give velocity and acceleration.

13.2 Definition

f(x)=limh0f(x+h)f(x)hf'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}
Alternative notation: dydx\frac{dy}{dx}, ddxf(x)\frac{d}{dx}f(x), y˙\dot{y} (Newton), f(x)f'(x), yy'. Derivative at a point: f(a)=limxaf(x)f(a)xaf'(a) = \lim_{x \to a} \frac{f(x) - f(a)}{x - a} (Diagram)

13.3 Basic Derivatives

f(x)f(x)f(x)f'(x)Notes
cc (constant)00
xnx^nnxn1n x^{n-1}Power rule
exe^xexe^x
axa^xaxlnaa^x \ln aa>0a > 0
lnx\ln x1x\frac{1}{x}x>0x > 0
logax\log_a x1xlna\frac{1}{x \ln a}
sinx\sin xcosx\cos x
cosx\cos xsinx-\sin x
tanx\tan xsec2x\sec^2 x
secx\sec xsecxtanx\sec x \tan x

13.4 Differentiation Rules

RuleFormulaExample
Constant multiple(cf)=cf(cf)' = cf'(3x2)=6x(3x^2)' = 6x
Sum(f+g)=f+g(f+g)' = f' + g'(x2+x)=2x+1(x^2 + x)' = 2x + 1
Difference(fg)=fg(f-g)' = f' - g'
Product(fg)=fg+fg(fg)' = f'g + fg'(x2ex)=2xex+x2ex(x^2 e^x)' = 2xe^x + x^2 e^x
Quotient(fg)=fgfgg2\left(\frac{f}{g}\right)' = \frac{f'g - fg'}{g^2}(xex)=1exxexe2x\left(\frac{x}{e^x}\right)' = \frac{1\cdot e^x - x\cdot e^x}{e^{2x}}
Chain(fg)=f(g(x))g(x)(f \circ g)' = f'(g(x)) \cdot g'(x)(ex2)=ex22x(e^{x^2})' = e^{x^2} \cdot 2x

13.4.1 Chain Rule — The "Outside-Inside" Rule

ddxf(g(x))=f(g(x))g(x)\frac{d}{dx} f(g(x)) = f'(g(x)) \cdot g'(x)
Intuition: Differentiate the outside function (keeping the inside unchanged), then multiply by the derivative of the inside. Examples:
  • ddxsin(3x)=cos(3x)3=3cos(3x)\frac{d}{dx} \sin(3x) = \cos(3x) \cdot 3 = 3\cos(3x)
  • ddxex2=ex22x\frac{d}{dx} e^{x^2} = e^{x^2} \cdot 2x
  • ddxln(x2+1)=1x2+12x=2xx2+1\frac{d}{dx} \ln(x^2 + 1) = \frac{1}{x^2+1} \cdot 2x = \frac{2x}{x^2+1}

13.5 Worked Examples

Example 1.1 (Power rule): Find ddx(3x52x3+x7)\frac{d}{dx}(3x^5 - 2x^3 + x - 7).
ddx(3x52x3+x7)=15x46x2+1\frac{d}{dx}(3x^5 - 2x^3 + x - 7) = 15x^4 - 6x^2 + 1
Example 1.2 (Product rule): Find f(x)f'(x) for f(x)=x2sinxf(x) = x^2 \sin x.
f(x)=(2x)(sinx)+(x2)(cosx)=2xsinx+x2cosxf'(x) = (2x)(\sin x) + (x^2)(\cos x) = 2x \sin x + x^2 \cos x
Example 1.3 (Quotient rule): Find g(x)g'(x) for g(x)=exx2+1g(x) = \frac{e^x}{x^2 + 1}.
g(x)=ex(x2+1)ex(2x)(x2+1)2=ex(x22x+1)(x2+1)2=ex(x1)2(x2+1)2g'(x) = \frac{e^x(x^2+1) - e^x(2x)}{(x^2+1)^2} = \frac{e^x(x^2 - 2x + 1)}{(x^2+1)^2} = \frac{e^x(x-1)^2}{(x^2+1)^2}
Example 1.4 (Chain rule): Find h(x)h'(x) for h(x)=sin(ex2)h(x) = \sin(e^{x^2}). Outside: sin\sin, derivative cos(ex2)\cos(e^{x^2}). Inside: ex2e^{x^2}, derivative ex22xe^{x^2} \cdot 2x.
h(x)=cos(ex2)ex22x=2xex2cos(ex2)h'(x) = \cos(e^{x^2}) \cdot e^{x^2} \cdot 2x = 2x e^{x^2} \cos(e^{x^2})

13.6 Linear Approximation

The tangent line at x=ax = a approximates f(x)f(x) near aa:
L(x)=f(a)+f(a)(xa)L(x) = f(a) + f'(a)(x - a)
Example: Approximate 4.1\sqrt{4.1}. f(x)=xf(x) = \sqrt{x}, a=4a = 4. f(4)=2f(4) = 2, f(4)=124=14f'(4) = \frac{1}{2\sqrt{4}} = \frac{1}{4}. L(4.1)=2+14(0.1)=2+0.025=2.025L(4.1) = 2 + \frac{1}{4}(0.1) = 2 + 0.025 = 2.025
4.12.025 (actual 2.0249)\boxed{\sqrt{4.1} \approx 2.025 \ (\text{actual } \approx 2.0249)}

📐 Key Formulas — Summary Table

RuleFormula
Definitionf(x)=limh0f(x+h)f(x)hf'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}
Powerddxxn=nxn1\frac{d}{dx}x^n = n x^{n-1}
Product(fg)=fg+fg(fg)' = f'g + fg'
Quotient(f/g)=fgfgg2(f/g)' = \frac{f'g - fg'}{g^2}
Chain(fg)=f(g(x))g(x)(f \circ g)' = f'(g(x)) \cdot g'(x)
Exponentialddxex=ex\frac{d}{dx} e^x = e^x , ddxax=axlna\frac{d}{dx} a^x = a^x \ln a
Logddxlnx=1x\frac{d}{dx} \ln x = \frac{1}{x}
Sinddxsinx=cosx\frac{d}{dx} \sin x = \cos x
Cosddxcosx=sinx\frac{d}{dx} \cos x = -\sin x
Linear approxL(x)=f(a)+f(a)(xa)L(x) = f(a) + f'(a)(x-a)

⚠️ Common Pitfalls

Pitfall 1: Forgetting the Chain Rule

Mistake: ddxsin(5x)=cos(5x)\frac{d}{dx} \sin(5x) = \cos(5x) (missing the 55 from the chain rule). Correct: ddxsin(5x)=cos(5x)5=5cos(5x)\frac{d}{dx} \sin(5x) = \cos(5x) \cdot 5 = 5\cos(5x).

Pitfall 2: Misapplying the Product Rule

Mistake: (fg)=fg(fg)' = f'g' (wrong! This is not the product rule). Correct: (fg)=fg+fg(fg)' = f'g + fg'.

Pitfall 3: Confusing Quotient Rule Order

Mistake: (f/g)=fgfgg2(f/g)' = \frac{fg' - f'g}{g^2} (swapped numerator order). Correct: (fg)=fgfgg2\left(\frac{f}{g}\right)' = \frac{f'g - fg'}{g^2}. Memory aid: "Low d-high minus high d-low, square the low."

📝 Practice Questions

Q1: Find f(x)f'(x) for f(x)=4x32x2+7x5f(x) = 4x^3 - 2x^2 + 7x - 5.
f(x)=12x24x+7f'(x) = 12x^2 - 4x + 7
12x24x+7\boxed{12x^2 - 4x + 7} Q2: Find g(x)g'(x) for g(x)=x2exg(x) = x^2 e^x.
Product rule: g=2xex+x2ex=xex(2+x)g' = 2xe^x + x^2 e^x = xe^x(2 + x)
xex(x+2)\boxed{xe^x(x+2)} Q3: Find ddxx2x+1\frac{d}{dx} \frac{x^2}{x+1}.
Quotient rule: 2x(x+1)x2(1)(x+1)2=2x2+2xx2(x+1)2=x2+2x(x+1)2\frac{2x(x+1) - x^2(1)}{(x+1)^2} = \frac{2x^2+2x-x^2}{(x+1)^2} = \frac{x^2+2x}{(x+1)^2}
x(x+2)(x+1)2\boxed{\frac{x(x+2)}{(x+1)^2}} Q4: Find h(x)h'(x) for h(x)=(3x2+1)5h(x) = (3x^2 + 1)^5.
Chain rule: 5(3x2+1)46x=30x(3x2+1)45(3x^2+1)^4 \cdot 6x = 30x(3x^2+1)^4
30x(3x2+1)4\boxed{30x(3x^2+1)^4} Q5: Find ddxln(x2+3)\frac{d}{dx} \ln(x^2+3).
1x2+32x=2xx2+3\frac{1}{x^2+3} \cdot 2x = \frac{2x}{x^2+3}
2xx2+3\boxed{\frac{2x}{x^2+3}} Q6: Find ddxe3x\frac{d}{dx} e^{3x}.
e3x3=3e3xe^{3x} \cdot 3 = 3e^{3x}
3e3x\boxed{3e^{3x}} Q7: Find ddxsin(2x)\frac{d}{dx} \sin(2x).
cos(2x)2=2cos(2x)\cos(2x) \cdot 2 = 2\cos(2x)
2cos(2x)\boxed{2\cos(2x)} Q8: Find f(1)f'(1) if f(x)=xexf(x) = xe^{-x}.
f(x)=ex+x(ex)=ex(1x)f'(x) = e^{-x} + x(-e^{-x}) = e^{-x}(1-x) f(1)=e1(0)=0f'(1) = e^{-1}(0) = 0
0\boxed{0} Q9: Approximate 8.13\sqrt[3]{8.1} using linear approximation.
f(x)=x3f(x) = \sqrt[3]{x}, a=8a=8, f(8)=2f(8)=2, f(x)=13x2/3f'(x)=\frac{1}{3}x^{-2/3}, f(8)=1314=112f'(8)=\frac{1}{3}\cdot\frac{1}{4}=\frac{1}{12} L(8.1)=2+112(0.1)=2+0.00833=2.00833L(8.1) = 2 + \frac{1}{12}(0.1) = 2 + 0.00833 = 2.00833
2.00833\boxed{2.00833} Q10: Find the equation of the tangent line to f(x)=x2f(x) = x^2 at x=3x=3.
f(3)=9f(3)=9, f(x)=2xf'(x)=2x, f(3)=6f'(3)=6 y9=6(x3)    y=6x9y - 9 = 6(x-3) \implies y = 6x - 9
y=6x9\boxed{y = 6x - 9} Q11: Find ddxcos(x3)\frac{d}{dx} \cos(x^3).
sin(x3)3x2=3x2sin(x3)-\sin(x^3) \cdot 3x^2 = -3x^2 \sin(x^3)
3x2sin(x3)\boxed{-3x^2 \sin(x^3)} Q12: Find ddxsinxx\frac{d}{dx} \frac{\sin x}{x}.
Quotient: cosxxsinx1x2=xcosxsinxx2\frac{\cos x \cdot x - \sin x \cdot 1}{x^2} = \frac{x\cos x - \sin x}{x^2}
xcosxsinxx2\boxed{\frac{x\cos x - \sin x}{x^2}}

🔗 Cross-References

Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.