The Product Rule for Differentiation

The product rule is the method used to differentiate the product of two functions, that's two functions being multiplied by one another.

For instance, if we were given the function defined as: \[f(x)=x^2sin(x)\] this is the product of two functions, which we typically refer to as \(u(x)\) and \(v(x)\).

So, in the case of \(f(x)=x^2sin(x)\), we would define \(u(x)=x^2\) and \(v(x)=sin(x)\), to write: \[f(x)=u(x)\times v(x)\]

Product Rule

Given a function that can be written as the product of two functions: \[f(x)=u(x).v(x)\] we can differentiate this function using the product rule: \[\text{if} \quad f(x)=u(x). v(x)\] \[\text{then} \quad f'(x)=u'(x).v(x)+u(x).v'(x)\] This formula is further explained and illustrated, with some worked examples, in the following tutorial.

Tutorial

In the following tutorial we review the product rule and learn how to use it with some examples.

Exercise 1

Differentiate each of the following:

  1. \(f(x) = 5x.cos(x)\)
  2. \(y=x^2.ln(x)\)
  3. \(y= \begin{pmatrix} 2x^3 - 2x \end{pmatrix} e^x \)
  4. \(f(x) = 5.ln(x)tan(x)\)
  5. \(y= 2 sin(x) \sqrt{x}\)
  6. \(f(x) = \sqrt[3]{x}\begin{pmatrix} x^3-2x \end{pmatrix}\)
  7. \(y = \frac{3}{x} \begin{pmatrix}2x^5 - 2 \end{pmatrix}\)
  8. \(f(x) = 3.sin(x).cos(x)\)
The following derivatives are typically seen in higher level mathematicscourses=:
  1. \(y = 4x^2.tan^{-1}(x)\)
  2. \(f(x) = 2^x.cos(x)\)
  3. \(f(x) = 8x.sin^{-1}(x)\)
  4. \(y = x^2.3^x\)

Answers Without Working

  1. \(f'(x) = 5cos(x)-5xsin(x)\)
  2. \(\frac{dy}{dx} = 2x.ln(x)+x \)
  3. \(f'(x) = e^x \begin{pmatrix} 2x^3 + 6x^2 - 2x - 2 \end{pmatrix}\)
  4. \(f'(x) = \frac{5tan(x)}{x} + 5ln(x).sec^2(x)\)
  5. \(\frac{dy}{dx} = 2\sqrt{x}.cos(x) + \frac{sin(x)}{\sqrt{x}}\)
  6. \(f'(x) = \frac{10 \sqrt[3]{x}}{3} - \frac{8 \sqrt[3]{x}}{3}\)

Solution With Working

  1. The function \(f(x) = 5x.cos(x)\) can be written \(f(x) = u(x).v(x)\).

    Where \[u(x) = 5x \quad \text{and}\quad v(x) = cos(x)\] and \[u'(x) = 5 \quad \text{and} \quad v'(x) = -sin(x)\] Using the product rule we can now find the derivative: \[\begin{aligned} f'(x) &= u'(x).v(x)+ u(x).v'(x) \\ & = 5.cos(x) + 5x.\begin{pmatrix}-sin(x) \end{pmatrix} \\ f'(x) & = 5cos(x) -5xsin(x) \end{aligned}\]

  2. The function \(y = x^2.ln(x)\) can be written \(y = u(x).v(x)\).
    Where \[u(x) = x^2 \quad \text{and} \quad v(x) = ln(x)\] and \[u'(x) = 2x \quad \text{and} \quad v'(x) = \frac{1}{x}\] Using the product rule we can now find the derivative: \[\begin{aligned} \frac{dy}{dx} & = u'(x).v(x) + u(x).v'(x) \\ & = 2x.ln(x) + x^2.\frac{1}{x} \\ & = 2x.ln(x) + \frac{x^2}{x} \\ \frac{dy}{dx} & = 2x.ln(x) + x \end{aligned}\]

  3. The function \(y = \begin{pmatrix} 2x^3 - 2x \end{pmatrix} e^x\) can be written \(y = u(x).v(x)\).
    Where \[u(x) = 2x^3 - 2x \quad \text{and} \quad v(x) = e^x \] and \[u'(x) = 6x^2 - 2 \quad \text{and} \quad v'(x) = e^x \] Using the product rule we can now find the derivative: \[\begin{aligned} f'(x) & = u'(x).v(x) + u(x).v'(x) \\ & = \begin{pmatrix} 6x^2 - 2 \end{pmatrix} e^x + \begin{pmatrix} 2x^3 - 2x \end{pmatrix} e^x \\ & = e^x \begin{pmatrix} 6x^2 - 2 + 2x^3 - 2x \end{pmatrix} \\ f'(x) &= e^x \begin{pmatrix} 2x^3+6x^2 -2x - 2 \end{pmatrix} \end{aligned}\]

  4. We can write \(f(x) = 5ln(x)tan(x)\) as \(f(x) = u(x).v(x)\).
    Where \[u(x) = 5ln(x) \quad \text{and} \quad v(x) = tan(x)\] and \[u'(x) = \frac{5}{x} \quad \text{and} \quad v'(x) = sec^2(x)\] Using the product rule we can now find the derivative: \[\begin{aligned} f'(x) & = u'(x).v(x) + u(x).v'(x) \\ & = \frac{5}{x}.tan(x) + 5ln(x).sec^2(x)\\ f'(x) & =\frac{5tan(x)}{x} + 5ln(x).sec^2(x) \end{aligned}\]

  5. The function \(y=2sin(x)\sqrt{x}\) can be written \(y = u(x).v(x)\), where: \[u(x) = 2sin(x) \quad \text{and} \quad v(x) = \sqrt{x}\] and \[u'(x) = 2cos(x) \quad \text{and} \quad v'(x) = \frac{1}{2\sqrt{x}}\] Using the product rule we can find the derivative: \[\begin{aligned} \frac{dy}{dx} & = u'(x).v(x) + u(x).v'(x) \\ & = 2cos(x).\sqrt{x} + 2sin(x).\frac{1}{2\sqrt{x}} \\ & = 2cos(x)\sqrt{x} + \frac{2sin(x)}{2\sqrt{x}} \\ \frac{dy}{dx} & = 2\sqrt{x}cos(x) + \frac{sin(x)}{\sqrt{x}} \end{aligned}\]

  6. The function \(f(x) = \sqrt[3]{x} \begin{pmatrix} x^3 - 2x \end{pmatrix}\) can be written \(f(x) = u(x).v(x)\), where: \[u(x) = \sqrt[3]{x} \quad \text{and} \quad v(x) = x^3 - 2x \] and \[u'(x) = \frac{1}{3\sqrt[3]{x^2}} \quad \text{and} \quad v'(x) = 3x^2 - 2 \] Using the product rule we can find the derivative: \[\begin{aligned} f'(x) & = u'(x).v(x) + u(x).v'(x) \\ & = \frac{1}{3\sqrt[3]{x^2}} \begin{pmatrix} x^3 - 2x \end{pmatrix} + \sqrt[3]{x} \begin{pmatrix} 3x^2 - 2 \end{pmatrix} \\ & = \frac{x^3 - 2x}{3\sqrt[3]{x^2}} + \sqrt[3]{x} .3x^2 - \sqrt[3]{x}.2 \\ & = \frac{x^3}{3\sqrt[3]{x^2}} - \frac{2x}{3\sqrt[3]{x^2}} + 3x^{\frac{1}{3}} .x^2 - 2\sqrt[3]{x} \\ & = \frac{x^3}{3x^{\frac{2}{3}}} - \frac{2x}{3x^{\frac{2}{3}}} + 3x^{\frac{1}{3}+2} - 2\sqrt[3]{x} \\ & = \frac{x^3.x^{-\frac{2}{3}}}{3} - \frac{2x.x^{-\frac{2}{3}}}{3} + 3x^{\frac{7}{3}} - 2\sqrt[3]{x} \\ & = \frac{x^{3-\frac{2}{3}}}{3} - \frac{2x^{1-\frac{2}{3}}}{3} + 3\sqrt[3]{x^7} - 2\sqrt[3]{x} \\ & = \frac{x^{\frac{7}{3}}}{3} - \frac{2x^{\frac{1}{3}}}{3} + 3\sqrt[3]{x^7} - 2\sqrt[3]{x} \\ & = \frac{\sqrt[3]{x^7}}{3} - \frac{2\sqrt[3]{x}}{3} + 3\sqrt[3]{x^7} - 2\sqrt[3]{x} \\ f'(x) & = \frac{10\sqrt[3]{x^7}}{3} - \frac{8\sqrt[3]{x}}{3} \end{aligned}\]

Exercise 2

Consider the curve defined by \(y=2x.ln(x)\).

  1. Calculate the height of this curve when \(x = 1\).
  2. Find an expression for \(\frac{dy}{dx}\).
  3. Calculate the gradient of the curve when \(x = 1\).
  4. Find the equation of the tangent to the curve, at the point with \(x\)-coordinate \(x = 1\).
  5. Find the equation of the tangent to the curve, at the point with \(x\)-coordinate \(x = 1\).

Solution Without Working

  1. \(y=0\)
  2. \(\frac{dy}{dx} = 2.ln(x)+2\)
  3. \(\frac{dy}{dx} = 2 \)
  4. \(y = 2x - 2\)
  5. \(y = - \frac{x}{2} + \frac{1}{2}\)

Solution With Working

  1. The height of the curve, at any value of \(x\), is calculated with its equation \(y=2x.ln(x)\).
    When \(x = 1\) that's: \[\begin{aligned} y & = 2 \times 1 \times ln(1) \\ & = 2 \times 1 \times 0 \\ y & = 0 \end{aligned}\]

  2. To find the derivative, \(\frac{dy}{dx}\), we use the product rule.
    Let \[u(x) = 2x \quad \text{and} \quad v(x) = ln(x)\] Then \[u'(x) = 2 \quad \text{and} \quad v'(x) = \frac{1}{x}\] Now, using the product rule, we find the derivative: \[ \begin{aligned} \frac{dy}{dx}&= u'(x).v(x) + u(x).v'(x) \\ & = 2.ln(x)+ 2x.\frac{1}{x} \\ & = 2ln(x)+\frac{2x}{x} \\ \frac{dy}{dx} &= 2ln(x) + 2 \end{aligned}\]

  3. The gradient of the curve, when \(x=1\), equals to the value of \( \frac{dy}{dx} = 2ln(x) + 2\) when \(x = 1\).
    That's: \[\begin{aligned} \frac{dy}{dx} &= 2 .ln(1) + 2 \\ & = 2 \times 0 + 2 \\ \frac{dy}{dx} &= 2\end{aligned}\]

  4. To find the tangent to the curve when \(x = 1\), we follow our two-step method:

    • Step 1: find the gradient of the curve when \(x = 1\).
      This was done in question 3). The gradient is: \[m = 2\]
    • Step 2: rearrange the formula \(y - b = m \begin{pmatrix} x - a \end{pmatrix}\), where \(a\) and \(b\) are the \(x\) and \(y\) coordinates of the point along the curve.
      We know that \(a = 1\) and in question 1) we found \(b = 0\). So the formula becomes: \[y - 0 = 2 \begin{pmatrix} x - 1 \end{pmatrix}\] This leads to the tangent's equation: \[y = 2x - 2 \]

  5. To find the normal to the curve at the same point, we follow our two-step method for normals:
    • Step 1: find the normal's gradient, using the fact that is is calculated with the formula: \[m = - \frac{1}{\text{gradient of the curve}}\] at the point \(\begin{pmatrix}1,0\end{pmatrix}\).
      We know, from question 3), that the gradient of the curve at this point is \(2\) so the gradient of the normal is: \[m = - \frac{1}{2}\]

    • Step 2: find the equation of the normal by rearranging the formula \(y-b = m\begin{pmatrix} x - a \end{pmatrix}\), where \(\begin{pmatrix} a,b \end{pmatrix} = \begin{pmatrix} 1,0 \end{pmatrix}\) and \(m = - \frac{1}{2}\).
      That's: \[ y - 0 = - \frac{1}{2} \begin{pmatrix} x - 1 \end{pmatrix}\] This leads us to the equation for the normal: \[y = -\frac{x}{2} + \frac{1}{2}\]