3.7: Product Rule
- Page ID
- 88647
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Okay, but what about \(\frac{d}{dx} x \cdot e^x\)? Can we just take the derivative of each like this?
\[\begin{align*} \frac{d}{dx} x \cdot e^x & = \left( \frac{d}{dx} x \right) \cdot \left( \frac{d}{dx} e^x \right) \\ & = 1 \cdot e^x = e^x \end{align*}\]
Unfortunately, no. Just to be clear: the above calculation is false!
Think about \(\frac{d}{dx} x \cdot x\). We know \(\frac{d}{dx} x = 1\), so therefore you might think
\(\frac{d}{dx} x \cdot x = 1 \cdot 1 = 1\)
But we also know that \(\frac{d}{dx} x \cdot x = \frac{d}{dx} x^2 = 2x\). So what do we make of this? Well, we just have to give up on the idea of “taking the derivative of each” with products. Luckily, there is a rule called the product rule that works great:
\(\boxed{\cfrac{d}{dx} f \cdot g = f g' + g f'}\)
The motto for this rule is “the first times the derivative of the second, plus the second times the derivative of the first.”
Where does this rule come from? Well, consider this picture:
Here we have a rectangle. The height is \(f\), the width is \(g\). The area of the rectangle is \(f \cdot g\). If we were to make \(f\) bigger by a little bit, by say \(\Delta f\), and \(g\) bigger by \(\Delta g\), then the rectangle would become bigger too. We want to find out how quickly the area is increasing. So how quickly is it increasing? You can see in the picture we add three sections on: \(f \cdot \Delta g\), \(g \cdot \Delta f\), and \(\Delta f \cdot \Delta g\). If you think of \(\Delta f\) and \(\Delta g\) as being really small, though, the \(\Delta f \cdot \Delta g\) terms is incredibly tiny — so tiny it does not affect the answer in the limit. Therefore, the new area is \(f \cdot \Delta g + g \cdot \Delta f\). This is where the product rule comes from — it’s how an area changes as you change each side length.
Let’s see this rule in action.
In this case, we can attack this using the product rule with \({\color{blue} f = x}\), and \({\color{red} g = e^x}\). We can easily take the derivative of each part: \({\color{blue} f' = 1}\), and \({\color{red} g' = e^x}\). Hence, using the formula \(\frac{d}{dx} {\color{blue} f} {\color{red} g} = {\color{blue} f} {\color{red} g'} + {\color{red} g} {\color{blue} f'}\), we have
\({\color{blue} f} {\color{red} g'} + {\color{red} g} {\color{blue} f'} = {\color{blue} x} {\color{red} e^x} + {\color{red} e^x} {\color{blue} (1)} = \boxed{x e^x + e^x}.\)
We see \({\color{red} f = x^2, f' = 2x}\) and \({\color{blue} g = \cos(x), g' = -\sin(x)}\). Hence, we have
\[\begin{align*} \frac{d}{dx} {\color{red} x^2} {\color{blue} \cos(x)} & = {\color{red} f} {\color{blue} g'} + {\color{blue} g} {\color{red} f'} \\ & = {\color{red} x^2} {\color{blue} (-\sin(x))} + {\color{blue} \cos(x)} {\color{red} 2x} \\ & = \boxed{-2x^2 \sin(x) + 2x \cos(x)}. \end{align*}\]
Using the power rule, we see \(\frac{d}{dx} x \cdot x = \frac{d}{dx} x^2 = 2x\). Using the product rule, we set \(f = x\) and \(g = x\). In which case, \(f' = 1\) and \(g' = 1\). Thus
\(f g' + g f' = (x)(1) + (x)(1) = \boxed{2x}.\)
Hurray! The same answer! Isn’t it great when math just plain works.
We see \(f = \sqrt{x}\), \(g = \ln(x)\). For \(f'\), we rewrite \(f' = \frac{1}{2 \sqrt{x}}\). As we saw in the exponents and logarithms section, \(g' = \frac{1}{x}\). Hence
\[\begin{align*} \frac{d}{dx} \sqrt{x} \ln(x) & = f g' + g f' \\ & = \sqrt{x} \frac{1}{x} + \ln(x) \frac{1}{2 \sqrt{x}} \\ & = \frac{\sqrt{x}}{x} + \frac{\ln(x)}{2 \sqrt{x}} \end{align*}\]
Now if you want to be a bit fancy with the algebra, we can simplify \(\frac{\sqrt{x}}{x}\) using rational exponents. It is equal to \(\frac{1}{\sqrt{x}}\). From here, we can find a common denominator and add the two fractions.
\[\begin{align*} \frac{d}{dx} \sqrt{x} \ln(x) & = \frac{1}{\sqrt{x}} + \frac{\ln(x)}{2 \sqrt{x}} \\ & = \frac{2}{2 \sqrt{x}} + \frac{\ln(x)}{2 \sqrt{x}} \\ & = \boxed{\frac{\ln(x) + 2}{2 \sqrt{x}}}. \end{align*}\]
There you go.