14 Derivatives
Let \(f\) be a function and let \(x\) be a member of the domain of \(f\). Then the derivative of \(f\) at \(x\) is the
number \(f'(x)\), also written \(\frac {df}{dx}\), given by
\[f'(x)=\lim \limits _{h \longrightarrow 0} \frac {f(x+h)-f(x)}{h}\]
it can also be written \(\frac {df}{dx}\) or if \(y=f(x)\) then \(\frac {dy}{dx}\).
Find the derivative of the following using the definition of:
- (i).
- \(f(x)=\sqrt {x}\)
- (ii).
- \(f(x)=\sin x\)
By definition, \(f(x)=\lim \limits _{h \longrightarrow 0} \frac {f(x+h)-f(x)}{h}\)
- (i).
- \(f(x)=\sqrt {x}\) \begin {align*} f'(x) & = \lim _{h \longrightarrow 0} \frac {\sqrt {x+h}-\sqrt {x}}{h}\\\\ & = \lim _{h \longrightarrow 0} \frac {(\sqrt {x+h}-\sqrt {x})\quad (\sqrt {x+h}+\sqrt {x})}{h \quad (\sqrt {x+h}+\sqrt {x})}\\\\ & = \lim _{h \longrightarrow 0 } \frac {(\sqrt {x+h})^2-(\sqrt {x})^2}{h\quad (\sqrt {x+h}+\sqrt {x})}\\\\ & = \lim _{h \longrightarrow 0} \frac {x+h-x}{h(\sqrt {x+h}+\sqrt {x})}\\\\ & = \lim _{h \longrightarrow 0}\, \frac {1}{\sqrt {x+h}+\sqrt {x}}\\\\ f'(x) & = \frac {1}{2\sqrt {x}}\\\\ \end {align*}
- (ii).
- \(f(x)=\sin x\) \begin {align*} f'(x) & = \lim _{h \longrightarrow 0} \, \frac {\sin (x+h)-\sin x}{h}\\\\ & = \lim _{h \longrightarrow 0}\, \frac {\sin x\cos h+\cos x\sin h-\sin x}{h}\\\\ & = \lim _{h \longrightarrow 0}\,\frac {\sin x(\cos h -1)+\cos x\sin h}{h}\\\\ & = \lim _{h \longrightarrow 0}\, \frac {\sin x (\cos h-1)}{h} + \lim _{h \longrightarrow 0} \, \frac {\cos x \sin h}{h}\\\\ & = \lim _{h \longrightarrow 0}\,\frac {- \sin x (1-\cos h)}{h} + \lim _{h \longrightarrow 0} \,\frac {\cos x \sin h}{h}\\\\ & = -\sin x \lim _{h \longrightarrow 0}\, \frac {(1-\cos h)}{h}+ \cos x \lim _{h \longrightarrow 0} \frac {\sin h}{h}\\\\ & = -\sin x (0) + \cos x (1)\\\\ f'(x) &=\cos x\\ \end {align*}
Finding the derivative of a function using the definition is called differentiating from the First
Principle.
\[f'(x)=\lim _{h \longrightarrow 0} \frac {f(x+h)-f(x)}{h}\]
Differentiating from the first principle.
Differentiate from the first principle
- 1.
- \(f(x)=\frac {1}{x}\)
- 2.
- \(f(x)=x\)
- 3.
- \(f(x)=x^2\)
- 4.
- \(f(x)=x^3\)
Solution. Each uses the same three steps: form \(f(x+h)\), subtract \(f(x)\), divide by \(h\) and simplify until \(h\) can safely be set to \(0\).
(i). \(f(x)=\frac {1}{x}\). \begin {align*} f'(x)&=\lim _{h\to 0}\frac {\frac {1}{x+h}-\frac {1}{x}}{h} =\lim _{h\to 0}\frac {\frac {x-(x+h)}{x(x+h)}}{h}\\ &=\lim _{h\to 0}\frac {-h}{h\,x(x+h)} =\lim _{h\to 0}\frac {-1}{x(x+h)}=-\frac {1}{x^{2}} . \end {align*}
(ii). \(f(x)=x\). Then \(f'(x)=\lim \limits _{h\to 0}\frac {(x+h)-x}{h}=\lim \limits _{h\to 0}\frac {h}{h}=1\).
(iii). \(f(x)=x^{2}\). \[f'(x)=\lim _{h\to 0}\frac {(x+h)^{2}-x^{2}}{h} =\lim _{h\to 0}\frac {2xh+h^{2}}{h}=\lim _{h\to 0}(2x+h)=2x .\]
(iv). \(f(x)=x^{3}\). Since \((x+h)^{3}=x^{3}+3x^{2}h+3xh^{2}+h^{3}\), \[f'(x)=\lim _{h\to 0}\frac {3x^{2}h+3xh^{2}+h^{3}}{h} =\lim _{h\to 0}\left (3x^{2}+3xh+h^{2}\right )=3x^{2} .\]
Note 14.4. In every case the \(h\) in the denominator cancelled against an \(h\) in the numerator, and only then could \(h=0\) be substituted. That cancellation is the whole technique: before it the quotient is \(\frac {0}{0}\) and says nothing, and it is legitimate because \(h\) is never actually zero during a limit — exactly the point made in the limits chapter.
Collecting the four answers alongside \(\sqrt {x}=x^{1/2}\) from the previous example: \[1,\ 2x,\ 3x^{2},\ -\frac {1}{x^{2}}=-1\cdot x^{-2},\ \frac {1}{2}x^{-1/2},\] which are \(nx^{n-1}\) for \(n=1,2,3,-1,\frac {1}{2}\). The power rule is not a separate fact to memorise; it is the pattern these calculations share, and once established it replaces them all.
Note 14.5. The limit need not exist. When it does, \(f\) is said to be differentiable at \(x\), and a differentiable function is automatically continuous there — but the converse fails. \(f(x)=\left |x\right |\) is continuous everywhere and has no derivative at \(0\), because the quotient tends to \(-1\) from the left and \(+1\) from the right. That is the corner met in the chapter on absolute-value graphs, and it is why the definition asks for a limit rather than assuming one exists.
Theorem 14.6 (Rules of differentiation). Let \(f\) and \(g\) be differentiable at \(x\) and let \(K\) be a constant. Then
- (a).
- \(\left (K f(x)\right )'=K f'(x)\);
- (b).
- \(\left (f(x)+g(x)\right )'=f'(x)+g'(x)\);
- (c).
- \(\frac {d}{dx}\left (x^{n}\right )=n x^{n-1}\) for any real \(n\).
\[\frac {d}{dx}(f+g) = \frac {df}{dx}+\frac {dg}{dx}\]
Note 14.7. Part (c) is the power rule, and it is used more than any other — every polynomial term is differentiated by it. It holds for negative and fractional \(n\) as well as positive integers, which is worth noticing: \(\frac {1}{x}=x^{-1}\) differentiates to \(-x^{-2}=-\frac {1}{x^{2}}\), and \(\sqrt {x}=x^{1/2}\) to \(\frac {1}{2}x^{-1/2}=\frac {1}{2\sqrt {x}}\) — exactly the answer obtained from first principles above, with far less work.
Parts (a) and (b) say differentiation is linear: constants pass through it and sums come apart. What it does not do is pass through products and quotients. \((fg)'\) is not \(f'g'\), and the correct rules are the subject of the sections below.
Solution.
We differentiate the individual terms and then add the derivatives \begin {align*} \frac {df}{dx} & = \frac {d(3x^5)}{dx}+\frac {d(-x^2)}{dx}+\frac {d(1/x)}{dx}+\frac {d(-\sin x)}{dx}\\\\ & = 3 (5x^4)-2x-\frac {1}{x^2}-\cos x\\\\ \therefore \quad f'(x) & = 15x^4-2x-\frac {1}{x^2}-\cos x\\ \end {align*}
| \(\underline {f(x)}\) | \(\underline {f'(x)}\) | ||||
| \(e^x\) | \(e^x\) | ||||
| \(\ln x\) | \(\frac {1}{x}\) | ||||
| \(\sin x\) | \(\cos x\) | ||||
| \(\cos x\) | \(-\sin x\) | ||||
| \(\tan x\) | \(\sec ^2x\) | ||||
| \(K\) (constant) | 0 |
Solution.
\(\frac {dy}{dx}=\frac {1}{2}\)
Find the equation of tangent to the curve \(y=\frac {1}{x}\) at the point \(\left (\frac {1}{2},2\right )\).
Solution.
Let \(y=mx+c\) be the tangent to \(y=\frac {1}{x}\) at \(\left (\frac {1}{2},2\right )\). Thus the gradient of the tangent to the curve at a given point is
equation to the gradient of curve at the point. But the gradient of the curve \(y=\frac {1}{x}\) is given by
\[\frac {dy}{dx}=\frac {-1}{x^2}\]
Thus \(m=\frac {dy}{dx}\) evaluate at \(x=\frac {1}{2}\)
\[\implies \quad m=\frac {-1}{(1/2)^2}=-4\]
Thus \(y=-4x+c\) is the tangent but we must find \(c\).
To find \(c\) we use the point \(\left (\frac {1}{2},2\right )\) on the line, i.e \(y=2\) when \(x=\frac {1}{2}\) \begin {align*} \implies \quad 2& = -4\left (\frac {1}{2}\right )+c\\ \implies \quad 2&=-2 +c\\ \implies \quad c&=4\\ \end {align*}
Therefore the equation of the tangent to \(y=\frac {1}{x}\) at the point \(\left (\frac {1}{2},2\right )\) is \[y=-4x+4\]
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.