Limits and Derivatives • Topic 3 of 3

Derivatives from First Principles and Rules

The derivative of a function measures its instantaneous rate of change — the slope of the tangent to the curve at a point. It is defined as a limit of average rates of change, known as the first principle (or $ab\,initio$) definition:

$$f'(x) = \lim_{h \to 0}\dfrac{f(x + h) - f(x)}{h}$$

The quotient $\dfrac{f(x+h) - f(x)}{h}$ is the slope of the secant joining the points $(x,\, f(x))$ and $(x+h,\, f(x+h))$. As $h \to 0$ the second point slides towards the first, and the secant pivots into the tangent; its slope is the derivative.

Derivative at a point vs derivative as a function. Two related quantities share the name "derivative". The derivative at a point $a$ is a single number, the slope there:

$$f'(a) = \lim_{h \to 0}\dfrac{f(a + h) - f(a)}{h} = \lim_{x \to a}\dfrac{f(x) - f(a)}{x - a}$$

The derivative as a function, $f'(x)$, is the rule that returns that slope at every $x$. You differentiate once to get $f'(x)$, then substitute a value to read off $f'(a)$.

Derivatives from first principles. Applying the definition to the basic functions gives results worth knowing on sight:

Function $f(x)$Derivative $f'(x)$
$k$ (constant)$0$
$x^n$$n\,x^{n-1}$
$\sin x$$\cos x$
$\cos x$$-\sin x$
$\tan x$$\sec^2 x$
$\sec x$$\sec x \tan x$
$\csc x$$-\csc x \cot x$
$\cot x$$-\csc^2 x$
$e^x$$e^x$
$\ln x$$\dfrac{1}{x}$

The six trigonometric derivatives are easiest remembered in pairs: the three "co-" functions ($\cos$, $\csc$, $\cot$) all carry a minus sign, and each pair differs only by that sign and a swap of $\tan \leftrightarrow \cot$, $\sec \leftrightarrow \csc$.

Rules of differentiation. Once the basics are known, four rules let you combine them. For differentiable functions $u$ and $v$:

$$(u \pm v)' = u' \pm v' \qquad (k\,u)' = k\,u'$$
$$\textbf{Product rule: } (uv)' = u'\,v + u\,v'$$
$$\textbf{Quotient rule: } \left(\dfrac{u}{v}\right)' = \dfrac{u'\,v - u\,v'}{v^{2}}, \;\; v \ne 0$$

A frequent slip is to assume $(uv)' = u'v'$ — it is not. The product rule keeps both cross terms, and the quotient rule subtracts (order matters: it is $u'v - uv'$ on top, never the reverse). The product rule extends to three factors as $(uvw)' = u'vw + uv'w + uvw'$ — differentiate one factor at a time and add.

Deeper Insight — the derivative is a limit of slopes: Everything in this topic rests on one picture. The fraction $\dfrac{f(x+h)-f(x)}{h}$ is just "rise over run" between two points on the curve — an average rate of change across a step of width $h$. Shrinking $h$ towards zero is what converts that average into an instantaneous rate, and geometrically it is the secant line rotating until it rests as the tangent. This is also why first principles repeatedly throw up the standard limits of the previous topic: differentiating $\sin x$ forces $\lim_{h\to 0}\tfrac{\sin h}{h}=1$ to surface, and differentiating $e^x$ forces $\lim_{h\to 0}\tfrac{e^h-1}{h}=1$. The table of derivatives and the four rules are simply the compiled, reusable output of this limit process; understanding that they come from a limit — rather than appearing by decree — is what makes the whole of differential calculus cohere.

Secant line approaching the tangent as h shrinks to zero Secant → Tangent as h → 0 x x + h secant (slope = average rate) tangent slope of secant → f ′(x) as the gap h → 0 Product and quotient rule structure Two rules to keep straight PRODUCT(uv)′ = u′v + uv′ QUOTIENT(u/v)′ = (u′v − uv′)/v²
1
Worked Example
Find the derivative of $f(x) = x^2$ from first principles.
Solution
  1. Apply the definition: $f'(x) = \lim_{h \to 0}\dfrac{(x+h)^2 - x^2}{h}$.
  2. Expand the numerator: $(x+h)^2 - x^2 = x^2 + 2xh + h^2 - x^2 = 2xh + h^2$.
  3. $f'(x) = \lim_{h \to 0}\dfrac{2xh + h^2}{h} = \lim_{h \to 0}(2x + h)$.
  4. Let $h \to 0$: $f'(x) = 2x$.

Answer: $f'(x) = 2x$.

2
Worked Example
Find the derivative of $f(x) = \sin x$ from first principles.
Solution
  1. $f'(x) = \lim_{h \to 0}\dfrac{\sin(x+h) - \sin x}{h}$.
  2. Use $\sin(x+h) - \sin x = 2\cos\!\left(x + \dfrac{h}{2}\right)\sin\dfrac{h}{2}$.
  3. $f'(x) = \lim_{h \to 0}\cos\!\left(x + \dfrac{h}{2}\right)\cdot\dfrac{\sin(h/2)}{h/2}$.
  4. As $h \to 0$: $\dfrac{\sin(h/2)}{h/2} \to 1$ and $\cos\!\left(x+\dfrac{h}{2}\right) \to \cos x$.

Answer: $f'(x) = \cos x$.

3
Worked Example
Differentiate $y = 4x^3 - 7x^2 + 5x - 9$.
Solution
  1. Differentiate term by term using $(x^n)' = n\,x^{n-1}$ and the constant-multiple rule.
  2. $\dfrac{d}{dx}(4x^3) = 12x^2$, $\dfrac{d}{dx}(-7x^2) = -14x$, $\dfrac{d}{dx}(5x) = 5$, $\dfrac{d}{dx}(-9) = 0$.
  3. Add: $\dfrac{dy}{dx} = 12x^2 - 14x + 5$.

Answer: $\dfrac{dy}{dx} = 12x^2 - 14x + 5$.

4
Worked Example
Differentiate $y = x^2 \sin x$ using the product rule.
Solution
  1. Let $u = x^2$ and $v = \sin x$; then $u' = 2x$ and $v' = \cos x$.
  2. Product rule: $\dfrac{dy}{dx} = u'v + uv' = 2x\sin x + x^2\cos x$.

Answer: $\dfrac{dy}{dx} = 2x\sin x + x^2\cos x$.

5
Worked Example
Differentiate $y = \dfrac{\sin x}{x}$ using the quotient rule.
Solution
  1. Let $u = \sin x$ and $v = x$; then $u' = \cos x$ and $v' = 1$.
  2. Quotient rule: $\dfrac{dy}{dx} = \dfrac{u'v - uv'}{v^2} = \dfrac{x\cos x - \sin x}{x^2}$.

Answer: $\dfrac{dy}{dx} = \dfrac{x\cos x - \sin x}{x^2}$.

6
Worked Example
Find the slope of the tangent to $y = x^3$ at the point $x = 2$.
Solution
  1. The slope of the tangent is the derivative evaluated at the point.
  2. $\dfrac{dy}{dx} = 3x^2$.
  3. At $x = 2$: $3(2)^2 = 3 \times 4 = 12$.

Answer: The slope of the tangent at $x = 2$ is $12$.

7
Worked Example
Find the derivative of $f(x) = \dfrac{1}{x}$ from first principles.
Solution
  1. $f'(x) = \lim_{h \to 0}\dfrac{\frac{1}{x+h} - \frac{1}{x}}{h}$.
  2. Combine the numerator: $\dfrac{1}{x+h} - \dfrac{1}{x} = \dfrac{x - (x+h)}{x(x+h)} = \dfrac{-h}{x(x+h)}$.
  3. Divide by $h$: $\dfrac{-1}{x(x+h)}$.
  4. Let $h \to 0$: $\dfrac{-1}{x \cdot x} = -\dfrac{1}{x^2}$.

Answer: $f'(x) = -\dfrac{1}{x^2}$.

8
Worked Example
If $f(x) = 2x^2 - 3x + 4$, find $f'(1)$ using the derivative function.
Solution
  1. Differentiate: $f'(x) = 4x - 3$.
  2. Substitute the point $x = 1$.
  3. $f'(1) = 4(1) - 3 = 1$.

Answer: $f'(1) = 1$.

9
Worked Example
Differentiate $y = \tan x$ by writing it as $\dfrac{\sin x}{\cos x}$ and applying the quotient rule.
Solution
  1. Let $u = \sin x$, $v = \cos x$; then $u' = \cos x$, $v' = -\sin x$.
  2. Quotient rule: $\dfrac{dy}{dx} = \dfrac{u'v - uv'}{v^2} = \dfrac{\cos x \cos x - \sin x(-\sin x)}{\cos^2 x}$.
  3. Numerator $= \cos^2 x + \sin^2 x = 1$.
  4. So $\dfrac{dy}{dx} = \dfrac{1}{\cos^2 x} = \sec^2 x$.

Answer: $\dfrac{d}{dx}(\tan x) = \sec^2 x$.

10
Worked Example
Differentiate $y = e^x \cos x$ using the product rule.
Solution
  1. Let $u = e^x$ and $v = \cos x$; then $u' = e^x$ and $v' = -\sin x$.
  2. Product rule: $\dfrac{dy}{dx} = u'v + uv' = e^x \cos x + e^x(-\sin x)$.
  3. Factor $e^x$: $\dfrac{dy}{dx} = e^x(\cos x - \sin x)$.

Answer: $\dfrac{dy}{dx} = e^x(\cos x - \sin x)$.

11
Worked Example
Differentiate $y = \dfrac{2x + 1}{x - 1}$ using the quotient rule.
Solution
  1. Let $u = 2x + 1$, $v = x - 1$; then $u' = 2$, $v' = 1$.
  2. Quotient rule: $\dfrac{dy}{dx} = \dfrac{u'v - uv'}{v^2} = \dfrac{2(x-1) - (2x+1)(1)}{(x-1)^2}$.
  3. Numerator $= 2x - 2 - 2x - 1 = -3$.
  4. So $\dfrac{dy}{dx} = \dfrac{-3}{(x-1)^2}$.

Answer: $\dfrac{dy}{dx} = \dfrac{-3}{(x-1)^2}$.

12
Worked Example
Differentiate $f(x) = \sqrt{x}$ from first principles.
Solution
  1. $f'(x) = \lim_{h \to 0}\dfrac{\sqrt{x+h} - \sqrt{x}}{h}$; rationalise with the conjugate $\sqrt{x+h} + \sqrt{x}$.
  2. Numerator becomes $(x+h) - x = h$, so the expression is $\dfrac{h}{h\big(\sqrt{x+h} + \sqrt{x}\big)} = \dfrac{1}{\sqrt{x+h} + \sqrt{x}}$.
  3. Let $h \to 0$: $\dfrac{1}{\sqrt{x} + \sqrt{x}} = \dfrac{1}{2\sqrt{x}}$.

Answer: $f'(x) = \dfrac{1}{2\sqrt{x}}$.

Key Points

  • First principle: $f'(x) = \lim_{h \to 0}\dfrac{f(x+h) - f(x)}{h}$ — the limit of the secant slope.
  • The derivative at a point $f'(a)$ is a number; the derivative as a function $f'(x)$ is a rule — differentiate first, then substitute.
  • Key derivatives: $(x^n)' = n\,x^{n-1}$, $(e^x)' = e^x$, $(\ln x)' = \dfrac{1}{x}$, and constant $\to 0$.
  • The six trig derivatives: $(\sin x)' = \cos x$, $(\cos x)' = -\sin x$, $(\tan x)' = \sec^2 x$, $(\cot x)' = -\csc^2 x$, $(\sec x)' = \sec x\tan x$, $(\csc x)' = -\csc x\cot x$.
  • Product rule: $(uv)' = u'v + uv'$ — never $u'v'$; for three factors, $(uvw)' = u'vw + uv'w + uvw'$.
  • Quotient rule: $\left(\dfrac{u}{v}\right)' = \dfrac{u'v - uv'}{v^2}$ — order on top matters.
  • The derivative at a point is the slope of the tangent (instantaneous rate of change) there.
Tap an option to check your answer0 / 4
Q1.The derivative of $f$ at $x$ is:
Explanation: First-principles definition.
Q2.$\dfrac{d}{dx}(x^n)=$
Explanation: Power rule.
Q3.$\dfrac{d}{dx}(\sin x)=$
Explanation: Standard derivative.
Q4.$\dfrac{d}{dx}(c)=$ (constant $c$):
Explanation: Derivative of a constant is $0$.