Chapter 5.8 Approximating Change
In this section, we learn about how to use describe change of a function. We extend the idea of a slope of a linear function to non-linear functions. We will discuss the construction of the exponential function by a sum.
Average Rate of Change
Our everyday observations of moving bodies gives us an intuition about the meaning of speed and velocity.
Conceptualizing these notions in a mathematical language is very challenging and was a great triumph of The Calculus.
A precise understanding of constant velocity and of constant speed is purely algebraic.
The goal is to extend these algebraic ideas to varying velocities and speeds, and this requires the principle of finite approximation.
Before moving on to study average velocity and average speed, it is useful to more generally consider the average rate of change of a function over an interval.
Average Rate of Change and Difference Quotient
Take \(f\) to be a real valued function on an interval \([a,b]\).
The average rate of change of \(f\) over \([a,b]\), \(f_{\rm ave}[a,b]\), is the difference quotient \[f_{\rm ave}[a,b] = \tfrac{f(b) - f(a)}{b-a}.\]
Calculate the average rate of change for the following functions.
Example 1
For each function \(f\) that is given below, determine the average rate of change of \(f\) on the intervals \([1,2]\):
\(f(x) = 2\);
\(f(x) = 3x+2\);
\(f(x) = 10x^2+6x+4\).
\[f_{\rm ave}[1,2] = \tfrac{f(2) - f(1)}{2-1}=\tfrac{2-2}{1}=0\]
\[f_{\rm ave}[1,2] = \tfrac{f(2) - f(1)}{2-1}=\tfrac{8-5}{1}=3\]
\[f_{\rm ave}[1,2] = \tfrac{f(2) - f(1)}{2-1}=\tfrac{56-20}{1}=36\]
The average rate of change of \(f\) on \([a,b]\) is the slope of this line that intersects \(f\) at \((a,f(a))\) and \((b,f(b))\):
The line that is sketched above is the secant line, the name comes from the Latin word “secare” which means “to cut”.
Recall that for any \(x_0\) and any \(h\) so that \(x_0\) and \(x_0+h\) are in \(\mathcal D(f)\), \[\Delta_{x_0}f(h) = f(x_0 +h) - f(x_0).\]
Take \(h\) to be the difference \(b-a\) and obtain the equality \[f_{\rm ave}[a,b] = \tfrac{1}{h}\Delta_{a}f(h).\]
Writing the difference quotient in this way and allowing \(h\) to be positive or negative gives an efficient way of expressing the average rate of change of \(f\) on any interval of length \(h\) that has \(a\) as an endpoint.
Example 2
For each function \(f\) and each \(x_0\) that is given below, determine the difference quotient \(\frac{1}{h}\Delta_{x_0}f(h)\) for each real number \(h\) and for these choices for \(f\) and \(x_0\):
- \(f(x) = 5x^2+x+1\), \(x_0 = 2\);
- \(f(x) = \frac{x^2 -1}{x+2}\), \(x_0 = 3\)
- \(f(x) = \sin(x)\), \(x_0 = \frac{\pi}{4}\).
Be sure to simplify the expressions for the above difference quotients as much as possible in order to more clearly see how the difference quotients behave as functions of \(h\).
Notice that \[\begin{align*} \Delta_{2}f(h)&=f(2+h)-f(2)\\ &=5(2+h)^2+(2+h)+1-23\\ &=5(4+4h+h^2)+(2+h)-22\\ &=20+20h+5h^2+2+h-22\\ &=5h^2+22h, \end{align*}\] so \[\frac{1}{h}\Delta_{2}f(h)=\tfrac{1}{h}(5h^2+22h)=5h+22.\]
Notice that \[\begin{align*} \Delta_{3}f(h)&=f(3+h)-f(3)\\ &=\tfrac{(3+h)^2-1}{3+h+2}-\tfrac{8}{5}\\ &=\tfrac{9+6h+h^2-1}{h+5}-\tfrac{8}{5}\\ &=\tfrac{h^2+6h+8}{h+5}-\tfrac{8}{5}\\ &=\tfrac{5(h^2+6h+8)}{5(h+5)}-\tfrac{8(h+5)}{5(h+5)}\\ &=\tfrac{5h^2+30h+40}{5(h+5)}-\tfrac{8h+40}{5(h+5)}\\ &=\tfrac{5h^2+30h+40-8h-40}{5(h+5)}\\ &=\tfrac{5h^2+22h}{5(h+5)}\\ &=h\tfrac{5h+22}{5(h+5)}\\ \end{align*}\] so \[\frac{1}{h}\Delta_{3}f(h)=\tfrac{1}{h}h\tfrac{5h+22}{5(h+5)}=\tfrac{5h+22}{5h+25}.\]
For the next problem, use the sum angle formula for sine.
- Notice that \[\begin{align*} \Delta_{\frac{\pi}{4}}f(h)&=f(\tfrac{\pi}{4}+h)-f(\tfrac{\pi}{4})\\ &=\sin(\tfrac{\pi}{4}+h)-\sin(\tfrac{\pi}{4})\\ &=\sin(\tfrac{\pi}{4}+h)-\tfrac{\sqrt{2}}{2}\\ &=\sin(\tfrac{\pi}{4})\cos(h)+\sin(h)\cos(\tfrac{\pi}{4})-\tfrac{\sqrt{2}}{2}\\ &=\tfrac{\sqrt{2}}{2}\cos(h)+\sin(h)\tfrac{\sqrt{2}}{2}-\tfrac{\sqrt{2}}{2}\\ \end{align*}\] so \[\frac{1}{h}\Delta_{\frac{\pi}{4}}f(h)=\tfrac{1}{h}\left(\tfrac{\sqrt{2}}{2}\cos(h)+\sin(h)\tfrac{\sqrt{2}}{2}-\tfrac{\sqrt{2}}{2}\right).\]
For any polynomial function \(f\), it is possible to write the difference quotient \(\frac{1}{h}\Delta_{x_0}f(h)\) as the sum of a constant that depends on \(x_0\) and a function that is \(O(h)\).
It is helpful to work through some examples before showing why this is true in general.
Example 3
For each polynomial function \(f\) and each \(x_0\) that are given below, determine the difference quotient \(\frac{1}{h}\Delta_{x_0}f(h)\) for each real number \(h\) where the difference quotient is defined:
- \(f(x) = 3x+1\), \(x_0 = 4\);
- \(f(x) = x^2-2x+7\), \(x_0 = 2\).
Notice that \[\begin{align*} \Delta_{4}f(h)&=f(4+h)-f(4)\\ &=3(4+h)+1-13\\ &=12+3h+1-13\\ &=3h\\ \end{align*}\] so \[\frac{1}{h}\Delta_{4}f(h)=\tfrac{1}{h}(3h)=3.\]
Notice that \[\begin{align*} \Delta_{2}f(h)&=f(2+h)-f(2)\\ &=(2+h)^2-2(2+h)+7-7\\ &=4+4h+h^2-4-2h\\ &=h^2+2h\\ \end{align*}\] so \[\frac{1}{h}\Delta_{2}f(h)=\tfrac{1}{h}(h^2+2h)=h+2.\]
The binomial theorem is very useful for calculating difference quotients for polynomial functions.
The difference quotient involves sums of terms of the form \((x+h)^n\).
Example 4
Determine the coefficients of the products \((A+B)^2\), \((A+B)^3\), and \((A+B)^4\). What do the coefficients count?
\[(A+B)^2=A^2+2AB+B^2\]
\[(A+B)^3=(A+B)^2(A+B)=(A^2+2AB+B^2)(A+B)=A^3+3A^2B+3AB^2+B^3\]
\[(A+B)^4=(A+B)^3(A+B)=(A^3+3A^2B+3AB^2+B^3)(A+B)=A^4+4A^3B+6A^2B^2+4AB^3+B^4\]
To understand the the next theorem, we need the following notation.
Factorial and Bionomial Coefficients
\[n!=n(n-1)(n-2)\cdots3\cdot2\cdot1\] \[ \tbinom{n}{k} = \tfrac{n!}{(n-k)!k!}.\]
The following theorem is called the Binomial Theorem.
Bionomial Theorem
For any real numbers \(x\) and \(y\), and any natural number \(n\), \[(x+y)^n = \tbinom{n}{0}x^n + \tbinom{n}{1}x^{n-1}y + \cdots + \tbinom{n}{k}x^{n-k}y^k + \cdots + \tbinom{n}{n-1}xy^{n-1} + \tbinom{n}{n}y^n.\]
Use the Binomial Theorem to write out the difference quotient for a cubic polynomial.
Example 5
Take \(f\) to be the polynomial that is given by \[f(x) = 5x^3 + 4x +2.\] For any real number \(x_0\) and any nonzero real number \(h\), write the difference quotient \(\frac{1}{h}\Delta_{x_0}f(h)\) as the sum of a constant plus a term that is \(O(h)\).
Notice that \[\begin{align*} \Delta_{x_0}f(h)&=f(x_0+h)-f(x_0)\\ &= 5(x_0+h)^3+ 4(x_0+h) +2-5x_0^3 - 4x_0 -2\\ &=5\left(\tbinom{3}{0}x_0^3+\tbinom{3}{1}x_0^2h+\tbinom{3}{2}x_0h^2+\tbinom{3}{3}h^3\right) +4x_0+4h +2 - 5x_0^3 - 4x_0 -2\\ &=5\left(x_0^3+3x_0^2h+3x_0h^2+h^3\right) +4x_0+4h +2 - 5x_0^3 - 4x_0 -2\\ &=5x_0^3+15x_0^2h+15x_0h^2+5h^3 +4x_0+4h +2 - 5x_0^3 - 4x_0 -2\\ &=15x_0^2h+15x_0h^2+5h^3 +4h \end{align*}\] so \[\frac{1}{h}\Delta_{x_0}f(h)=\tfrac{1}{h}(15x_0^2h+15x_0h^2+5h^3 +4h)=15x_0^2+15x_0h+5h^2+4=(4+15x_0^2)+(15x_0+5h)\cdot h.\] The term \((4+15x_0^2)\) is the constant term and the term \((15x_0+5h)\cdot h\) is \(O(h)\).
Instantaneous Rate of Change
The idea of an instantaneous rate of change idealizes the average rate of change that we typically measure in physical experiments.
It is a core idea in our subject.
The idea is to measure the average rate of change of \(f\) in an interval with \(x_0\) as an endpoint over small enough intervals that the average rate of change is as close as we like to some real number \(f^\prime(x_0)\). (Read: “\(f\) prime of \(x\) naught”)
This number should agree with our physical intuition about what an instantaneous rate of change should be.
Example 6
Suppose that the function \(f\) gives the value of a physical quantity and varies according to some other physical quantity, what must be the units for \(f^\prime\)?
Since \(f_{\rm ave}[a,b] = \tfrac{f(b) - f(a)}{b-a}\) the numerator will be in units of whatever the range of \(f\) measures while the denominator will be in units of whatever the domain of \(f\) measures
We define the instantaneous rate of change below.
Differentiable and Derivative
Take \(f\) to be a function that is defined on an interval \(I\) and take \(x_0\) to be in \(I\).
The function \(f\) is differentiable at \(x_0\), and \(f^\prime(x_0)\) is the derivative of \(f\) at \(x_0\), if the following limit exists: \[f^\prime(x_0) = \lim_{h\to 0} \tfrac{f(x_0+h) - f(x_0)}{h}.\] Note that this is equivalent to \(f'(x_0)=\displaystyle\lim_{h \to 0}\frac{1}{h}\Delta_{x_0}f(h)\).
The function \(f\) is differentiable on \(I\) if it is differentiable at every point in \(I\).
Practice calculating the derivative of a function at a specific point with the next examples.
Example 7
For each function \(f\) and \(x_0\) given below, set up a limit to determine \(f^\prime(x_0)\):
\(f(x) = x^2\), \(x_0 = 3\);
\(f(x) = \frac{x}{x^2+1}\), \(x_0 = 2\);
\(f(x) = 3\sin(2x)\), \(x_0 = \frac{\pi}{12}\).
Notice that \[\begin{align*} \Delta_{3}f(h)&=f(3+h)-f(3)\\ &= (3+h)^2-9\\ &=9+6h+h^2-9\\ &=6h+h^2\\ &=h\left(6+h \right) \end{align*}\] so \[\frac{1}{h}\Delta_{3}f(h)=\tfrac{1}{h}h\left(6+h \right)=6+h,\] Therefore, \(f'(3)=\displaystyle\lim_{h\to 0}(6+h)=6.\)
Notice that \[\begin{align*} \Delta_{2}f(h)&=f(2+h)-f(2)\\ &= \tfrac{2+h}{(2+h)^2+1}-\tfrac{2}{5}\\ &= \tfrac{2+h}{h^2+4h+5}-\tfrac{2}{5}\\ &= \tfrac{5(2+h)}{5(h^2+4h+5)}-\tfrac{2(h^2+4h+5)}{5(h^2+4h+5)}\\ &= \tfrac{10+5h}{5h^2+20h+25}-\tfrac{2h^2+8h+10}{5h^2+20h+25}\\ &= \tfrac{-2h^2-3h}{5h^2+20h+25}\\ &= -h\tfrac{(2h+3)}{5h^2+20h+25} \end{align*}\] so \[\frac{1}{h}\Delta_{2}f(h)=\tfrac{1}{h}(-h)\tfrac{(2h+3)}{5h^2+20h+25}=-\tfrac{2h+3}{5h^2+20h+25}.\] Therefore, \(f'(2)=\displaystyle\lim_{h\to 0}-\tfrac{2h+3}{5h^2+20h+25}=-\tfrac{0+3}{0+0+25}=-\tfrac{3}{25}.\)
For the next problem, use the sum angle formula for sine.
- \[\begin{align*} \Delta_{\tfrac{\pi}{12}}f(h)&=f(\tfrac{\pi}{12}+h)-3f(\tfrac{\pi}{12})\\ &= 3\sin(2(\tfrac{\pi}{12}+h))-3\sin(\tfrac{\pi}{6})\\ &= 3\sin(\tfrac{\pi}{6}+2h)-\tfrac{3}{2}\\ &= 3\left(\sin(\tfrac{\pi}{6})\cos(2h)+\sin(2h)\cos(\tfrac{\pi}{6})\right)-\tfrac{3}{2}\\ &= 3\sin(\tfrac{\pi}{6})\cos(2h)+3\sin(2h)\cos(\tfrac{\pi}{6})-\tfrac{3}{2}\\ &= \tfrac{3}{2}\cos(2h)+\tfrac{3\sqrt{3}}{2}\sin(2h)-\tfrac{3}{2}\\ &= -\tfrac{3}{2}\left(1-\cos(2h)\right)+\tfrac{3\sqrt{3}}{2}\sin(2h)\\ \end{align*}\] so \[\begin{align*}\frac{1}{h}\Delta_{\frac{\pi}{12}}f(h)&=\tfrac{1}{h}\left[-\tfrac{3}{2}\left(1-\cos(2h)\right)+\tfrac{3\sqrt{3}}{2}\sin(2h)\right]\\ &=-3\frac{1-\cos(2h)}{2h}+3\sqrt{3}\frac{\sin(2h)}{2h}\\ \end{align*}\] Therefore, \[\begin{align*}f'(\tfrac{\pi}{12})&=\displaystyle\lim_{h\to 0}\left[-3\frac{1-\cos(2h)}{2h}+3\sqrt{3}\frac{\sin(2h)}{2h}\right]\\&=\lim_{h\to 0}-3\frac{1-\cos(2h)}{2h}+\lim_{h\to 0}3\sqrt{3}\frac{\sin(2h)}{2h}\\ &=0+3\sqrt{3}\\ &=3\sqrt{3}\\ \end{align*}\]
In this next example, we take the derivative of a variety of rational functions.
Example 8
For each rational function \(f\) that is given below, use limits to calculate \(f^\prime(x)\) for every \(x\) where this limit exists:
\(f(x) = 1\);
\(f(x) = x\);
\(f(x) = x^2\);
\(f(x) = x^n\) for \(n \ge 2\);
\(f(x) = \frac{1}{x}\);
\(f(x) = \frac{x-2}{x^2 +1}\).
Notice that \[\begin{align*} \Delta_{x}f(h)&=f(x+h)-f(x)\\ &= 1-1\\ &=0 \end{align*}\] so \[\frac{1}{h}\Delta_{x}f(h)=\tfrac{1}{h}\cdot 0=0\] Therefore, \(f'(x)=\displaystyle\lim_{h\to 0}0=0.\)
Notice that \[\begin{align*} \Delta_{x}f(h)&=f(x+h)-f(x)\\ &= (x+h)-x\\ &= h\\ \end{align*}\] so \[\frac{1}{h}\Delta_{x}f(h)=\tfrac{1}{h}(h)=1.\] Therefore, \(f'(x)=\displaystyle\lim_{h\to 0}1=1.\)
Notice that \[\begin{align*} \Delta_{x}f(h)&=f(x+h)-f(x)\\ &= (x+h)^2-x^2\\ &= x^2+2hx+h^2-x^2\\ &= h^2+2hx\\ &= h(h+2x) \end{align*}\] so \[\frac{1}{h}\Delta_{x}f(h)=\tfrac{1}{h} h(h+2x)=h+2x.\] Therefore, \(f'(x)=\displaystyle\lim_{h\to 0}(h+2x)=0+2x=2x.\)
Notice that \[\begin{align*} \Delta_{x}f(h)&=f(x+h)-f(x)\\ &= (x+h)^n-x^n\\ &= x^n + nx^{n-1}h + \cdots + \tbinom{n}{k}x^{n-k}h^k + \cdots + nxh^{n-1} + h^n-x^n\\ &= nx^{n-1}h + \cdots + \tbinom{n}{k}x^{n-k}h^k + \cdots + nxh^{n-1} + h^n\\ &= h(h^{n-1}+nxh^{n-2}+\dots+\tbinom{n}{k}x^{n-k}h^{k-1}+\dots+nx^{n-1}) \end{align*}\] so \[\frac{1}{h}\Delta_{x}f(h)=\tfrac{1}{h} h(h^{n-1}+nxh^{n-2}+\dots+\tbinom{n}{k}x^{n-k}h^{k-1}+\dots+nx^{n-1})=h^{n-1}+nxh^{n-2}+\dots+\tbinom{n}{k}x^{n-k}h^{k-1}+\dots+nx^{n-1}.\] Therefore, \(f'(x)=\displaystyle\lim_{h\to 0}(h^{n-1}+nxh^{n-2}+\dots+\tbinom{n}{k}x^{n-k}h^{k-1}+\dots+nx^{n-1})=0+0+0\dots+nx^{n-1}=nx^{n-1}.\)
Notice that \[\begin{align*} \Delta_{x}f(h)&=f(x+h)-f(x)\\ &= \frac{1}{x+h}-\frac{1}{x}\\ &= \frac{x}{x(x+h)}-\frac{x+h}{x(x+h)}\\ &= \frac{-h}{x(x+h)}\\ &= -h\frac{1}{x(x+h)}\\ \end{align*}\] so \[\frac{1}{h}\Delta_{x}f(h)=\tfrac{1}{h} (-h)\frac{1}{x(x+h)}=-\frac{1}{x(x+h)}.\] Therefore, \(f'(x)=\displaystyle\lim_{h\to 0}-\frac{1}{x(x+h)}=-\frac{1}{x(x+0)}=-\frac{1}{2x}.\)
Notice that \[\begin{align*} \Delta_{x}f(h)&=f(x+h)-f(x)\\ &= \frac{x+h-2}{x+h +1}-\frac{x-2}{x +1}\\ &= \frac{(x+1)(x+h-2)}{(x+1)(x+h+1)}-\frac{(x-2)(x+h+1)}{(x+1)(x+h+1)}\\ &= \frac{ x^2 - x - 2+h x + h}{(x+1)(x+h+1)}-\frac{ x^2 - x - 2+h x - 2 h}{(x+1)(x+h+1)}\\ &= \frac{3h}{(x+1)(x+h+1)}\\ &= h\frac{3}{(x+1)(x+h+1)}\\ \end{align*}\] so \[\frac{1}{h}\Delta_{x}f(h)=\tfrac{1}{h} h\frac{3}{(x+1)(x+h+1)}=\frac{3}{(x+1)(x+h+1)}.\] Therefore, \(f'(x)=\displaystyle\lim_{h\to 0}\frac{3}{(x+1)(x+h+1)}=\frac{3}{(x+1)(x+0+1)}=\frac{3}{(x+1)^2}.\)
Use the angle addition formula for the \(\sin\) and \(\cos\) functions together with the limits \[\lim_{h\to 0}\tfrac{\sin(h)}{h} = 1\quad {\rm and}\quad \lim_{h\to 0}\tfrac{1-\cos(h)}{h} = 0\] to calculate the derivatives of the trigonometric functions.
Below we will see that for all \(x\), \[\sin^\prime(x) = \cos(x)\quad {\rm and} \quad \cos^\prime(x) = -\sin(x).\]
If we are proficient at taking limits, we can do much more, as we will soon see.
Example 9
For each \(x\) in \(\mathbb R\), show that \(\sin\) is differentiable at \(x\) and that \[\sin^\prime(x) = \cos(x).\]
For this problem, use the sum angle formula for sine.
\[\begin{align*} \Delta_{x}f(h)&=f(x+h)-f(x)\\ &= \sin(x+h)-\sin(x)\\ &= \sin(x)\cos(h)+\sin(h)\cos(x)-\sin(x)\\ &= -\sin(x)\left(1-\cos(h)\right)+\sin(h)\cos(x)\\ \end{align*}\] so \[\begin{align*}\frac{1}{h}\Delta_{x}f(h)&=\tfrac{1}{h}\left[-\sin(x)\left(1-\cos(h)\right)+\sin(h)\cos(x)\right]\\ &=-\sin(x)\tfrac{1-\cos(h)}{h}+\cos(x)\tfrac{\sin(h)}{h}\\ \end{align*}\] Therefore, \[\begin{align*}f'(x)&=\displaystyle\lim_{h\to 0}\left[-\sin(x)\tfrac{1-\cos(h)}{h}+\cos(x)\tfrac{\sin(h)}{h}\right]\\&=\lim_{h\to 0}-\sin(x)\frac{1-\cos(h)}{h}+\lim_{h\to 0}\cos(x)\frac{\sin(h)}{h}\\ &=-\sin(x)\cdot0+\cos(x)\cdot 1\\ &=\cos(x)\\ \end{align*}\]
In this next example, we show cosine is differentiable.
Example 10
For each \(x\) in \(\mathbb R\), show that \(\cos\) is differentiable at \(x\) and that \[\cos^\prime(x) = -\sin(x).\]
For this problem, use the sum angle formula for cosine.
\[\begin{align*} \Delta_{x}f(h)&=f(x+h)-f(x)\\ &= \cos(x+h)-\cos(x)\\ &= \cos(x)\cos(h)-\sin(x)\sin(h)-\cos(x)\\ &= -\cos(x)\left(1-\cos(h)\right)-\sin(x)\sin(h)\\ \end{align*}\] so \[\begin{align*}\frac{1}{h}\Delta_{x}f(h)&=\tfrac{1}{h}\left[-\cos(x)\left(1-\cos(h)\right)-\sin(x)\sin(h)\right]\\ &=-\cos(x)\tfrac{1-\cos(h)}{h}-\sin(x)\tfrac{\sin(h)}{h}\\ \end{align*}\] Therefore, \[\begin{align*}f'(x)&=\displaystyle\lim_{h\to 0}\left[-\cos(x)\tfrac{1-\cos(h)}{h}-\sin(x)\tfrac{\sin(h)}{h}\right]\\&=\lim_{h\to 0}-\cos(x)\frac{1-\cos(h)}{h}+\lim_{h\to 0}-\sin(x)\frac{\sin(h)}{h}\\ &=-\cos(x)\cdot0-\sin(x)\cdot 1\\ &=-\sin(x)\\ \end{align*}\]
In the next example, we should tangent is differentiable.
Example 11
For each \(x\) in \(\mathbb R\) where \(\tan^\prime\) exists, show that \[\tan^\prime(x) = \sec^2(x).\]
For this problem, use the sum angle formula for sine and cosine and use the pythagorean theorem.
\[\begin{align*} \Delta_{x}f(h)&=f(x+h)-f(x)\\ &= \tfrac{\sin(x+h)}{\cos(x+h)}-\tfrac{\sin(x)}{\cos(x)}\\ &= \tfrac{\sin(x+h)\cos(x)}{\cos(x)\cos(x+h)}-\tfrac{\sin(x)\cos(x+h)}{\cos(x)\cos(x+h)}\\ &= \tfrac{\sin(x+h)\cos(x)-\sin(x)\cos(x+h)}{\cos(x)\cos(x+h)}\\ &= \tfrac{[ \sin(x)\cos(h)+\sin(h)\cos(x)]\cos(x)-\sin(x)[\cos(x)\cos(h)-\sin(x)\sin(h)]}{\cos(x)\cos(x+h)}\\ &= \tfrac{\sin(x)\cos(x)\cos(h)+\sin(h)\cos^2(x)-\sin(x)\cos(x)\cos(h)+\sin^2(x)\sin(h)}{\cos(x)\cos(x+h)}\\ &= \tfrac{\sin(h)\cos^2(x)+\sin^2(x)\sin(h)}{\cos(x)\cos(x+h)}\\ &= \sin(h)\tfrac{\cos^2(x)+\sin^2(x)}{\cos(x)\cos(x+h)}\\ &= \sin(h)\tfrac{1}{\cos(x)\cos(x+h)} \end{align*}\] so \[\begin{align*}\frac{1}{h}\Delta_{x}f(h)&=\tfrac{\sin(h)}{h}\tfrac{1}{\cos(x)\cos(x+h)}\\ \end{align*}\] Therefore, \[\begin{align*}f'(x)&=\displaystyle\lim_{h\to 0}\tfrac{\sin(h)}{h}\tfrac{1}{\cos(x)\cos(x+h)}\\&=1\cdot \frac{1}{\cos(x)\cos(x+0)}\\ &=\frac{1}{\cos^2(x)}\\ &=\sec^2(x)\\ \end{align*}\] where \(x\) is not an odd multiple of \(\tfrac{\pi}{2}\)
In the next example, we show a composite function consisting of sine and a quadratic is differentiable.
Example 12
Take \(f\) to be the function that is given by \[f(x) = \sin(5x^2+1).\] Show that \(f\) is differentiable for each \(x\) in \(\mathbb R\) and determine \(f^\prime(x)\).
\[\begin{align*} \Delta_{x}f(h)&=f(x+h)-f(x)\\ &= \sin(5(x+h)^2+1)-\sin(5x^2+1)\\ &= \sin(5x^2+1+10xh+5h^2)-\sin(5x^2+1)\\ &= \sin(5x^2+1)\cos(10xh+5h^2)+\sin(10xh+5h^2)\cos(5x^2+1)-\sin(5x^2+1)\\ &= -\sin(5x^2+1)\left(1-\cos(10xh+5h^2)\right)+\sin(10xh+5h^2)\cos(5x^2+1)\\ \end{align*}\] so \[\begin{align*}\frac{1}{h}\Delta_{x}f(h)&=\tfrac{1}{h}\left[-\sin(5x^2+1)\left(1-\cos(10xh+5h^2)\right)+\sin(10xh+5h^2)\cos(5x^2+1)\right]\\ &=-\sin(5x^2+1)\tfrac{1-\cos(h(10x+5h))}{h}+\cos(5x^2+1)\tfrac{\sin(h(10x+5h))}{h}\\ \end{align*}\] Therefore, \[\begin{align*}f'(x)&=\displaystyle\lim_{h\to 0}\left[ \sin(5x^2+1)\tfrac{1-\cos(h(10x+5h))}{h}+\cos(5x^2+1)\tfrac{\sin(h(10x+5h))}{h}\right]\\ &=\lim_{h\to 0}\sin(5x^2+1)\frac{1-\cos(h(10x+5h))}{h}+\lim_{h\to 0}\cos(5x^2+1)\frac{\sin(h(10x+5h))}{h}\\ &=\lim_{h\to 0}\sin(5x^2+1)(10x+5h)\frac{1-\cos(h(10x+5h))}{h(10x+5h)}+\lim_{h\to 0}\cos(5x^2+1)(10x+5h)\frac{\sin(h(10x+5h))}{h(10x+5h)}\\ &=\sin(5x^2+1)(10x+0)\cdot0+\cos(5x^2+1)(10x+0)\cdot 1\\ &=0+\cos(5x^2+1)(10x)\\ &=10x\cos(5x^2+1) \end{align*}\]
Exponential Function
Now we go over the exponential function.
First, Euler’s number can be defined as the number \(e\) so that
\[\lim_{n\to\infty}\left(1+\frac{1}{n}\right)^n=e.\]
The exponential function, \(\exp(x)\) is defined as
\[\exp(x)=\lim_{n\to\infty}\left(1+\frac{x}{n}\right)^n.\]
There are various properties that the exponential function possess that we can show by rewriting it as a sum.
For each real number \(x\), define the function \(S\) as
\[S(x)=1+\sum_{k=1}^{\infty}\frac{x^n}{n!}=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\dots\]
For now, take as a fact that the series is convergent. We will discuss this further in Chapter 7.
We will first show that \(S(x)\) is actually equal to \(\exp(x)\). We show this by showing the error between \(S(x)\) and \(\left(1+\frac{x}{n}\right)^n\) is a null sequence.
First, for any natural number \(n\),
\[\left(1+\frac{x}{n}\right)^n=1+\binom{n}{1}\frac{x}{n}+\binom{n}{2}\left(\frac{x}{n}\right)^2+\dots+\binom{n}{n}\left(\frac{x}{n}\right)^n.\]
For any \(k\), each term can be bounded like this:
\[\left|\binom{n}{k}\left(\frac{x}{n}\right)^k\right|=\binom{n}{k}\left(\frac{|x|}{n}\right)^k\leq \frac{|x|^k}{k!}.\]
Because \(S\) is convergent, that means that for small positive \(\varepsilon\), there is an \(N\) in \(\mathbb{N}\) so that
\[\sum_{k=N+1}^{\infty}\frac{|x|^k}{k!}<\varepsilon.\]
Use the above statements and the triangle inequality to show that for any \(n\) that is larger than \(N\),
\[\begin{align*} \left|\left(1+\frac{x}{n}\right)^n-S(x)\right|&=\left|\sum_{k=1}^{n}\binom{n}{k}\left(\frac{x}{n}\right)^k-\sum_{k=1}^{\infty}\frac{x^k}{k!}\right|\\ &=\left|\sum_{k=1}^{N}\binom{n}{k}\left(\frac{x}{n}\right)^k+\sum_{k=N+1}^{n}\binom{n}{k}\left(\frac{x}{n}\right)^k-\sum_{k=1}^{N}\frac{x^k}{k!}-\sum_{k=N+1}^{\infty}\frac{x^k}{k!}\right|\\ &=\left|\sum_{k=1}^N\left(\binom{n}{k}\left(\frac{x}{n}\right)^k-\frac{x^k}{k!}\right)+\sum_{k=N+1}^{n}\binom{n}{k}\left(\frac{x}{n}\right)^k-\sum_{k=N+1}^{\infty}\frac{x^k}{k!}\right|\\ &\leq \left|\sum_{k=1}^N\left(\binom{n}{k}\left(\frac{x}{n}\right)^k-\frac{x^k}{k!}\right)\right|+\sum_{k=N+1}^n\left|\binom{n}{k}\left(\frac{x}{n}\right)^k\right|+\sum_{k=N+1}^{\infty}\frac{|x|^k}{k!}\\ &\leq \left|\sum_{k=1}^N\left(\binom{n}{k}\left(\frac{x}{n}\right)^k-\frac{x^k}{k!}\right)\right|+\sum_{k=N+1}^\infty\frac{|x|^k}{k!}+\sum_{k=N+1}^{\infty}\frac{|x|^k}{k!}\\ &\leq \left|\sum_{k=1}^N\left(\binom{n}{k}\left(\frac{x}{n}\right)^k-\frac{x^k}{k!}\right)\right|+2\varepsilon. \end{align*}\]
The following sequence converges:
\[a_n=\binom{n}{k}\left(\frac{x}{n}\right)^k.\]
Here is why:
\[\begin{align*} \lim_{n\to\infty}a_n&=\binom{n}{k}\left(\frac{x}{n}\right)^k\\&=\lim_{n\to\infty}\frac{n!}{k!(n-k)!}\left(\frac{x}{n}\right)^k\\&= \lim_{n\to\infty}\frac{n(n-1)(n-2)\cdots(n-k+1)}{k!}\left(\frac{x}{n}\right)^k\\ &=\lim_{n\to\infty}\frac{n}{n}\frac{n-1}{n}\frac{n-2}{n}\cdots\frac{n-k+1}{n}\frac{x^k}{k!}\\ &=\frac{x^k}{k!}. \end{align*}\]
Therefore, as \(n\) goes to infinity,
\[\lim_{n\to\infty}\left(\left|\sum_{k=1}^N\left(\binom{n}{k}\left(\frac{x}{n}\right)^k-\frac{x^k}{k!}\right)\right|+2\varepsilon\right)=2\varepsilon.\]
Since this holds for any positive \(\varepsilon\), the error between \(S(x)\) and \(\left(1+\frac{x}{n}\right)^n\) is a null sequence.
Therefore,
\[\exp(x)=S(x).\]
We can show that \(\exp(x)\) is continuous by using this form.
We can do this by first showing that \(S\) is continuous at \(0\):
Note that for any real number \(h\) that is between \((-1,1)\),
\[\left|1+\frac{h}{2!}+\frac{h^2}{3!}+\dots\right|<1+\frac{1}{1!}+\frac{1}{2!}+\frac{1}{3!}+\dots=S(1)\]
so
\[\begin{align*}\lim_{h\to 0}S(h)&=\lim_{h\to 0}\left(1+h+\frac{h^2}{2!}+\dots\right)\\ &=\lim_{h\to 0}\left(1+h\left(1+\frac{h}{2!}+\frac{h^2}{3!}+\dots\right)\right)\\ &=1+\lim_{h\to 0}h\left(1+\frac{h}{2!}+\frac{h^2}{3!}+\dots\right)\\ &=1+0\cdot S(1)\\ &=1\\ &=S(0). \end{align*}\] And since \(S(x+y)=S(x)S(y)\) holds, the function \(S\) is continuous on all of \(\mathbb{R}\).
Now for the derivative, we first need to show that \[\lim_{h\to 0}\frac{\exp(h)-1}{h}=1.\]
Use the bound on \(S(h)\) for \(|h|\) less than 1 to obtain that
\[\begin{align*} \lim_{h\to 0}\frac{\exp(h)-1}{h}&=\lim_{h\to 0}\frac{1}{h}\left(1+h+\frac{h^2}{2!}+\frac{h^3}{3!}+\frac{h^4}{4!}+\dots-1\right)\\ &=\lim_{h\to 0}\left(1+\frac{h}{2!}+\frac{h^2}{3!}+\frac{h^3}{4!}+\dots\right)\\ &=1+\lim_{h\to 0} h\left(\frac{1}{2!}+\frac{h}{3!}+\frac{h^2}{4!}+\dots\right)\\ &=1. \end{align*}\]
Limit Involving Exponential Term
\[\lim_{h\to 0}\frac{\exp(h)-1}{h}=1\]
Therefore, the derivative of \(\exp(x)\) is
\[\begin{align*} \exp'(x)&=\lim_{h\to 0}\frac{\exp(x+h)-\exp(x)}{h}\\ &=\lim_{h\to 0}\exp(x)\frac{\exp(h)-1}{h}\\ &=\exp(x)\lim_{h\to 0}\frac{\exp(h)-1}{h}\\ &=\exp(x). \end{align*}\]
Example 13
We have that \(\exp'(x)=\exp(x)\).
Now we can use the previous problem to take the derivative of something like \(\exp(kx)\) where \(k\) is a real number.
Example 14
For any non-zero real number \(k\), take \(f(x)=e^{kx}\). Show that \(f'(x)=ke^{kx}.\)
Use the limit definition to get
\[\begin{align*} f'(x)&=\lim_{h\to 0}\frac{1}{h}\left(e^{k(x+h)}-e^{kx}\right)\\ &=\lim_{h\to 0}\frac{1}{h}e^{kx}\cdot\left(e^{kh}-1\right)\\ &=e^{kx}\lim_{h\to 0}\frac{e^{kh}-1}{h}\\ &=e^{kx}\lim_{h\to 0}\frac{e^{kh}-1}{kh}\cdot k\\ &=ke^{kx}\lim_{h\to 0}\frac{e^{kh}-1}{kh}\\ &=ke^{kx}\cdot 1\\ &=ke^{kx}. \end{align*}\]
We can use the previous example to calculate the derivative of \(\exp_a(x)=a^x\) for any positive real number \(a\) not equal to 1.
Example 15
For any positive real number \(a\) not equal to 1, show that \(\exp'_a(x)=\ln(a)\exp_a(x).\)
Note that \[\exp_a(x)=a^x=\left(e^{\ln(a)}\right)^x=e^{x\ln(a)}.\]
So by the previous example,
\[\exp'_a(x)=\ln(a)e^{x\ln(a)}=\ln(a)a^x=\ln(a)\exp_a(x).\]