Learn how to take a derivative of a function using first principles. Using this method is the best way to understand the concepts around differentiation.
Start here to really appreciate what you are doing when you differentiate, before you start differentiating using other methods in later modules.
Definition
The derivative of a function \(f\left(x\right)\) is denoted by \(f'\left(x\right)\) and is defined as \[ f'(x)=\lim_{h\rightarrow0}\frac{f(x+h)-f(x)}{h},h\text{$\neq$ }0. \] Using this definition is called differentiating from first principles.
The result \(f'\left(x\right)\), is called the derivative of \(f\left(x\right)\).
There are rules for differentiation that are far more convenient than using the definition above. In general, you should only use the first principles approach above if you are asked to. This module provides some examples on differentiation from first principles.
Example 1
If \(f\left(x\right)=x^{2},\) find the derivative of \(f\left(x\right)\) from first principles.
Solution
Using first principles,1 You need to know the identity \[\begin{align*} \left(a+b\right)^{2} & =a^{2}+2ab+b^{2} \end{align*}\] for this example. In general, you need to know a bit of algebra to do limits effectively.
Determine, from first principles, the gradient function for the curve \(f(x)=2x^{2}-x\) and calculate its value at \(x=3\).
Solution
Using first principles, \[\begin{align*} f'(x) & =\lim_{h\rightarrow0}\frac{f(x+h)-f(x)}{h}h\text{$\neq$ }0\\ & =\lim_{h\rightarrow0}\frac{2(x+h)^{2}-(x+h)-(2x^{2}-x)}{h}\\ & =\lim_{h\rightarrow0}\frac{2x^{2}+4xh+2h^{2}-x-h-2x^{2}+x)}{h}\\ & =\lim_{h\rightarrow0}\frac{4xh+2h^{2}-h)}{h}\\ & =\lim_{h\rightarrow0}4x+2h-1\\ & =4x-1. \end{align*}\]
The gradient function is \(f'(x)=4x-1.\) It’s value at \(x=3\) is \[\begin{align*} f'\left(3\right) & =4\left(3\right)-1\\ & =11. \end{align*}\] The value of the gradient function at \(x=3\) is \(11.\)
Example 3
Use differentiation from first principles to find the gradient function of \(y=\frac{1}{x}\).
Solution
Using first principles,
\[\begin{align*} f'(x) & =\lim_{h\rightarrow0}\frac{f(x+h)-f(x)}{h},h\text{$\neq$ }0\\ & =\lim_{h\rightarrow0}\frac{\frac{1}{x+h}-\frac{1}{x}}{h}\\ & =\lim_{h\rightarrow0}\frac{\frac{x}{x(x+h)}-\frac{x+h}{x(x+h)}}{h}\\ & =\lim_{h\rightarrow0}\frac{\frac{x-(x+h)}{x(x+h)}}{h}\\ & =\lim_{h\rightarrow0}\frac{\frac{-h}{x(x+h)}}{h}\\ & =\lim_{h\rightarrow0}\frac{-1}{x(x+h)}\\ & =\frac{-1}{x^{2}}. \end{align*}\] The gradient function of \(y=\frac{1}{x}\) is \(-\frac{1}{x^{2}}\). In this case we can write \[\begin{align*} \frac{dy}{dx} & =-\frac{1}{x^{2}}. \end{align*}\]
Exercises
Find the derivative of the following functions using differentiation from first principles.