Differentiation Refresher
First Principles reminder
\[
f'(x)
= \lim_{h \to 0}
\frac{f(x+h) - f(x)}{h}
\]
\[
\text{Sir Isaac Newton}
\]
\[
\frac{dy}{dx}
= \lim_{h \to 0}
\frac{f(x+h) - f(x)}{h}
\]
\[
\text{Baron Gottfried von Leibniz}
\]
\[
\text{If } f(x)=x^{n},
\]
\[
\text{then } f'(x)=n\,x^{\,n-1},
\]
\[
\text{where } n \text{ is a rational number.}
\]
Examples
\[
f(x) = 4t^{3}
\]
\[
f'(x) = 12t^{2}
\]
\[
f(x)=\frac{1}{x}=x^{-1}
\]
\[
f'(x) = -\,x^{-2}
\]
\[
= -\,\frac{1}{x^{2}}
\]
\[
f(x) = 7x^{4}
\]
\[
f'(x) = 28x^{3}
\]
\[
f(x)=\sqrt{x}=x^{1/2}
\]
\[
f'(x) = \tfrac{1}{2}x^{-1/2}
\]
\[
= \frac{1}{2\sqrt{x}}
\]
\[
\text{If } f(x)=a\,x^{n},
\]
\[
\text{then } f'(x)=a\,n\,x^{\,n-1},
\]
\[
\text{where } a \text{ is a constant,}
\]
\[
\text{and } n \text{ is a rational number.}
\]
Examples
\[
f(x) = 4x^{6}
\]
\[
f'(x) = 24x^{5}
\]
\[
f(x) = 3x^{7}
\]
\[
f'(x) = 21x^{6}
\]
\[
f(t) = 2t^{3}
\]
\[
f'(t) = 6t^{2}
\]
\[
f(x) = 4x^{a}
\]
\[
f'(x) = 4a\,x^{\,a-1}
\]
\[
f(x)=\frac{1}{3x^{2}}
=\frac{1}{3}\,x^{-2}
\]
\[
f'(x)= -\frac{2}{3}\,x^{-3}
\]
\[
= -\,\frac{2}{3x^{3}}
\]
\[
f(x) = 5x^{9}
\]
\[
f'(x) = 45x^{8}
\]
\[
\text{If } f(x)=g(x)+h(x),
\]
\[
\text{then } f'(x)=g'(x)+h'(x).
\]
Examples
\[
f(x)=4x^{6}+3x^{7}
\]
\[
f'(x)=24x^{5}+21x^{6}
\]
\[
=3x^{5}\,(8+7x)
\]
\[
f(t)=4t^{3}+4t^{4}
\]
\[
f'(t)=12t^{2}+16t^{3}
\]
\[
=4t^{2}\,(3+4t)
\]
\[
f(x) = (x+1)(x+3)
\]
\[
= x^{2} + 4x + 3
\]
\[
f'(x) = 2x + 4
\]
\[
f(x)=\frac{x^{2}+5x+1}{2\sqrt{x}}
\]
\[
= \tfrac12(x^{2}+5x+1)x^{-\tfrac12}
\]
\[
= \tfrac12\left(x^{\tfrac32}+5x^{\tfrac12}+x^{-\tfrac12}\right)
\]
\[
f'(x)
= \tfrac12\left(
\tfrac32 x^{\tfrac12}
+ \tfrac52 x^{-\tfrac12}
- \tfrac12 x^{-\tfrac32}
\right)
\]
\[
= \frac{3}{4}x^{\tfrac12}
+ \frac{5}{4}x^{-\tfrac12}
- \frac{1}{4}x^{-\tfrac32}
\]
\[
= \frac{3\sqrt{x}}{4}
+ \frac{5}{4\sqrt{x}}
- \frac{1}{4x^{\tfrac32}}
\]
\[
f(x)=2x^{2}-\frac{1}{9}x^{-2}
\]
\[
= 2x^{2} - \frac{1}{9x^{2}}
\]
\[
f'(x)
= 4x + \frac{2}{9}x^{-3}
\]
\[
= 4x + \frac{2}{9x^{3}}
\]
\[
f(x)=\frac{(x+2)^{2}}{x^{2}}
\]
\[
=\frac{x^{2}+4x+4}{x^{2}}
\]
\[
= 1 + 4x^{-1} + 4x^{-2}
\]
\[
f'(x)
= -4x^{-2} - 8x^{-3}
\]
\[
= -\frac{4}{x^{2}} - \frac{8}{x^{3}}
\]
\[
\text{If } f(x) = (x+a)^{\,n}
\]
\[
\text{then } f'(x) = n(x+a)^{\,n-1}
\]
\[
\text{where \(n\) is a rational number and \(a\) is real.}
\]
Examples
\[
f(x) = (x+5)^{7}
\]
\[
f'(x) = 7(x+5)^{6}
\]
\[
f(x)=\frac{1}{x+3}
\]
\[
= (x+3)^{-1}
\]
\[
f'(x)= -1\,(x+3)^{-2}
\]
\[
= -\,\frac{1}{(x+3)^{2}}
\]
\[
f(x)=\sqrt[5]{(x+3)^{2}}
\]
\[
= (x+3)^{2/5}
\]
\[
f'(x)=\frac{2}{5}(x+3)^{-3/5}
\]
\[
\text{If } f(x) = (ax + b)^{\,n}
\]
\[
\text{then } f'(x) = a n (ax + b)^{\,n-1}
\]
\[
\text{where \(n\) is a rational number and \(a\) is real.}
\]
\[
f(x) = (5x+5)^{7}
\]
\[
f'(x) = 35(5x+5)^{6}
\]
\[
f(x)=\frac{1}{3x+3}
\]
\[
= (3x+3)^{-1}
\]
\[
f'(x)= -3(3x+3)^{-2}
\]
\[
= -\,\frac{3}{(3x+3)^{2}}
\]
\[
f(x)=\sqrt[3]{(4x+3)^{2}}
\]
\[
= (4x+3)^{2/3}
\]
\[
f'(x)=\frac{8}{3}(4x+3)^{-1/3}
\]
\[
= \frac{8}{3(4x+3)^{1/3}}
\]
\[
h'(x)=g'\!\big(f(x)\big)\,\cdot\,f'(x)
\]
or in Leibniz notation:
\[
\frac{dy}{dx}
=
\frac{dy}{du}
\;\times\;
\frac{du}{dx}
\]
Example
\[
h(x)=\big(x^{9}+8x\big)^{3}
\]
\[
\text{Let } h(x)=g(f(x))
\]
\[
f(x)=x^{9}+8x
\qquad
g(x)=x^{3}
\]
\[
f'(x)=9x^{8}+8
\qquad
g'(x)=3x^{2}
\]
\[
h'(x)=g'\!\big(f(x)\big)\,\cdot\,f'(x)
\]
\[
h'(x)=3\big(x^{9}+8x\big)^{2}\,\big(9x^{8}+8\big)
\]
\[
\text{In Leibniz notation}
\]
\[
y = (x^{9} + 8x)^{3}
\]
\[
\text{Let } u = x^{9} + 8x
\qquad\text{then}\qquad
y = u^{3}
\]
\[
\frac{du}{dx} = 9x^{8} + 8
\qquad\qquad
\frac{dy}{du} = 3u^{2}
\]
\[
\frac{dy}{dx}
=
\frac{dy}{du}
\;\times\;
\frac{du}{dx}
\]
\[
= 3u^{2}\,(9x^{8}+8)
\]
\[
= 3(x^{9}+8x)^{2}\,(9x^{8}+8)
\]
\[
= 3(9x^{8}+8)\,(x^{9}+8x)^{2}
\]
Longer questions use a continuation:
\[
\frac{dy}{dx}
=
\frac{dy}{du}
\;\times\;
\frac{du}{dt}
\;\times\;
\frac{dt}{dx}
\]
Example
\[
\text{Differentiate } y = \sin^{3}(4x+5)
\]
\[
\text{Let } y = u^{3}, \qquad u = \sin t, \qquad t = 4x+5
\]
\[
\frac{dy}{du} = 3u^{2},
\qquad
\frac{du}{dt} = \cos t,
\qquad
\frac{dt}{dx} = 4
\]
\[
\frac{dy}{dx}
=
\frac{dy}{du}
\cdot
\frac{du}{dt}
\cdot
\frac{dt}{dx}
\]
\[
= 3u^{2} \cdot \cos t \cdot 4
\]
\[
= 12(\sin t)^{2}\cos(4x+5)
\]
\[
= 12\sin^{2}(4x+5)\cos(4x+5)
\]
Product Rule (Advanced Higher)
\[
\text{If } f(x)=g(x)\cdot h(x)
\]
\[
\text{then } f'(x)=g'(x)\,h(x)+g(x)\,h'(x)
\]
Examples
\[
f(x)=x^{3}\cos x
\]
\[
f'(x)=3x^{2}\cos x + x^{3}(-\sin x)
\]
\[
=3x^{2}\cos x - x^{3}\sin x
\]
\[
= x^{2}\big(3\cos x - x\sin x\big)
\]
\[
f(x)=(x+1)^{3}(x-1)^{2}
\]
\[
f'(x)=3(x+1)^{2}\cdot 1 \cdot (x-1)^{2}
\;+\;
(x+1)^{3}\cdot 2(x-1)\cdot 1
\]
\[
=3(x+1)^{2}(x-1)^{2}
\;+\;
2(x+1)^{3}(x-1)
\]
\[
= (x+1)(x-1)\Big[3(x+1)(x-1) + 2(x+1)^{2}\Big]
\]
\[
f(x)=x^{2}(x+1)^{3}(x-1)^{2}
\]
\[
f'(x)
=
2x\,(x+1)^{3}(x-1)^{2}
+
3(x+1)^{2}x^{2}(x-1)^{2}
+
2(x-1)x^{2}(x+1)^{3}
\]
\[
= (x+1)^{2}(x-1)\,x\,
\Big[
2(x+1)(x-1)
+
3x(x-1)
+
2x(x+1)
\Big]
\]
Don't forget the chain rule!
\[
f(x)=x^{2}(5x+1)^{3}(2x-1)^{2}
\]
\[
f'(x)
=
2x(5x+1)^{3}(2x-1)^{2}
+
3(5x+1)^{2}\cdot 5 \cdot x^{2}(2x-1)^{2}
+
2(2x-1)\cdot 2 \cdot x^{2}(5x+1)^{3}
\]
\[
=2x(5x+1)^{3}(2x-1)^{2}
+
15x^{2}(5x+1)^{2}(2x-1)^{2}
+
4(2x-1)x^{2}(5x+1)^{3}
\]
\[
=(5x+1)^{2}(2x-1)\,x\,
\Big[
2(5x+1)(2x-1)
+
15x(2x-1)
+
4x(5x+1)
\Big]
\]
Quotient Rule (Advanced Higher)
\[
\text{If } f(x)=\frac{g(x)}{h(x)}
\]
\[
\text{then }
f'(x)
=
\frac{g'(x)\,h(x)\;-\;g(x)\,h'(x)}
{\big(h(x)\big)^{2}}
\]
Example
\[
f(x)=\frac{x^{4}}{x+1}
\]
\[
f'(x)
=
\frac{4x^{3}(x+1)\;-\;x^{4}\cdot 1}{(x+1)^{2}}
\]
\[
=\frac{4x^{3}(x+1)-x^{4}}{(x+1)^{2}}
\]
\[
=\frac{4x^{4}+4x^{3}-x^{4}}{(x+1)^{2}}
\]
\[
=\frac{x^{3}(3x+4)}{(x+1)^{2}}
\]
\[
f(x)=\sin(ax)
\]
\[
f'(x)=a\cos(ax)
\]
\[
f(x)=\cos(ax)
\]
\[
f'(x)=-a\sin(ax)
\]
\[
f(x)=\tan(ax)
\]
\[
f'(x)=a\sec^{2}(ax)
\]
\[
f(x)=\cot(ax)
\]
\[
f'(x)=-a\,\csc^{2}(ax)
\]
\[
f(x)=\sec(ax)
\]
\[
f'(x)=a\,\sec(ax)\tan(ax)
\]
\[
f(x)=\csc(ax)
\]
\[
f'(x)=-a\,\csc(ax)\cot(ax)
\]
Examples
\[
f(x)=3\sin(2x)\Rightarrow f'(x)=6\cos(2x)
\]
\[
f(x)=5\sin(7x)\Rightarrow f'(x)=35\cos(7x)
\]
\[
f(x)=\tfrac12\sin(4x)\Rightarrow f'(x)=2\cos(4x)
\]
\[
f(x)=9\sin(0.3x)\Rightarrow f'(x)=2.7\cos(0.3x)
\]
\[
f(x)=-6\sin(5x)\Rightarrow f'(x)=-30\cos(5x)
\]
\[
f(x)=4\sin(3x+2)\Rightarrow f'(x)=12\cos(3x+2)
\]
\[
f(x)=4\cos(3x)\Rightarrow f'(x)=-12\sin(3x)
\]
\[
f(x)=7\cos(5x)\Rightarrow f'(x)=-35\sin(5x)
\]
\[
f(x)=2\cos(0.4x)\Rightarrow f'(x)=-0.8\sin(0.4x)
\]
\[
f(x)=10\cos(9x+1)\Rightarrow f'(x)=-90\sin(9x+1)
\]
\[
f(x)=-3\cos(6x)\Rightarrow f'(x)=18\sin(6x)
\]
\[
f(x)=8\cos(2x-4)\Rightarrow f'(x)=-16\sin(2x-4)
\]
\[
f(x)=2\tan(3x)\Rightarrow f'(x)=6\sec^{2}(3x)
\]
\[
f(x)=5\tan(4x)\Rightarrow f'(x)=20\sec^{2}(4x)
\]
\[
f(x)=\tfrac13\tan(9x)\Rightarrow f'(x)=3\sec^{2}(9x)
\]
\[
f(x)=7\tan(0.5x)\Rightarrow f'(x)=3.5\sec^{2}(0.5x)
\]
\[
f(x)=9\tan(2x+3)\Rightarrow f'(x)=18\sec^{2}(2x+3)
\]
\[
f(x)=-4\tan(8x)\Rightarrow f'(x)=-32\sec^{2}(8x)
\]
\[
f(x)=3\cot(2x)\Rightarrow f'(x)=-6\csc^{2}(2x)
\]
\[
f(x)=8\cot(5x)\Rightarrow f'(x)=-40\csc^{2}(5x)
\]
\[
f(x)=\tfrac12\cot(7x)\Rightarrow f'(x)=-3.5\csc^{2}(7x)
\]
\[
f(x)=6\cot(0.3x)\Rightarrow f'(x)=-1.8\csc^{2}(0.3x)
\]
\[
f(x)=10\cot(4x+1)\Rightarrow f'(x)=-40\csc^{2}(4x+1)
\]
\[
f(x)=-9\cot(11x)\Rightarrow f'(x)=99\csc^{2}(11x)
\]
\[
f(x)=2\sec(3x)\Rightarrow f'(x)=6\sec(3x)\tan(3x)
\]
\[
f(x)=5\sec(7x)\Rightarrow f'(x)=35\sec(7x)\tan(7x)
\]
\[
f(x)=\tfrac14\sec(8x)\Rightarrow f'(x)=2\sec(8x)\tan(8x)
\]
\[
f(x)=9\sec(0.6x)\Rightarrow f'(x)=5.4\sec(0.6x)\tan(0.6x)
\]
\[
f(x)=6\sec(4x+2)\Rightarrow f'(x)=24\sec(4x+2)\tan(4x+2)
\]
\[
f(x)=-3\sec(5x)\Rightarrow f'(x)=-15\sec(5x)\tan(5x)
\]
\[
f(x)=4\csc(3x)\Rightarrow f'(x)=-12\csc(3x)\cot(3x)
\]
\[
f(x)=7\csc(5x)\Rightarrow f'(x)=-35\csc(5x)\cot(5x)
\]
\[
f(x)=\tfrac12\csc(9x)\Rightarrow f'(x)=-4.5\csc(9x)\cot(9x)
\]
\[
f(x)=8\csc(0.4x)\Rightarrow f'(x)=-3.2\csc(0.4x)\cot(0.4x)
\]
\[
f(x)=10\csc(6x+1)\Rightarrow f'(x)=-60\csc(6x+1)\cot(6x+1)
\]
\[
f(x)=-5\csc(12x)\Rightarrow f'(x)=60\csc(12x)\cot(12x)
\]
Logarithms and Exponentials
\[
\text{If } f(x)=e^{x}
\]
\[
\text{then } f'(x)=e^{x}
\]
\[
\text{If } f(x)=e^{ax}
\]
\[
\text{then } f'(x)=a e^{ax}
\]
Examples
\[
1.\; f(x)=e^{3x}\Rightarrow f'(x)=3e^{3x}
\]
\[
2.\; f(x)=e^{7x}\Rightarrow f'(x)=7e^{7x}
\]
\[
3.\; f(x)=e^{0.5x}\Rightarrow f'(x)=0.5e^{0.5x}
\]
\[
4.\; f(x)=e^{-4x}\Rightarrow f'(x)=-4e^{-4x}
\]
\[
5.\; f(x)=e^{12x+3}\Rightarrow f'(x)=12e^{12x+3}
\]
\[
6.\; f(x)=e^{0.2x-5}\Rightarrow f'(x)=0.2e^{0.2x-5}
\]
\[
y = e^{9x^{2}}
\]
Differentiate using the chain rule:
\[
\frac{dy}{dx}
= e^{9x^{2}} \cdot \frac{d}{dx}(9x^{2})
\]
\[
\frac{dy}{dx}
= e^{9x^{2}} \cdot 18x
\]
\[
\frac{dy}{dx}
= 18x\,e^{9x^{2}}
\]
\[
y = e^{x}\cos x
\]
Differentiate using the product rule:
\[
\frac{dy}{dx}
= \frac{d}{dx}(e^{x})\cdot \cos x
\;+\;
e^{x}\cdot \frac{d}{dx}(\cos x)
\]
\[
\frac{dy}{dx}
= e^{x}\cos x
\;+\;
e^{x}(-\sin x)
\]
\[
\frac{dy}{dx}
= e^{x}(\cos x - \sin x)
\]
\[
\text{If } f(x)=\log_{e}(x)
\]
\[
\text{then } f'(x)=\frac{1}{x}
\]
\[
\text{If } f(x)=\log_{a}(x)
\]
\[
\text{then } f'(x)=\frac{1}{x\ln(a)}
\]
Examples
\[
y = \ln(5x^{2} - 6)
\]
Differentiate using the chain rule:
\[
\frac{dy}{dx}
= \frac{1}{5x^{2}-6} \cdot \frac{d}{dx}(5x^{2}-6)
\]
\[
\frac{dy}{dx}
= \frac{1}{5x^{2}-6} \cdot 10x
\]
\[
\frac{dy}{dx}
= \frac{10x}{5x^{2}-6}
\]
\[
y = \frac{\ln(\cos x)}{x^{2}}
\]
Use the quotient rule, and remember the chain rule for \(\ln(\cos x)\):
\[
\frac{dy}{dx}
= \frac{
\left(\frac{d}{dx}\ln(\cos x)\right)\cdot x^{2}
\;-\;
\ln(\cos x)\cdot \frac{d}{dx}(x^{2})
}{
x^{4}
}
\]
Differentiate each part:
\[
\frac{d}{dx}\ln(\cos x)
= \frac{1}{\cos x}\cdot(-\sin x)
= -\tan x
\]
\[
\frac{d}{dx}(x^{2}) = 2x
\]
Substitute:
\[
\frac{dy}{dx}
= \frac{
(-\tan x)\,x^{2}
\;-\;
2x\,\ln(\cos x)
}{
x^{4}
}
\]
Factor out \(x\):
\[
\frac{dy}{dx}
= \frac{
-x^{2}\tan x - 2x\ln(\cos x)
}{
x^{4}
}
\]
Simplify:
\[
\frac{dy}{dx}
= \frac{-x\tan x - 2\ln(\cos x)}{x^{3}}
\]
\[
y = (\ln x)^{2}\, e^{x}
\]
Differentiate using the product rule, and remember the chain rule for \((\ln x)^{2}\):
\[
\frac{dy}{dx}
= \frac{d}{dx}\big[(\ln x)^{2}\big]\cdot e^{x}
\;+\;
(\ln x)^{2}\cdot \frac{d}{dx}(e^{x})
\]
Differentiate each part:
\[
\frac{d}{dx}(\ln x)^{2}
= 2\ln x \cdot \frac{1}{x}
= \frac{2\ln x}{x}
\]
\[
\frac{d}{dx}(e^{x}) = e^{x}
\]
Substitute:
\[
\frac{dy}{dx}
= \frac{2\ln x}{x}e^{x}
\;+\;
(\ln x)^{2}e^{x}
\]
Factor out \(e^{x}\ln x\):
\[
\frac{dy}{dx}
= e^{x}\ln x\left(\frac{2}{x} + \ln x\right)
\]
\[
y = \frac{3\ln x}{3x + 2}
\]
Differentiate using the quotient rule:
\[
\frac{dy}{dx}
= \frac{
\left(\frac{d}{dx}(3\ln x)\right)(3x+2)
-
(3\ln x)\left(\frac{d}{dx}(3x+2)\right)
}{
(3x+2)^{2}
}
\]
Differentiate each part:
\[
\frac{d}{dx}(3\ln x)=\frac{3}{x}
\qquad\text{and}\qquad
\frac{d}{dx}(3x+2)=3
\]
Substitute:
\[
\frac{dy}{dx}
= \frac{
\frac{3}{x}(3x+2) - 3\ln x \cdot 3
}{
(3x+2)^{2}
}
\]
Expand the numerator:
\[
\frac{dy}{dx}
= \frac{
3(3x+2)/x - 9\ln x
}{
(3x+2)^{2}
}
\]
Combine into a single fraction:
\[
\frac{dy}{dx}
= \frac{
3(3x+2) - 9x\ln x
}{
x(3x+2)^{2}
}
\]
Differentiate \(a^x\)
\[
f(x)=a^{x}
\]
Rewrite using natural logs:
\[
a^{x}
= e^{\ln(a^{x})}
\]
\[
= e^{x\ln(a)}
\]
Let
\[
u = x\ln(a)
\]
Then
\[
y = e^{u}
\]
Differentiate each part:
\[
\frac{dy}{du} = e^{u}
\]
\[
\frac{du}{dx} = \ln(a)
\]
Chain rule:
\[
\frac{dy}{dx}
= \frac{dy}{du}\cdot \frac{du}{dx}
= e^{u}\,\ln(a)
\]
Substitute \(u = x\ln(a)\):
\[
\frac{dy}{dx}
= e^{x\ln(a)}\ln(a)
\]
Convert back to \(a^{x}\):
\[
\frac{dy}{dx}
= a^{x}\ln(a)
\]
Books
Printed resources available at Amazon
These notes are primarily designed for the SQA Higher Mathematics course.
- Derivative of \(f(x) = ax^n\)
- Sum Rule
- Derivative of \(f(x) = (x + a)^n\)
- Derivative of \(f(x) = (ax + b)^n\)
- The Chain Rule
- Trig functions
- Logarithms and exponentials
As an Amazon Associate I earn from qualifying purchases.