(D2) Product Rule#

By the end of the lesson you will be able to:

  • compute the derivative of a product of functions.

Lecture Videos#


Product Rule#

Product Rule

\[\begin{split} \dfrac{d}{dx}\big[F(x)& \cdot S(x)\big]\\ &= \dfrac{d}{dx}\big[F(x)\big] \cdot S(x)+ F(x)\cdot \dfrac{d}{dx}\big[S(x)\big] \\ & \\ &= \big[F(x)\big]' \cdot S(x)+ F(x)\cdot \big[S(x)\big]'\\ \end{split}\]

Usage

This rule tells us how to differentiate the product of two functions. Essentially, if we see two variable terms being multiplied together, we need to use product rule.

You can implement this rule by:

  1. Writing 2 copies of the product.

  2. In the 1st copy, apply the derivative to the 1st term.

  3. In the 2nd copy, apply the derivative to the 2nd term.

  4. Put a \(+\) sign in between the copies.

\[ \big[F(x) \cdot S(x)\big]' = \color{blue}{F(x)\cdot S(x)} \qquad \color{blue}{F(x)\cdot S(x)} \]

We start by writing 2 copies of the product.

\[ \big[F(x) \cdot S(x)\big]' = \color{blue}{\big[}\color{black}F(x)\color{blue}{\big]'} \color{black} \cdot S(x) \qquad F(x)\cdot S(x) \]

In the 1st copy, we apply the derivative to the 1st term.

\[ \big[F(x) \cdot S(x)\big]' = \big[F(x)\big]' \cdot S(x)\qquad F(x)\cdot \color{blue}{\big[}\color{black} S(x)\color{blue}{\big]'} \]

In the 2nd copy, we apply the derivative to the 2nd term.

\[ \big[F(x) \cdot S(x)\big]'= \big[F(x)\big]' \cdot S(x) \color{blue}{\;+\;} \color{black} F(x)\cdot \big[S(x)\big]' \]

Finally, we put an addition \(+\) sign in between the two copies. And there we have our product rule! (From here, we would then continue differentiating the terms in the brackets.)


Example 1#

Differentiate the function \(y=(2x^3-5x)(3x+1)\).

Click through the tabs to see the steps of our solution.

  • We start by first identifying which derivative rules we might need to use.

The first step, is to identify that we actually have a product containing two \(x\)-terms. To really illustrate this, we emphasize the multiplication:

\[ y=(2x^3-5x)\cdot(3x+1) \]

Notice that the first term \((2x^3-5x)\) contains variable \(x\) and the second term \((3x+1)\) does as well. This shows that we really do have a product of two functions of \(x\), so the product rule is applicable.

Once we’ve recognized our function as a product, the next step is to actually implement the product rule:

\[ y'=\color{blue}{\big[}(2x^3-5x)\color{blue}{\big]'}(3x+1)+(2x^3-5x)\color{blue}{\big[}(3x+1)\color{blue}{\big]'} \]

Once we’ve applied the product rule, we need to continue differentiating each of the factors:

\[\begin{split} y'&=\big[(2x^3-5x)\big]'(3x+1)+(2x^3-5x)\big[(3x+1)\big]'\\ & \\ &=(6x^2-5)(3x+1)+(2x^3-5x)(3)\\\end{split}\]

This is our derivative, so it is fine to stop here, but we could also simplify this result if needed.

In some cases, the product rule is not always needed.

For this problem, we could have actually avoided using the product rule by doing the multiplication first. Sometimes this is possible: do the multiplication in the function first, simplify that result as much as possible, and then proceed to the differentiation.

Doing the multiplication we get:

\[\begin{split} y&=(2x^3-5x)\cdot(3x+1) \\ & \\ & = 6x^4+2x^3-15x^2-5x \\ \end{split}\]

And now we can apply our basic differentiation rules:

\[\begin{split} y' & = \big[6x^4\big]'+\big[2x^3\big]'-\big[15x^2\big]'-\big[5x\big]' \\ & \\ & = 24x^3+6x^2-30x-5 \end{split}\]

Example 2#

Differentiate the function \(h(t)=\sqrt{\,t\,}(5t+2)\).

Click through the tabs to see the steps of our solution.

  • We start by first identifying which derivative rules we might need to use.

The first step, is to identify that we actually have a product containing two variable-terms. To really illustrate this, we emphasize the multiplication:

\[ h(t)=\sqrt{\,t\,}(5t+2) \]

Notice that the first term \(\sqrt{\,t\,}\) contains variable \(t\) and the second term \((5t+2)\) does as well. This shows that we really do have a product of two functions of \(t\), so the product rule is applicable.

Once we’ve recognized our function as a product, the next step is to actually implement the product rule:

\[ h'(t)=\color{blue}{\big[}\sqrt{\,t\,}\color{blue}{\big]'}(5t+2)+\sqrt{\,t\,}\color{blue}{\big[}(5t+2)\color{blue}{\big]'} \]

Once we’ve applied the product rule, we need to continue differentiating each of the factors:

\[\begin{split} h'(t)&=\big[\sqrt{\,t\,}\big]'(5t+2)+\sqrt{\,t\,}\big[(5t+2)\big]'\\ & \\ &=\big[t^{1/2}\big]'(5t+2)+t^{1/2}\big[(5t+2)\big]'\\ & \\ &=\tfrac{1}{2}t^{-1/2}(5t+2)+t^{1/2}\cdot 5\\ \end{split}\]

This is our derivative, so it is fine to stop here, but we could also simplify this result if needed.

Since we are working with the product of two power functions here, we can actually calculate the derivative here by first doing the multiplication and then just using our basic rules.

Doing the multiplication we get:

\[\begin{split} h(t)&=\sqrt{\,t\,}(5t+2) \\ & \\ &=t^{1/2}(5t+2) \\ & \\ &=5t^{3/2}+2t^{1/2} \\ & \\ \end{split}\]

And now we can apply our basic differentiation rules:

\[\begin{split} h'(t) & = \big[5t^{3/2}\big]'+\big[2t^{1/2}\big]' \\ & \\ & = \tfrac{15}{2}t^{1/2}+t^{-1/2} \end{split}\]

No product rule necessary (for this one)!


Example 3#

Calculate the second derivative \(y''\) for the function \(y=xe^x\).

Click through the tabs to see the steps of our solution.

Since we want to calculate the second derivative, this means we’re going to need to differentiate twice. Once to get the first derivative, and then again to get the second derivative.

Might we need to use product rule twice?

We ultimately want to calculate the second derivatve \(y''\). In order to do this, we need the first derivative.

Looking at the function:

\[ y=xe^x = x\cdot e^x \]

We see that this is indeed a product. The first term \((x)\) contains variable \(x\) and the second term \(e^x\) does as well. This shows that we really do have a product of two functions of \(s\), so the product rule is applicable. Unlike the previous two examples there is no way around it - we need to use product rule here.

Apply the rule and differentiate the remaining terms:

\[\begin{split} y' & =\color{blue}{\big[}x\color{blue}{\big]'}\cdot e^x + x\cdot \color{blue}{\big[}e^x\color{blue}{\big]'} \\ & \\ & = \color{blue}{\big(}1\color{blue}{\big)} \cdot e^x + x\cdot \color{blue}{\big(}e^x\color{blue}{\big)} \\ & \\ & = e^x + xe^x \\ \end{split}\]

Now this is a perfectly good answer for the first derivative. However, we want to keep differentiating to get the second derivative. It is usually helpful if we try to simplify our function at this point before going on:

Notice that we can factor an \(e^x\) term out, to get:

\[ y' = (x+1)\cdot e^x \]

(Not absolutely necessary here, but usually helpful.)

We have the first derivative, which we now need to differentiate to get the second derivative. If we look at our first derivative though, we see that we have another product:

\[ y' = (x+1)\cdot e^x \]

The first term \((x+1)\) contains variable \(x\) and the second term \(e^x\) does as well. More product rule!

Apply the rule and differentiate the remaining terms:

\[\begin{split} y'' & =\color{blue}{\big[}x+1\color{blue}{\big]'}\cdot e^x + (x+1)\cdot \color{blue}{\big[}e^x\color{blue}{\big]'} \\ & \\ & = \color{blue}{\big(} 1 \color{blue}{\big)} \cdot e^x + (x+1)\cdot \color{blue}{\big(} e^x \color{blue}{\big)} \\ & \\ & = e^x + (x+1)e^x \\ \end{split}\]

Now this is a perfectly good answer for the first derivative. However, we want to keep differentiating to get the second derivative. It is usually helpful if we try to simplify our derivative at this point before going on:

This is a fine answer. For the practice though, we can simplify by factoring out an \(e^x\) term:

\[\begin{split} y'' & = e^x + (x+1)e^x \\ & = (1 + x+1)\cdot e^x \\ & = (x+2)\cdot e^x \\ \end{split}\]

(Not absolutely necessary here, but usually helpful.)


Example 4#

Calculate the derivative of the following functions:

  1. \(f(x)=x^2\cos x\)

  2. \(g(x)=(2x+1)\arctan x\)

Click through the tabs to see the steps of our solution.

  • As usual, we start by first identifying which derivative rules we might need to use.

Identify Product - Looking at the function:

\[ f(x)=x^2\cdot \cos x \]

We see that this is indeed a product. The first term \((x^2)\) contains variable \(x\) and the second term \((\cos x)\) does as well. Product of two functions? Yes! –> We need to use the Product Rule.

Product Rule - Apply the rule and differentiate the remaining terms:

\[\begin{split} f'(x) & =\color{blue}{\big[}x^2\color{blue}{\big]'}\cdot \cos x + x^2\cdot \color{blue}{\big[} \cos x\color{blue}{\big]'} \\ & \\ & = \color{blue}{\big(} 2x\color{blue}{\big)} \cdot \cos x + x^2\cdot \color{blue}{\big(}-\sin x\color{blue}{\big)} \\ & \\ & = 2x\cos x - x^2\sin x \\ \end{split}\]

Done! There’s our derivative.

Identify Product - Looking at the function:

\[ g(x)=(2x+1)\cdot \arctan x \]

We see that this is indeed a product. The first term \((2x+1)\) contains variable \(x\) and the second term \((\arctan x)\) does as well. Product of two functions? Yes! –> We need to use the Product Rule.

Product Rule - Apply the rule and differentiate the remaining terms:

\[\begin{split} f'(x) & =\color{blue}{\big[} 2x+1 \color{blue}{\big]'}\cdot \arctan x + (2x+1)\cdot \color{blue}{\big[} \arctan x \color{blue}{\big]'} \\ & \\ & = \color{blue}{\big(} 2 \color{blue}{\big)}\cdot \arctan x + (2x+1)\cdot \color{blue}{\Bigg(}\dfrac{1}{1+x^2}\color{blue}{\Bigg)} \\ & \\ & = 2\arctan x - \dfrac{2x+1}{1+x^2} \\ \end{split}\]

Another derivative calculated using product rule!