Skip to main content

Subsection 2.2.2 Back to Computing Some Derivatives

At this point we could try to start working out how derivatives interact with arithmetic and make an “Arithmetic of derivatives” theorem just like the one we saw for limits (Theorem 1.4.3). We will get there shortly, but before that it is important that we become more comfortable with computing derivatives using limits and then understanding what the derivative actually means. So — more examples.

Compute the derivative, \(f'(a)\text{,}\) of the function \(f(x)=\sqrt{x}\) at the point \(x=a\) for any \(a \gt 0\text{.}\)

  • So again we start with the definition of derivative and go from there:
    \begin{align*} f'(a) &=\lim_{x\rightarrow a}\frac{f(x)-f(a)}{x-a} =\lim_{x\rightarrow a}\frac{\sqrt{x}-\sqrt{a}}{x-a} \end{align*}
  • As \(x\) tends to \(a\text{,}\) the numerator and denominator both tend to zero. But \(\tfrac{0}{0}\) is not defined. So to get a well defined limit we need to exhibit a cancellation between the numerator and denominator — just as we saw in Examples 1.4.12 and 1.4.17. Now there are two equivalent ways to proceed from here, both based on a similar “trick”.
  • For the first, review Example 1.4.17, which concerned taking a limit involving square-roots, and recall that we used “multiplication by the conjugate” there:
    \begin{align*} \amp\frac{\sqrt{x}-\sqrt{a}}{x-a}\\ &= \frac{\sqrt{x}-\sqrt{a}}{x-a} \times \frac{\sqrt{x}+\sqrt{a}}{\sqrt{x}+\sqrt{a}} && \Big(\text{multiplication by $1=\frac{\text{conjugate}}{\text{conjugate}}$}\Big)\\ &=\frac{(\sqrt{x}-\sqrt{a})(\sqrt{x}+\sqrt{a})} {(x-a)(\sqrt{x}+\sqrt{a})}\\ &= \frac{x-a}{(x-a)(\sqrt{x}+\sqrt{a})} && \big(\text{since $(A-B)(A+B) = A^2-B^2$)}\,\big)\\ &= \frac{1}{\sqrt{x}+\sqrt{a}} \end{align*}
  • Alternatively, we can arrive at \(\frac{\sqrt{x}-\sqrt{a}}{x-a}=\frac{1}{\sqrt{x}+\sqrt{a}}\) by using almost the same trick to factor the denominator. Just set \(A=\sqrt{x}\) and \(B=\sqrt{a}\) in \(A^2 - B^2 = (A-B)(A+B) \) to get
    \begin{align*} x - a &= (\sqrt{x}-\sqrt{a})(\sqrt{x}+\sqrt{a}) \end{align*}
    and then substitute this little fact into our expression
    \begin{align*} \frac{\sqrt{x}-\sqrt{a}}{x-a} &=\frac{\sqrt{x}-\sqrt{a}}{(\sqrt{x}-\sqrt{a})(\sqrt{x}+\sqrt{a})} & \text{(now cancel common factors)}\\ &=\frac{1}{(\sqrt{x}+\sqrt{a})} \end{align*}
  • Once we know that \(\frac{\sqrt{x}-\sqrt{a}}{x-a}=\frac{1}{\sqrt{x}+\sqrt{a}}\text{,}\) we can take the limit we need:
    \begin{align*} f'(a) &=\lim_{x\rightarrow a}\frac{\sqrt{x}-\sqrt{a}}{x-a}\\ & =\lim_{x\rightarrow a}\frac{1}{\sqrt{x}+\sqrt{a}}\\ & =\frac{1}{2\sqrt{a}} \end{align*}
  • We should think about the domain of \(f'\) here — that is, for which values of \(a\) is \(f'(a)\) defined? The original function \(f(x)\) was defined for all \(x \geq 0\text{,}\) however the derivative \(f'(a)=\frac{1}{2\sqrt{a}}\) is undefined at \(a = 0\text{.}\)

    If we draw a careful picture of \(\sqrt{x}\) around \(x=0\) we can see why this has to be the case. The figure below shows three different tangent lines to the graph of \(y=f(x)=\sqrt{x}\text{.}\) As the point of tangency moves closer and closer to the origin, the tangent line gets steeper and steeper. The slope of the tangent line at \(\big(a,\sqrt{a}\big)\) blows up as \(a\to 0\text{.}\)

Compute the derivative, \(f'(a)\text{,}\) of the function \(f(x)=|x|\) at the point \(x=a\text{.}\)

  • We should start this example by recalling the definition of \(|x|\) (we saw this back in Example 1.5.6):

    \begin{align*} |x| &= \begin{cases} -x & \text{ if } x \lt 0\\ 0 & \text{ if } x=0\\ x & \text{ if }x \gt 0. \end{cases} \end{align*}

    It is definitely not just “chop off the minus sign”.

  • This breaks our computation of the derivative into 3 cases depending on whether \(x\) is positive, negative or zero.
  • Assume \(x \gt 0\text{.}\) Then
    \begin{align*} \diff{f}{x} &= \lim_{h\to0} \frac{f(x+h)-f(x)}{h}\\ &= \lim_{h\to0} \frac{|x+h|-|x|}{h}\\ \\ \end{align*}

    Since \(x \gt 0\) and we are interested in the behaviour of this function as \(h \to 0\) we can assume \(h\) is much smaller than \(x\text{.}\) This means \(x+h \gt 0\) and so \(|x+h|=x+h\text{.}\)

    \begin{align*} &= \lim_{h\to0} \frac{x+h-x}{h}\\ &= \lim_{h\to0} \frac{h}{h} = 1 &\text{as expected} \end{align*}
  • Assume \(x \lt 0\text{.}\) Then
    \begin{align*} \diff{f}{x} &= \lim_{h\to0} \frac{f(x+h)-f(x)}{h}\\ &= \lim_{h\to0} \frac{|x+h|-|x|}{h}\\ \\ \end{align*}

    Since \(x \lt 0\) and we are interested in the behaviour of this function as \(h \to 0\) we can assume \(h\) is much smaller than \(x\text{.}\) This means \(x+h \lt 0\) and so \(|x+h|=-(x+h)\text{.}\)

    \begin{align*} &= \lim_{h\to0} \frac{-(x+h)-(-x)}{h}\\ &= \lim_{h\to0} \frac{-h}{h} = -1 \end{align*}
  • When \(x=0\) we have
    \begin{align*} f'(0) &= \lim_{h\to0} \frac{f(0+h)-f(0)}{h}\\ &= \lim_{h\to0} \frac{|0+h|-|0|}{h}\\ &= \lim_{h\to0} \frac{|h|}{h} \end{align*}
    To proceed we need to know if \(h \gt 0\) or \(h \lt 0\text{,}\) so we must use one-sided limits. The limit from above is:
    \begin{align*} \lim_{h \to 0^+} \frac{|h|}{h} &= \lim_{h \to 0^+} \frac{h}{h} &\text{since } h \gt 0, |h|=h\\ &= 1\\ \end{align*}

    Whereas, the limit from below is:

    \begin{align*} \lim_{h \to 0^-} \frac{|h|}{h} &= \lim_{h \to 0^-} \frac{-h}{h} &\text{since } h \lt 0, |h|= -h\\ &= -1 \end{align*}
    Since the one-sided limits differ, the limit as \(h\to 0\) does not exist. And thus the derivative does not exist as \(x=0\text{.}\)

In summary:

\begin{align*} \diff{}{x} |x| &= \begin{cases} -1 & \text{if } x \lt 0 \\ DNE & \text{if } x=0 \\ 1 & \text{if } x \gt 0 \end{cases} \end{align*}