Unit 2 · Topic 2.8

Differentiate a product

Builds on the derivative as a limit and the basic derivative rules. 11 minutes.

  1. Example 1Differentiate a product
  2. Example 2Use a product rule with data
  3. Example 3Apply a product derivative
  4. Example 4Find a missing value in the rule

The product of two functions \(f\) and \(g\) is the function \(fg\) whose value at each input is the product of their values:

\[(fg)(x)=f(x)\,g(x)\]

The derivative of a product is not, in general, the product of the derivatives. For \(x\cdot x^2=x^3\), the power rule gives the derivative \(3x^2\), while the derivatives of the factors, 1 and \(2x\), multiply to \(2x\). This topic finds the derivative of a product from the values and the derivatives of its factors.

Two strips and a corner

A teal rectangle in the corner of two axes, with its width f of x and its height g of x labeled inside it and the product f of x times g of x at its center. A green strip of width delta f runs along its right side and a green strip of height delta g along its top, with a faint corner between them, and a dashed line outlines the larger rectangle. A button divides each piece by h, which stretches the right strip to the width delta f over h and the top strip to the height delta g over h, while the corner keeps the width delta f. Another button gives f a vertical tangent at x. A red label then says that f prime of x does not exist, and the stretched strip on the right widens without bound as h shrinks.

Figure 1The teal rectangle is \(f(x)\) wide and \(g(x)\) high, and the dashed line outlines the rectangle at \(x+h\). The area gained is two green strips and a faint corner, and a red label marks a derivative that does not exist.

If \(f(x)\) and \(g(x)\) are positive, the product is the area of a rectangle \(f(x)\) wide and \(g(x)\) high, the teal rectangle in Figure 1. The slider under the figure sets a step \(h\). When the input increases from \(x\) to \(x+h\), the width changes by \(\Delta f=f(x+h)-f(x)\) and the height by \(\Delta g=g(x+h)-g(x)\).

The dashed line outlines the new rectangle, which is the old one plus three pieces. The green strip on the right is \(\Delta f\) wide and \(g(x)\) high, and the green strip on top is \(f(x)\) wide and \(\Delta g\) high. The faint corner is \(\Delta f\) wide and \(\Delta g\) high. Together the three pieces are the change in the product:

\[\begin{aligned}&f(x+h)\,g(x+h)-f(x)\,g(x)\\&\quad=\Delta f\,g(x)+f(x)\,\Delta g\\&\qquad+\Delta f\,\Delta g\end{aligned}\]

The equation is algebra: it comes from expanding \(\big(f(x)+\Delta f\big)\big(g(x)+\Delta g\big)\), which is \(f(x+h)\,g(x+h)\), and subtracting \(f(x)\,g(x)\). It therefore holds for every \(h\ne0\), positive or negative. It also holds for all values of \(f(x)\), \(g(x)\), \(\Delta f\) and \(\Delta g\), not only the positive ones in the figure.

Divide both sides by \(h\). The left side becomes the difference quotient of \(fg\) at \(x\):

\[\begin{aligned}&\frac{f(x+h)\,g(x+h)-f(x)\,g(x)}{h}\\&\quad=\frac{\Delta f}{h}\,g(x)+f(x)\,\frac{\Delta g}{h}\\&\qquad+\Delta f\,\frac{\Delta g}{h}\end{aligned}\]

Suppose that \(f\) and \(g\) are differentiable at \(x\), and let \(h\) approach 0. Then, by the definition of the derivative, \(\Delta f/h\) approaches \(f'(x)\) and \(\Delta g/h\) approaches \(g'(x)\). Because \(f\) is differentiable at \(x\), it is continuous there (topic 2.4), so \(\Delta f\) approaches 0. By the limit laws for sums and products (topic 1.5), the right side approaches \(f'(x)\,g(x)+f(x)\,g'(x)+0\cdot g'(x)\).

The two sides are equal for every \(h\ne0\), so the difference quotient of \(fg\) has the same limit. Therefore \(fg\) is differentiable at \(x\), and its derivative is \(f'(x)\,g(x)+f(x)\,g'(x)\). This result is the product rule. Each term differentiates one factor and keeps the other.

Use the button under Figure 1 to divide each piece by \(h\). The strip on the right becomes \(\Delta f/h\) wide and the strip on top \(\Delta g/h\) high. The corner keeps the width \(\Delta f\) and takes the height \(\Delta g/h\). Their areas are now the three terms on the right side. Shrink \(h\). The strip on the right approaches the width \(f'(x)\), the strip on top the height \(g'(x)\), and the corner narrows toward a width of 0.

The product of the derivatives, \(f'(x)\,g'(x)\), comes from the corner alone. It is the limit of \(\frac{\Delta f}{h}\cdot\frac{\Delta g}{h}\), the area of the corner divided by \(h\) twice. The derivative of \(fg\) divides by \(h\) only once, so it keeps the two strips and loses the corner.

For \(x\cdot x^2\), the rule gives \(1\cdot x^2+x\cdot 2x=3x^2\), as the power rule does. If \(g\) is a constant \(c\), then \(g'=0\), and the rule gives \(c\,f'\), the constant multiple rule of topic 2.6. In Leibniz notation, with \(u=f(x)\) and \(v=g(x)\), the rule reads \(\frac{d}{dx}(uv)=\frac{du}{dx}\,v+u\,\frac{dv}{dx}\).

The argument needs both factors to be differentiable at \(x\). With the pieces divided by \(h\), use the button under Figure 1 to give the graph of \(f\) a vertical tangent at \(x\) (topic 2.4). Slide \(h\) down from 1. The strip on the right widens until it leaves the figure, because \(\Delta f/h\) grows without bound, so \(f'(x)\) does not exist. That strip is \(g(x)\) high, which is not 0, so its area, the first term, grows without bound. The other terms stay bounded, so \(fg\) has no derivative at \(x\) either.

Without the hypothesis, the rule does not apply, but a product can still have a derivative. The graph of \(\sqrt[3]{x}\) has a vertical tangent at 0, yet \(x\sqrt[3]{x}\) has the derivative 0 there. Its difference quotient at 0 is \(\frac{h\sqrt[3]{h}}{h}=\sqrt[3]{h}\), which approaches 0. The other factor, \(x\), is 0 at 0, so the strip on the right has no height.

Values, rates and missing numbers

At one input \(a\), the rule needs four numbers, \(f(a)\), \(g(a)\), \(f'(a)\) and \(g'(a)\), all taken at \(a\). A table gives them in its row for \(a\). For a factor given by a formula, evaluate the factor and its derivative at \(a\). The number \((fg)'(a)\) is the slope of the tangent line to the graph of \(y=f(x)\,g(x)\) at \(x=a\) (topic 2.1).

When the input is time, the rule gives the rate of change of a product of two changing quantities. A total mass, for example, is a number of fish times their average mass. The first term is the rate that the product would have if the second factor stayed at its present value. The second term is the rate if the first factor stayed fixed. Each term is in units of the product per unit of time.

The rule at \(a\) is also one equation in five numbers, \((fg)'(a)\) and the four that it needs. If four of them are known, solve the equation for the fifth. It has one solution when the number that multiplies the unknown is not 0. If \(f(a)=0\), for example, the term \(f(a)\,g'(a)\) is 0 for every value of \(g'(a)\), so the rule cannot give \(g'(a)\).

Example 1

Differentiate a product

Let \(y=x^3\ln x\). Find \(\dfrac{dy}{dx}\).

Solution

The function is defined for \(x>0\), where both factors are differentiable: \(x^3\) has the derivative \(3x^2\), and \(\ln x\) has the derivative \(\frac1x\) (topic 2.7). The product rule adds the derivative of \(x^3\) times \(\ln x\) and \(x^3\) times the derivative of \(\ln x\):

\[\frac{dy}{dx}=3x^2\cdot\ln x+x^3\cdot\frac1x\]

In the second term, \(x^3\cdot\frac1x=x^2\), so the two terms share the factor \(x^2\). For \(x>0\), therefore,

\[\begin{aligned}\frac{dy}{dx}&=3x^2\ln x+x^2\\&=x^2\,(3\ln x+1)\end{aligned}\]

Example 2

Use a product rule with data

The table gives values of the differentiable functions \(f\) and \(g\) and their derivatives. Let \(k(x)=f(x)\,g(x)\) and \(p(x)=x^2\,g(x)\). Find \(k'(3)\) and \(p'(3)\). \[\begin{array}{c|cccc} x & f(x) & f'(x) & g(x) & g'(x)\\ \hline 1 & 3 & 0 & 2 & -1\\ 2 & -1 & 4 & 8 & 1\\ 3 & 7 & -2 & -4 & 5\\ 4 & 1 & 3 & 10 & -3 \end{array}\]

Solution

The functions \(f\), \(g\) and \(x^2\) are differentiable at 3, so the product rule applies to both products. All its numbers come from the row \(x=3\): \(f(3)=7\), \(f'(3)=-2\), \(g(3)=-4\) and \(g'(3)=5\). Each term takes one derivative and one value:

\[\begin{aligned}k'(3)&=f'(3)\,g(3)+f(3)\,g'(3)\\&=(-2)(-4)+7\cdot5=43\end{aligned}\]

The factor \(x^2\) of \(p\) is not in the table. At \(x=3\), its value is 9 and its derivative \(2x\) is 6, so

\[\begin{aligned}p'(3)&=6\,g(3)+9\,g'(3)\\&=6(-4)+9\cdot5=21\end{aligned}\]

Example 3

Apply a product derivative

The number of trout in a pond is modeled by a differentiable function \(N(t)\), and their average mass in kilograms by a differentiable function \(m(t)\), with \(t\) in months. At \(t=5\), \(N=1300\) and \(m=0.85\); the number of trout is decreasing at 40 trout per month, and the average mass is increasing at 0.05 kilogram per month. Find the rate of change of the total mass of the trout at \(t=5\). Indicate units of measure.

Solution

The total mass is \(M(t)=N(t)\,m(t)\) kilograms. Both factors are differentiable, so the product rule applies, with \(N'(5)=-40\), negative because the number decreases, and \(m'(5)=0.05\):

\[\begin{aligned}&M'(5)\\&=N'(5)\,m(5)+N(5)\,m'(5)\\&=(-40)(0.85)+1300(0.05)\\&=-34+65=31\end{aligned}\]

The average mass is in kilograms per trout, so both terms are in kilograms per month. The first is the mass lost as the number falls, and the second the mass gained as the remaining trout grow. The gain is larger, so the total mass is increasing at 31 kilograms per month.

Example 4

Find a missing value in the rule

The functions \(f\) and \(g\) are differentiable, with \(f(2)=5\), \(f'(2)=3\) and \(g'(2)=-6\). The graph of \(y=f(x)\,g(x)\) has a horizontal tangent at \(x=2\). Find \(g(2)\).

Solution

A horizontal tangent has slope 0, so the derivative of \(fg\) at 2 is 0. Both functions are differentiable at 2, so the product rule at \(x=2\) gives an equation for the unknown \(g(2)\):

\[\begin{aligned}0&=f'(2)\,g(2)+f(2)\,g'(2)\\&=3\,g(2)+5(-6)\end{aligned}\]

The unknown is multiplied by \(f'(2)=3\), which is not 0, so the equation has one solution. Add 30 to both sides. Then divide by 3:

\[g(2)=\frac{30}{3}=10\]

Each example is one of the four skills of topic 2.8 in Which & Why: AP Calculus.