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)=lim⁑hβ†’0f(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), yβ€²y'. Derivative at a point: fβ€²(a)=lim⁑xβ†’af(x)βˆ’f(a)xβˆ’af'(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^nnxnβˆ’1n x^{n-1}Power rule
exe^xexe^x
axa^xaxln⁑aa^x \ln aa>0a > 0
ln⁑x\ln x1x\frac{1}{x}x>0x > 0
log⁑ax\log_a x1xln⁑a\frac{1}{x \ln a}
sin⁑x\sin xcos⁑x\cos x
cos⁑x\cos xβˆ’sin⁑x-\sin x
tan⁑x\tan xsec⁑2x\sec^2 x
sec⁑x\sec xsec⁑xtan⁑x\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(fβˆ’g)β€²=fβ€²βˆ’gβ€²(f-g)' = f' - g'
Product(fg)β€²=fβ€²g+fgβ€²(fg)' = f'g + fg'(x2ex)β€²=2xex+x2ex(x^2 e^x)' = 2xe^x + x^2 e^x
Quotient(fg)β€²=fβ€²gβˆ’fgβ€²g2\left(\frac{f}{g}\right)' = \frac{f'g - fg'}{g^2}(xex)β€²=1β‹…exβˆ’xβ‹…exe2x\left(\frac{x}{e^x}\right)' = \frac{1\cdot e^x - x\cdot e^x}{e^{2x}}
Chain(f∘g)β€²=fβ€²(g(x))β‹…gβ€²(x)(f \circ g)' = f'(g(x)) \cdot g'(x)(ex2)β€²=ex2β‹…2x(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=ex2β‹…2x\frac{d}{dx} e^{x^2} = e^{x^2} \cdot 2x
  • ddxln⁑(x2+1)=1x2+1β‹…2x=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(3x5βˆ’2x3+xβˆ’7)\frac{d}{dx}(3x^5 - 2x^3 + x - 7).
ddx(3x5βˆ’2x3+xβˆ’7)=15x4βˆ’6x2+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)=x2sin⁑xf(x) = x^2 \sin x.
fβ€²(x)=(2x)(sin⁑x)+(x2)(cos⁑x)=2xsin⁑x+x2cos⁑xf'(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(x2βˆ’2x+1)(x2+1)2=ex(xβˆ’1)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 ex2β‹…2xe^{x^2} \cdot 2x.
hβ€²(x)=cos⁑(ex2)β‹…ex2β‹…2x=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)(xβˆ’a)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.1β‰ˆ2.025Β (actualΒ β‰ˆ2.0249)\boxed{\sqrt{4.1} \approx 2.025 \ (\text{actual } \approx 2.0249)}

πŸ“ Key Formulas β€” Summary Table

RuleFormula
Definitionfβ€²(x)=lim⁑hβ†’0f(x+h)βˆ’f(x)hf'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}
Powerddxxn=nxnβˆ’1\frac{d}{dx}x^n = n x^{n-1}
Product(fg)β€²=fβ€²g+fgβ€²(fg)' = f'g + fg'
Quotient(f/g)β€²=fβ€²gβˆ’fgβ€²g2(f/g)' = \frac{f'g - fg'}{g^2}
Chain(f∘g)β€²=fβ€²(g(x))β‹…gβ€²(x)(f \circ g)' = f'(g(x)) \cdot g'(x)
Exponentialddxex=ex\frac{d}{dx} e^x = e^x , ddxax=axln⁑a\frac{d}{dx} a^x = a^x \ln a
Logddxln⁑x=1x\frac{d}{dx} \ln x = \frac{1}{x}
Sinddxsin⁑x=cos⁑x\frac{d}{dx} \sin x = \cos x
Cosddxcos⁑x=βˆ’sin⁑x\frac{d}{dx} \cos x = -\sin x
Linear approxL(x)=f(a)+fβ€²(a)(xβˆ’a)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)β€²=fβ€²gβ€²(fg)' = f'g' (wrong! This is not the product rule). Correct: (fg)β€²=fβ€²g+fgβ€²(fg)' = f'g + fg'.

Pitfall 3: Confusing Quotient Rule Order

Mistake: (f/g)β€²=fgβ€²βˆ’fβ€²gg2(f/g)' = \frac{fg' - f'g}{g^2} (swapped numerator order). Correct: (fg)β€²=fβ€²gβˆ’fgβ€²g2\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)=4x3βˆ’2x2+7xβˆ’5f(x) = 4x^3 - 2x^2 + 7x - 5.
fβ€²(x)=12x2βˆ’4x+7f'(x) = 12x^2 - 4x + 7
12x2βˆ’4x+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+2xβˆ’x2(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)4β‹…6x=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+3β‹…2x=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}.
e3xβ‹…3=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)=xeβˆ’xf(x) = xe^{-x}.
fβ€²(x)=eβˆ’x+x(βˆ’eβˆ’x)=eβˆ’x(1βˆ’x)f'(x) = e^{-x} + x(-e^{-x}) = e^{-x}(1-x) fβ€²(1)=eβˆ’1(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)=13xβˆ’2/3f'(x)=\frac{1}{3}x^{-2/3}, fβ€²(8)=13β‹…14=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 yβˆ’9=6(xβˆ’3)β€…β€ŠβŸΉβ€…β€Šy=6xβˆ’9y - 9 = 6(x-3) \implies y = 6x - 9
y=6xβˆ’9\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 ddxsin⁑xx\frac{d}{dx} \frac{\sin x}{x}.
Quotient: cos⁑xβ‹…xβˆ’sin⁑xβ‹…1x2=xcos⁑xβˆ’sin⁑xx2\frac{\cos x \cdot x - \sin x \cdot 1}{x^2} = \frac{x\cos x - \sin x}{x^2}
xcos⁑xβˆ’sin⁑xx2\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

No note selected

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