Dr. Bryan Carrillo’s The Principles of Calculus Website
  • Home
  • About
  • Course Schedule
    • Math 2 Spring 2025 In-Person Schedule
    • Math 3A Spring 2025 In-Person Schedule
  • Course Content
  • Demonstration Questions

On this page

  • Tangency to Transcendental Functions
    • Tangent Line
    • Local Linear Approximation
    • Example 1
    • Example 2
    • Example 3
    • Example 4
    • Example 5
    • Example 6
    • Example 7
    • Differentiable Implies Continuity Theorem
  • Basic Differentiation Rules
    • Example 8
    • Example 9
    • Linearity Differentiation and Product Rule
    • Example 10
    • Derivative of Recipocal Function
    • Example 11
    • Quotient Rule
    • Example 12
    • Chain Rule
    • Example 13
  • Differentiation and Decomposition
    • Example 14
  • Newton’s Method
    • Example 15
  • Return

Chapter 6.1 Approximation by the Tangent Line

In this section, we will talk about using local linear approximations to approximation function values. In fact, we have seen this concept earlier when we discussed tangent lines. The derivative, which we talked about in Chapter 5, also plays an important rule here as well. Finally, we will learn about various theorems that we can use to determine the derivative of more complex functions.

Tangency to Transcendental Functions

Back in Chapter 5, we learned about the derivative of a function \(f\) at \(a\), which we defined to be

\[f'(a)=\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}.\]

We obtained this form by rewriting it (\(h=x-a\)) from its original form

\[f'(a)=\lim_{x\to a}\frac{f(x)-f(a)}{x-a},\]

which described taking the limit as \(x\) approaches \(a\) of the slope of the secant line that passes through \((x,f(x)\) and \((a,f(a))\).

So the number \(f'(a)\) is the slope of the line that is tangent to \(f\) at \(x=a\).

Tangent Line

If a function \(f\) is differentiable at \(a\), then \(L_a(x)=f'(a)(x-a)+f(a)\) is the line tangent to \(f\) at \(x=a\). It is a line that passes through \((a,f(a))\) and “just touches” \(f\) at \(x=a\).

It turns out that \(f(x)-L_a(x)\) is \(o(x-a)\), meaning that as \(x\) gets closer to \(a\), the difference between \(L_a(x)\) and \(f(x)\) gets smaller and smaller.

Local Linear Approximation

If a function \(f\) is differentiable at \(a\), then \(L_a(x)=f'(a)(x-a)+f(a)\) is also referred to as the local linear approximation of \(f\) at \(x=a\).

Mathematically, we can write it as \[f(x)=L_a(x)+E_a(x)\] where \(E_a(x)\) is \(o(x-a)\).

Here is an example.

Example 1

For each of these choices of \(f^\prime(a)\) and \((a,f(a))\), determine the line that is tangent to \(f\) at \((a,f(a))\):

  1. \(f^\prime(7) = 3\) and \(f(7) = -2\)

  2. \(f^\prime(-4) = 9\) and \(f(-4) = 1\)

  3. \(f^\prime(3) = -\frac{1}{5}\) and \(f(-5) = 12\).

  1. The line \(L\) tangent to \(f\) at \((7,-2)\) is given by \[L(x)=3(x-7)-2.\]

  2. The line \(L\) tangent to \(f\) at \((-4,1)\) is given by \[L(x)=9(x+4)+1.\]

  3. The line \(L\) tangent to \(f\) at \((-5,12)\) is given by \[L(x)=-\tfrac{1}{5}(x+5)+12.\]

In 5.8, we saw that

  1. If \(f(x)=c\), then \(f'(x)=0\)
  2. If \(f(x)=x\), then \(f'(x)=1\)
  3. If \(f(x)=x^2\), then \(f'(x)=2x\)
  4. If \(f(x)=x^n\), then \(f'(x)=nx^{n-1}\)

Therefore, for any \(a\), \(f'(a)=na^{n-1}\), so the local linear approximation of \(x^n\) at \(a\) is \(L_a(x)=na^{n-1}(x-a)+a^n\).

Mathematically, we can rewrite it as \[f(x)=L_a(x)+E_a(x)\] or \[x^n=na^{n-1}(x-a)+a^n+E_a(x)\] where \(E_a(x)\) is \(o(x-a).\)

Here is an example of using a local linear approximation

Example 2

Take \(f(x)=x^3\). Write the local linear approximation of \(f\) at \(a=4\). Use your local linear approximation to approximate \((4.02)^3\).

The derivative of \(f\) is \(f'(x)=3x^2,\) so \(f'(4)=48\). Hence the local linear approximation is \(L_{4}(x)=f(4)+f'(4)(x-4)\) or \(L_4(x)=64+48(x-4)\). Because \(f(x)\approx L_4(x)\), then \[(4.02)^3=(4+0.02)^3\approx L_4(4+0.02)\]. Evaluate \(L_4(4+0.02)\) to get \[(4.02)^3\approx 64.96.\]

In 5.8, we saw that if \(f(x)=\sqrt{x}\), then \(f'(x)=\frac{1}{2\sqrt{x}}\).

Therefore, for any \(a\), \(f'(a)=\frac{1}{2\sqrt{a}}\), so the local linear approximation of \(\sqrt{x}\) at \(a\) is \(L_a(x)=\frac{1}{2\sqrt{a}}(x-a)+\sqrt{a}\).

Example 3

Take \(f(x)=\sqrt{x}\). Write the local linear approximation of \(f\) at \(a=4\). Use your local linear approximation to approximate \(\sqrt{4.02}\).

The derivative of \(f\) is \(f'(x)=\frac{1}{2\sqrt{x}},\) so \(f'(4)=\frac{1}{4}\). Hence the local linear approximation is \(L_{4}(x)=f(4)+f'(4)(x-4)\) or \(L_4(x)=2+\frac{1}{4}(x-4)\). Because \(f(x)\approx L_4(x)\), then \[\sqrt{4.02}=\sqrt{4+0.02}\approx L_4(4+0.02)\]. Evaluate \(L_4(4+0.02)\) to get \[\sqrt{4.02}\approx 2.005.\]

In 5.8, we saw that if \(f(x)=\frac{1}{x}\), then \(f'(x)=-\frac{1}{x^2}\).

Therefore, for any \(a\), \(f'(a)=-\frac{1}{a^2}\), so the local linear approximation of \(\tfrac{1}{x}\) at \(a\) is \(L_a(x)=-\frac{1}{a^2}(x-a)+\tfrac{1}{a}\).

Example 4

Take \(f(x)=\frac{1}{x}\). Write the local linear approximation of \(f\) at \(a=4\).

The derivative of \(f\) is \(f'(x)=-\frac{1}{x^2},\) so \(f'(4)=-\frac{1}{16}\). Hence the local linear approximation is \(L_{4}(x)=f(4)+f'(4)(x-4)\) or \(L_4(x)=\frac{1}{4}-\frac{1}{16}(x-4)\).

In 5.8, we saw that

  1. If \(f(x)=\sin(x)\), then \(f'(x)=\cos(x)\)
  2. If \(f(x)=\cos(x)\), then \(f'(x)=-\sin(x)\)
  3. If \(f(x)=\tan(x)\), then \(f'(x)=\sec^2(x)\) where \(x\) is not an odd multiple of \(\tfrac{\pi}{2}\).

Therefore, for any \(a\),

  1. the local linear approximation of \(\sin(x)\) at \(a\) is \(L_a(x)=\cos(a)(x-a)+\sin(a)\).
  2. the local linear approximation of \(\cos(x)\) at \(a\) is \(L_a(x)=-\sin(a)(x-a)+\cos(a)\).
  3. the local linear approximation of \(\tan(x)\) at \(a\) is \(L_a(x)=\sec^2(a)(x-a)+\tan(a)\), where \(a\) is not an odd multiple of \(\tfrac{\pi}{2}\).

Example 5

Find the local linear approximation of each \(f\) at the given \(a\)

  1. \(f(x)=\sin(x)\) at \(a=\tfrac{\pi}{4}\).
  2. \(f(x)=\cos(x)\) at \(a=\tfrac{\pi}{3}\).
  3. \(f(x)=\tan(x)\) at \(a=\tfrac{\pi}{6}\).
  1. Because \(f'(x)=\cos(x)\), \(f'(\tfrac{\pi}{4})=\frac{\sqrt{2}}{2}\). Hence the local linear approximation is \(L_{\tfrac{\pi}{4}}(x)=f(\tfrac{\pi}{4})+f'(\tfrac{\pi}{4})(x-\tfrac{\pi}{4})\) or \(L_{\tfrac{\pi}{4}}(x)=\frac{\sqrt{2}}{2}+\frac{\sqrt{2}}{2}(x-\tfrac{\pi}{4}).\)

  2. Because \(f'(x)=-\sin(x)\), \(f'(\tfrac{\pi}{3})=-\frac{\sqrt{3}}{2}\). Hence the local linear approximation is \(L_{\tfrac{\pi}{3}}(x)=f(\tfrac{\pi}{3})+f'(\tfrac{\pi}{3})(x-\tfrac{\pi}{3})\) or \(L_{\tfrac{\pi}{3}}(x)=\frac{1}{2}-\frac{\sqrt{3}}{2}(x-\tfrac{\pi}{3}).\)

  3. Because \(f'(x)=\sec^2(x)\), \(f'(\tfrac{\pi}{6})=\frac{4}{3}\). Hence the local linear approximation is \(L_{\tfrac{\pi}{6}}(x)=f(\tfrac{\pi}{6})+f'(\tfrac{\pi}{6})(x-\tfrac{\pi}{6})\) or \(L_{\tfrac{\pi}{6}}(x)=\frac{\sqrt{3}}{3}+\frac{4}{3}(x-\tfrac{\pi}{6}).\)

Now in this example, we derive the local linear approximation for \(\exp_b\) where \(b\) is positive and not equal to \(1.\)

Example 6

Take \(f(x)=\exp_b(x)=b^x\) where \(b>0\) and \(b\not=1\). Assuming that \(\displaystyle\lim_{h\to 0}\frac{\exp_b(h)-1}{h}=\ln(b)\), calculate \(f'(x)\). Then calculate the local linear approximation \(f(x)=\exp(x)\) at \(a=2\).

Notice that

\[ \begin{align*} f'(x)&=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\\ &=\lim_{h\to 0}\frac{b^{x+h}-b^x}{h}\\ &=\lim_{h\to 0}\frac{b^{x}b^h-b^x}{h}\\ &=\lim_{h\to 0}b^x\frac{b^h-1}{h}\\ &=b^x\lim_{h\to 0}\frac{b^h-1}{h}\\ &=b^x\ln(b). \end{align*} \]

Hence \((b^x)'=\ln(b)b^x\) or \((\exp_b(x))'=\ln(b)\exp_b(x),\)

In the case of \(\exp(x)=\exp_e(x)=e^x\), \(f'(x)=\ln(e)\exp(x)=\exp(x)\) or \(f'(x)=e^x\). So the local linear approximation of \(f(x)\) is \(L_2(x)=e^2+e^2(x-2)\).

Not every function will have a derivative.

Example 7

The following functions are continuous at \(a=0\), but are not differentiable at \(a=0\).

  1. \(f(x)=|x|\)
  2. \(f(x)=\sqrt{x}\)
  3. \(f(x)=x^{1/3}\)

Explain why.

  1. When \(h>0\), \[\begin{align*} \lim_{h\to 0^+}\frac{f(h)-f(0)}{h}=\lim_{h\to 0^+}\frac{h}{h}=\lim_{h\to 0^+}1=1. \end{align*}\] When \(h<0\), \[\lim_{h\to 0^-}\frac{f(h)-f(0)}{h}\lim_{h\to 0^-}\frac{-h}{h}=\lim_{h\to 0^-}-1=-1.\] Therefore, the limit doesn’t exist so the derivative doesn’t exist at \(a=0\). This is due to a sharp corner.

  1. The derivative doesn’t exist because \(f\) is not defined for \(x<0\).

  1. Using the fact \((x^n)'=nx^{n-1},\) the derivative is \((x^{1/3})'=\tfrac{1}{3}x^{-2/3}=\tfrac{1}{3x^{2/3}}\). Notice this is undefined at \(x=0\) because the denominator would equal zero. The derivative does not exist: the “tangent” line would be a vertical line.

If a function is differentiable, then it must be continuous. If \(f\) is differentiable at \(a\), then it has a local linear approximation:

\[f(x)=f(a)+f'(a)(x-a)+E_a(x)\] where \(E_a(x)\) is \(o(x-a)\).

Notice that

\[\begin{align*} \lim_{x\to a}f(x)&=\lim_{x\to a}[f(a)+f'(a)(x-a)+E_a(x)]\\ &=\lim_{x\to a}f(a)+\lim_{x\to a}f'(a)(x-a)+\lim_{x\to a}E_a(x)\\ &=f(a)+f'(a)\cdot 0+0\\ &=f(a). \end{align*}\]

Since \(\displaystyle\lim_{x\to a}f(x)=f(a),\) \(f\) is continuous at \(a\).

Differentiable Implies Continuity Theorem

If a function \(f\) is a differentiable at \(a\), then it is continuous at \(a\).

Basic Differentiation Rules

How do we compute the derivative of more complicated functions? By using the local linear approximation of the functions, we can figure out what the derivative should be. It will be useful to rewrite the function \(f\) into the form \(f(x)=L_a(x)+E_a(x)\) or \(f(x)=f(a)+f'(a)(x-a)+E_a(x)\) where \(E_a(x)\) is \(o(x-a)\).

Example 8

Write \(f\) as a sum of functions. Compute \(f'(a)\) by determining the appropriate local linear approximation of each summmands of \(f\) and taking their sum. \[f(x)=\sqrt{x}+e^x+3\sin(x)\]

Here \[\begin{align*} \sqrt{x}+e^x+3\sin(x)&=f_1(x)+f_2(x)+3f_3(x). \end{align*}\]

The local linear approximation of \(f_1\),\(f_2\) and \(f_3\) looks like \[f_1(a)=\sqrt{a}+\tfrac{1}{2\sqrt{a}}(x-a)+E_{f_1}(x)\] \[f_2(a)=e^a+e^a(x-a)+E_{f_2}(x)\] \[f_3(a)=3\sin(a)+3\cos(a)(x-a)+E_{f_3}(x)\]

Hence

\[\begin{align*} \sqrt{x}+e^x+3\sin(x)&=\sqrt{a}+\tfrac{1}{2\sqrt{a}}(x-a)+E_{f_1}(x)+e^a+e^a(x-a)+E_{f_2}(x)\\ &+3\sin(a)+3\cos(a)(x-a)+E_{f_3}(x)\\ &=\left[\sqrt{a}+e^a+3\sin(a)\right]+\left[\tfrac{1}{2\sqrt{a}}+e^a+3\cos(a)\right](x-a)+\left[E_{f_1}(x)+E_{f_2}(x)+E_{f_3}(x)\right] \end{align*}\]

which means \(f'(a)=\tfrac{1}{2\sqrt{a}}+e^a+3\cos(a)\) is the sum of the derivatives.

Example 9

Write \(f\) as a product of functions. Compute \(f'(a)\) by determining the appropriate local linear approximation of each factor of \(f\) and taking their product. \[f(x)=\frac{1}{x}\cos(x)\]

Here \[\begin{align*} \frac{1}{x}\cos(x)&=f_1(x)f_2(x). \end{align*}\]

The local linear approximation of \(f_1\) and \(f_2\) looks like \[f_1(a)=\tfrac{1}{a}-\tfrac{1}{a^2}(x-a)+E_{f_1}(x)\] \[f_2(a)=\cos(a)-\sin(a)(x-a)+E_{f_2}(x)\]

Hence

\[\begin{align*} \frac{1}{x}\cos(x)&=\left(\tfrac{1}{a}-\tfrac{1}{a^2}(x-a)+E_{f_1}(x)\right)\left(\cos(a)-\sin(a)(x-a)+E_{f_2}(x)\right)\\ &=\tfrac{1}{a}\cos(a)-\tfrac{1}{a}\sin(a)(x-a)+\tfrac{1}{a}E_{f_2}(x)-\tfrac{1}{a^2}\cos(a)(x-a)-\tfrac{1}{a^2}\sin(a)(x-a)^2-\tfrac{1}{a^2}(x-a)E_{f_2}(x)\\ &+\cos(a)E_{f_1}(x)-\sin(a)(x-a)E_{f_1}(x)+E_{f_1}(x)E_{f_2}(x)\\ &=\left[\tfrac{1}{a}\cos(a)\right]+\left[-\tfrac{1}{a}\sin(a)-\tfrac{1}{a^2}\cos(a)\right](x-a)+\left[\tfrac{1}{a}E_{f_2}(x)-\tfrac{1}{a^2}\sin(a)(x-a)^2-\tfrac{1}{a^2}(x-a)E_{f_2}(x)+\cos(a)E_{f_1}(x)-\sin(a)(x-a)E_{f_1}(x)+E_{f_1}(x)E_{f_2}(x)\right] \end{align*}\]

which means \(f'(a)=-\tfrac{1}{a}\sin(a)-\tfrac{1}{a^2}\cos(a).\) This is NOT the product of the derivatives.

The previous examples suggest the following theorem.

Linearity Differentiation and Product Rule

For any functions \(f\) and \(g\) that are differentiable at \(x_0\) and for any real numbers \(a\) and \(b\), if \(x_0\) is a limit point of \(\mathcal{D}(f)\cap \mathcal{D}(g)\), then

  • \((af+bg)'(x_0)=af'(x_0)+bg'(x_0)\)
  • \((fg)'(x_0)=f'(x_0)g(x_0)+f(x_0)g'(x_0)\)

The first statement is the linearity of differentiation and the second is the product rule.

The theorems follow by writing \[f(x)=f(x_0)+f'(x_0)(x-x_0)+E_{f}(x)\] and \[g(x)=g(x_0)+g'(x_0)(x-x_0)+E_{g}(x)\] and then computing \(af+bg\) and \(fg\).

Notice that \[\begin{align*} af(x)+bg(x)&=a\left[f(x_0)+f'(x_0)(x-x_0)+E_{f}(x)\right]+b\left[g(x_0)+g'(x_0)(x-x_0)+E_{g}(x)\right]\\ &=[af(x_0)+bg(x_0)]+[af'(x_0)+bg'(x_0)](x-a)+[E_f(x)+E_g(x)] \end{align*}\] so \(L(x)=[af(x_0)+bg(x_0)]+[af'(x_0)+bg'(x_0)](x-a)\) is the local linear approximation of \(af+bg\) at \(x_0\) and the slope is \(af'(x_0)+bg'(x_0)\).

Similarly, \[\begin{align*} f(x)g(x)&=\left[f(x_0)+f'(x_0)(x-x_0)+E_{f}(x)\right]\left[g(x_0)+g'(x_0)(x-x_0)+E_{g}(x)\right]\\ &=f(x_0)g(x_0)+[f'(x_0)g(x_0)+f(x_0)g'(x_0)](x-a)\\ &+f(x_0)E_g(x)+g(x_0)E_f(x)+f'(x_0)(x-x_0)E_g(x)+g'(x_0)(x-x_0)E_f(x)+E_f(x)E_g(x)\\ &=f(x_0)g(x_0)+[f'(x_0)g(x_0)+f(x_0)g'(x_0)](x-a)+\text{Error term that is }o(x-a) \end{align*}\] so \(L(x)=f(x_0)g(x_0)+[f'(x_0)g(x_0)+f(x_0)g'(x_0)](x-a)\) is the local linear approximation of \(fg\) at \(x_0\) and the slope is \(f'(x_0)g(x_0)+f(x_0)g'(x_0)\).

Example 10

Calculate the derivative of each function by decomposing it into a sum and or product of simpler functions and by using the rules mentioned about.

  1. \(f(x)=x^2+5\tan(x)+4\)
  2. \(f(x)=x^{1/3}\exp(x)-\sqrt{x}\cos(x)+\exp_b(x)+\sqrt{5}\)
  1. Take \(f_1(x)=x^2\), \(f_2(x)=\tan(x)\) and \(f_3(x)=4\), so that \[f(x)=f_1(x)+5f_2(x)+f_3(x).\] Use the linearity rule: \[\begin{align*} \left(x^2+5\tan(x)+4\right)'&=(x^2)'+5(\tan(x))'+(4)'\\ &=2x+5\sec^2(x)+0\\ &=2x+5\sec^2(x) \end{align*}\]

  2. Take \(f_1(x)=x^{1/3}\), \(f_2(x)=\exp(x)\), \(f_3(x)=\sqrt{x}\), \(f_4(x)=\cos(x)\), \(f_5(x)=\exp_b(x)\) and \(f_6(x)=\sqrt{5}.\) so that \[f(x)=f_1(x)f_2(x)-f_3(x)f_4(x)+f_5(x)+f_6(x).\] Use the linearity rule and product rule

\[\begin{align*} \left(x^{1/3}\exp(x)-\sqrt{x}\cos(x)+\exp_b(x)+\sqrt{5}\right)'&=(x^{1/3}\exp(x))'-(\sqrt{x}\cos(x))'+(\exp_b(x))'+(\sqrt{5})'\\ &=(x^{1/3})'\exp(x)+x^{1/3}(\exp(x))'-(\sqrt{x})'\cos(x)-\sqrt{x}(\cos(x))'+(\exp_b(x))'+(\sqrt{5})' &&\text{ product rule}\\ &=\tfrac{1}{3x^{2/3}}\exp(x)+x^{1/3}\exp(x)-\tfrac{1}{2\sqrt{x}}\cos(x)+\sqrt{x}\sin(x)+\ln(b)\exp_b(x)+0\\ \end{align*}\]

If \(f\) is differentiable at \(x_0\), would \(g(x)=\frac{1}{f(x)}\) be differentiable at \(x_0\)?

Yes, as long as \(f(x_0)\) is non-zero. We can find out the derivative by computing \[g'(x_0)=\lim_{h\to 0}\frac{g(x_0+h)-g(x_0)}{h}\] or \[g'(x_0)=\lim_{h\to 0}\frac{\frac{1}{f(x_0+h)}-\frac{1}{f(x_0)}}{h}.\]

\[\begin{align*} g'(x_0)&=\lim_{h\to 0}\tfrac{f(x_0)-f(x_0+h)}{hf(x_0+h)f(x_0)}\\ &=\lim_{h\to 0}-\tfrac{f(x_0+h)-f(x_0)}{h}\cdot \lim_{h\to 0}\tfrac{1}{f(x_0+h)f(x_0)}\\ &=-f'(x_0)\tfrac{1}{f(x_0)f(x_0)}\\ &=-\tfrac{f'(x_0)}{(f(x_0)^2)} \end{align*}\]

Derivative of Recipocal Function

If \(f\) is differentiable at \(x_0\) and \(f(x_0)\) is non-zero, then \(\tfrac{1}{f(x)}\) is differentiable at \(x_0\) and \(\left(\tfrac{1}{f(x_0)}\right)'=-\tfrac{f'(x_0)}{(f(x_0)^2}.\)

Use this rule to calculate the following derivatives.

Example 11

Calculate the derivative of each \(f\):

  1. \(f(x)=\tfrac{1}{x^2-x-2}\)
  2. \(f(x)=\sec(x)\)
  3. \(f(x)=\csc(x)\)
  1. Notice that \((x^2-x-2)'=2x-1\), so

\[\begin{align*} \left(\frac{1}{x^2-x-2}\right)'&=-\frac{(x^2-x-2)'}{(x^2-x-2)^2}\\ &=-\frac{2x-1}{(x^2-x-2)^2}.\\ \end{align*}\]

  1. Notice that \(\sec(x)=\frac{1}{\cos(x)}\), so

\[\begin{align*} \left(\sec(x)\right)'&=-\frac{(\cos(x))'}{(\cos(x))^2}\\ &=-\frac{-\sin(x)}{(\cos(x))^2}\\ &=\frac{\sin(x)}{\cos(x)}\frac{1}{\cos(x)}\\ &=\tan(x)\sec(x). \end{align*}\]

  1. Notice that \(\csc(x)=\frac{1}{\sin(x)}\), so

\[\begin{align*} \left(\csc(x)\right)'&=-\frac{(\sin(x))'}{(\sin(x))^2}\\ &=-\frac{\cos(x)}{(\sin(x))^2}\\ &=-\frac{\cos(x)}{\sin(x)}\frac{1}{\sin(x)}\\ &=-\cot(x)\csc(x). \end{align*}\]

The above rule only worked because the numerator of the quotient was constant. What if we have a quotient where both the numerator and denominator are non-constant? That is where we can use the quotient rule.

Quotient Rule

If \(f\) and \(g\) are both differentiable at \(x_0\) and \(g(x_0)\) is nonzero, then \(\left(\tfrac{f}{g}\right)=f\cdot\tfrac{1}{g}\) is differentiable at \(x_0\) and \[\left(\tfrac{f}{g}\right)'(x_0)=\left(f\cdot\tfrac{1}{g}\right)'(x_0)=f'(x_0)\tfrac{1}{g(x_0)}-f(x_0)\tfrac{g'(x_0)}{(g(x_0))^2}=\tfrac{f'(x_0)g(x_0)-f(x_0)g'(x_0)}{(g(x_0))^2}.\] That is \[\left(\tfrac{f}{g}\right)'(x_0)=\tfrac{f'(x_0)g(x_0)-f(x_0)g'(x_0)}{(g(x_0))^2}.\]

This is known as the quotient rule.

Example 12

Calculate the derivative of each \(f\):

  1. \(f(x)=\tfrac{\cos(x)+\sqrt[3]{x}}{x^2-x-5}\)
  2. \(f(x)=\tan(x)\)
  3. \(f(x)=\cot(x)\)
  1. Take \(f_1(x)=\cos(x)+\sqrt[3]x=\cos(x)=x^{1/3}\) and \(f_2(x)=x^2-x-5\) so that \(f(x)=\tfrac{f_1(x)}{f_2(x)}.\) Use the quotient rule to get:

\[\begin{align*} \left(\tfrac{\cos(x)+\sqrt[3]{x}}{x^2-x-5}\right)'&=\frac{(\cos(x)+x^{1/3})'(x^2-x-5)-(\cos(x)+x^{1/3})(x^2-x-5)'}{(x^2-x-5)^2}\\ &=\frac{(-\sin(x)+\frac{1}{3x^{2/3}})(x^2-x-5)-(\cos(x)+x^{1/3})(2x-1)}{(x^2-x-5)^2}\\ \end{align*}\]

  1. Notice that \(\tan(x)=\frac{\sin(x)}{\cos(x)}\). Take \(f_1(x)=\sin(x)\) and \(f_2(x)=\cos(x)\) so that \(f(x)=\tfrac{f_1(x)}{f_2(x)}.\) Use the quotient rule to get:

\[\begin{align*} \left(\tan(x)\right)'&=\frac{(\sin(x) )'(\cos(x))-(\sin(x))(\cos(x))'}{(\cos(x))^2}\\ &=\frac{(\cos(x) )(\cos(x))-(\sin(x))(-\sin(x))}{(\cos(x))^2}\\ &=\frac{\cos^2(x)+\sin^2(x)}{(\cos(x))^2}\\ &=\frac{1}{(\cos(x))^2}\\ &=\sec^2(x). \end{align*}\]

  1. Notice that \(\cot(x)=\frac{\cos(x)}{\sin(x)}\). Take \(f_1(x)=\cos(x)\) and \(f_2(x)=\sin(x)\) so that \(f(x)=\tfrac{f_1(x)}{f_2(x)}.\) Use the quotient rule to get:

\[\begin{align*} \left(\cot(x)\right)'&=\frac{(\cos(x) )'(\sin(x))-(\cos(x))(\sin(x))'}{(\sin(x))^2}\\ &=\frac{-(\sin(x) )(\sin(x))-(\cos(x))(\cos(x))}{(\sin(x))^2}\\ &=\frac{-(\sin^2(x)+\cos^2(x))}{(\sin(x))^2}\\ &=-\frac{1}{(\sin(x))^2}\\ &=-\csc^2(x). \end{align*}\]

In the case of composite functions, we have the following rule.

Chain Rule

For any functions \(f\) and \(g\) with the property that \(g\) is differentiable at \(x_0\), \(f\) is differentiable at \(g(x_0)\), then \[(f\circ g)'(x_0)=f'(g(x_0))g'(x_0).\]

This is known as the chain rule.

Here is the idea: since \(g\) is differentiable at \(x_0\), \(f\) is differentiable at \(g(x_0)\), then there is \(E_{g}\) and \(E_{f}\) so that

\[g(x)=g(x_0)+g'(x_0)(x-x_0)+E_g(x)(x-x_0)\] and \[f(x)=f(g(x_0))+f'(g(x_0))(x-g(x_0))+E_f(x)(x-x_0).\]

Thus \[f(g(x))=f(g(x_0))+f'(g(x_0))(g(x)-g(x_0))+E_f(g(x))(g(x)-x_0)\] or \[f(g(x_0)) + f^\prime(g(x_0))g^\prime(x_0)(x - x_0) + E(x).\]

Here is some practice.

Example 13

Calculate the derivative of each \(f\):

  1. \(f(x)=\sqrt{4x^2+x+1}\)
  2. \(f(x)=\sin(\sqrt{4x^2+x+1})\)
  3. \(f(x)=\exp_3(\sin(\sqrt{4x^2+x+1}))\)
  1. Take \(f_1(x)=\sqrt{x}\) and \(f_2(x)={4x^2+x+1}\) so that \(f(x)=f_1(f_2(x)).\) Use the chain rule and \(f_1'(x)=\tfrac{1}{2\sqrt{x}}\) and \(f_2'(x)=8x+1\) to get:

\[\begin{align*} \left(\sqrt{4x^2+x+1}\right)'&=[f_1'(f_2(x))]\cdot [f_2'(x)]\\ &=\left[\frac{1}{2\sqrt{f_2(x)}}\right]\cdot\left[(4x^2+x+1)'\right]\\ &=\frac{1}{2\sqrt{4x^2+x+1}}\cdot(8x+1)\\ &=\frac{8x+1}{2\sqrt{4x^2+x+1}} \end{align*}\]

  1. Take \(f_1(x)=\sin(x)\) and \(f_2(x)=\sqrt{4x^2+x+1}\) so that \(f(x)=f_1(f_2(x)).\) Use the chain rule and \(f_1'(x)=\cos(x)\) and \(f_2'(x)=(\sqrt{4x^2+x+1})'=\tfrac{8x+1}{2\sqrt{4x^2+x+1}}\) to get:

\[\begin{align*} \left(\sin(\sqrt{4x^2+x+1})\right)'&=[f_1'(f_2(x))]\cdot [f_2'(x)]\\ &=\left[\cos(f_2(x))\right]\cdot\left[(\sqrt{4x^2+x+1})'\right]\\ &=\cos(\sqrt{4x^2+x+1})\cdot\frac{8x+1}{2\sqrt{4x^2+x+1}}\\ &=\frac{(8x+1)\cos(\sqrt{4x^2+x+1})}{2\sqrt{4x^2+x+1}} \end{align*}\]

  1. Take \(f_1(x)=\exp_3(x)\) and \(f_2(x)=\sin(\sqrt{4x^2+x+1})\) so that \(f(x)=f_1(f_2(x)).\) Use the chain rule and \(f_1'(x)=\ln(3)\exp_3(x)\) and \(f_2'(x)=\cos(\sqrt{4x^2+x+1})\cdot\frac{8x+1}{2\sqrt{4x^2+x+1}}\) to get:

\[\begin{align*} \left(\exp_3(\sin(\sqrt{4x^2+x+1}))\right)'&=[f_1'(f_2(x))]\cdot [f_2'(x)]\\ &=\left[\ln(3)\exp_3(f_2(x))\right]\cdot\left[\left(\sin(\sqrt{4x^2+x+1})\right)'\right]\\ &=\ln(3)\exp_3(\sin(\sqrt{4x^2+x+1}))\frac{(8x+1)\cos(\sqrt{4x^2+x+1})}{2\sqrt{4x^2+x+1}} \end{align*}\]

Differentiation and Decomposition

Identifying the decomposition of a function into simpler functions is the first step in computing the derivative of a function.

Example 14

For each function \(f\) that follows, decompose \(f\) into simpler functions in order to find a formula for \(f'(x)\):

  1. \(f(x)=\sin(3x)\sqrt{-x^4+x+5}\)
  2. \(f(x)=(x^2+e^{2x})\frac{x+2}{\sin(x)+\sec(x)}\)
  1. Take \(f_1(x)=\sin(x), f_2(x)=3x, f_3(x)=\sqrt{x},f_4(x)=-x^4, f_5(x)=x,f_6(x)=5\) so that \[f(x)=[f_1(f_2(x))]\cdot[f_3(f_4(x)+f_5(x)+f_6(x))].\] By using \(f_1'(x)=\cos(x), f_2'(x)=3, f_3'(x)=\frac{1}{2\sqrt{x}},f_4'(x)=-4x^3, f_5'(x)=1,f_6'(x)=0\) and derivative rules, we have

\[\begin{align*} \left(\sin(3x)\sqrt{-x^4+x+5}\right)'&=(\sin(3x))'\sqrt{-x^4+x+5}+\sin(3x)\left(\sqrt{-x^4+x+5}\right) '&&\text{product rule}\\ &=\cos(3x)(3x)'\sqrt{-x^4+x+5}+\sin(3x)\frac{1}{2\sqrt{-x^4+x+5}}(-x^4+x+5)' &&\text{chain rule}\\ &=3\cos(3x)\sqrt{-x^4+x+5}+\sin(3x)\frac{1}{2\sqrt{-x^4+x+5}}(-4x^3+1+0) &&\text{linearity}\\ &=3\cos(3x)\sqrt{-x^4+x+5}+\sin(3x)\frac{-4x^3+1}{2\sqrt{-x^4+x+5}} \end{align*}\]

  1. Take \(f_1(x)=x^2,f_2(x)=e^{x},f_3(x)=2x,f_4(x)=x+2,f_5(x)=\sin(x),f_6(x)=\sec(x)\) so that \[f(x)=[f_1(x)+f_2(f_3(x))]\cdot\left[\frac{f_4(x)}{f_5(x)+f_6(x)}\right].\] By using \(f_1'(x)=2x, f_2'(x)=e^x, f_3'(x)=2,f_4'(x)=1+0, f_5'(x)=\cos(x),f_6'(x)=\sec(x)\tan(x)\) and derivative rules, we have

\[\begin{align*} \left((x^2+e^{2x})\frac{x+2}{\sin(x)+\sec(x)}\right)'&=(x^2+e^{2x})'\frac{x+2}{\sin(x)+\sec(x)}+(x^2+e^{2x})\left(\frac{x+2}{\sin(x)+\sec(x)}\right) '&&\text{product rule}\\ &=(x^2+e^{2x})'\frac{x+2}{\sin(x)+\sec(x)}+(x^2+e^{2x})\left(\frac{(x+2)'(\sin(x)+\sec(x))-(x+2)(\sin(x)+\sec(x))'}{(\sin(x)+\sec(x))^2}\right) &&\text{quotient rule}\\ &=((x^2)'+(e^{2x})')\frac{x+2}{\sin(x)+\sec(x)}+(x^2+e^{2x})\left(\frac{((x)'+(2)')(\sin(x)+\sec(x))-(x+2)((\sin(x))'+(\sec(x))')}{(\sin(x)+\sec(x))^2}\right)&&\text{linearity}\\ &=(2x+2e^{2x})\frac{x+2}{\sin(x)+\sec(x)}+(x^2+e^{2x})\left(\frac{1(\sin(x)+\sec(x))-(x+2)(\cos(x)+\sec(x)\tan(x))}{(\sin(x)+\sec(x))^2}\right)&&\text{chain rule }(e^{2x})'=e^{2x}\cdot2\\ \end{align*}\]

Newton’s Method

If one is trying to find a solution to the equation \(f(x)=0\), we can do so by drawing tangent lines. If \(x_0\) is a zero, take \(x_1\) to be a point in \(I\setminus\{x_0\}\) and for each \(n\), take \(x_{n+1}\) to be the \(x-\)intercept of the line that is tangent to \(f\) at \((x_n,f(x_n))\).

The line is \(L(x)=f(x_n)+f'(x_n)(x-x_n)\). Solve for \(x=x_{n+1}\) to get \[x_{n+1}=x_n-\tfrac{f(x_n)}{f'(x_n)}.\]

If \(I\) is small enough, then this sequence will converge to \(x_0\).

Example 15

Use Newton’s Method to approximate a solution to the equation \(x^2=5.\)

One root of \(f(x)=x^2-5\) is \(x_0=\sqrt{5}\), which is roughly bigger than 2. So make an initial guess of \(x_1=2\). Using \[x_{n+1}=x_n-\tfrac{f(x_n)}{f'(x_n)}\] and \[f'(x)=2x,\] the next guess is \[x_2=x_1-\tfrac{f(x_1)}{f'(x_1)}=2-\tfrac{f(2)}{f'(2)}=\tfrac{9}{4}.\] Do Newton’s method again to get \[x_3=x_2-\tfrac{f(x_2)}{f'(x_2)}=\tfrac{9}{4}-\tfrac{f\left(\tfrac{9}{4}\right)}{f'\left(\tfrac{9}{4}\right)}=2.2361111111111.\] Do Newton’s method again to get \[x_4=x_3-\tfrac{f(x_3)}{f'(x_3)}=2.2360679779158.\] Do Newton’s methond one more time to get \[x_5=x_4-\tfrac{f(x_4)}{f'(x_4)}=2.2360679774998.\]

Therefore, \(\sqrt{5}\approx 2.2360679774998.\)

Return

  • Return

© Copyright 2025 by the POC Writing Team: Bryan Carrillo, Yat Sun Poon, and David Weisbart. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopy, recording, or any information storage and retrieval system, without permission in writing from the POC Writing Team.