Skip to contentSkip to lesson map

Product and Quotient Rules II

Status
Updates coming
Reading
MMAC Ch 4.4, pp 407-422
Lesson map

Objectives

  1. Use basic rules plus the product and quotient rules to find derivatives by hand.
  2. Using R, obtain and plot the derivative of a function.

1. Derivatives by Hand

Objective. Use basic rules plus the product and quotient rules to find derivatives by hand.

Order of work. Finding a derivative by hand combines the basic rules from sections 2 to 4 of the Lesson 29 Notes with the product and quotient rules from section 2 of the Lesson 30 Notes.

  1. Rewrite roots and reciprocals of powers of xx as powers, as in x=x1/2\sqrt{x} = x^{1/2} and 1/x2=x−21/x^2 = x^{-2}.
  2. Identify the main operation: a sum, a constant multiple, a product, or a quotient.
  3. For a sum, differentiate term by term. For a constant multiple, keep the constant and differentiate the function it multiplies. Apply steps 4 and 5 to each term or function that is a product or a quotient.
  4. For a product or a quotient, name uu and vv: the factors of a product, or the numerator and denominator of a quotient.
  5. Find u′u' and v′v'. When uu or vv is itself a product or a quotient, find its derivative by the same steps. Substitute uu, u′u', vv, and v′v', each in parentheses, into the product rule or the quotient rule.
  6. Simplify the result.

Example 1

For the function

y=x4−3x2+6x2, y = \frac{x^4 - 3x^2 + 6}{x^2},

find y′y' by simplifying first. Then find y′y' by the quotient rule.

ShowHide solution

To simplify first, divide each term of the numerator by x2x^2:

y=x4x2−3x2x2+6x2=x2−3+6x−2. y = \frac{x^4}{x^2} - \frac{3x^2}{x^2} + \frac{6}{x^2} = x^2 - 3 + 6x^{-2}.

Differentiate term by term with the power, constant multiple, and sum rules:

y′=2x−0+6(−2)x−3=2x−12x−3=2x−12x3. y' = 2x - 0 + 6(-2)x^{-3} = 2x - 12x^{-3} = 2x - \frac{12}{x^3}.

For the quotient rule, find the derivatives of the numerator uu and the denominator vv:

u=x4−3x2+6,u′=4x3−6x,v=x2,v′=2x. u = x^4 - 3x^2 + 6, \qquad u' = 4x^3 - 6x, \qquad v = x^2, \qquad v' = 2x.

Substitute uu, u′u', vv, and v′v' into the quotient rule, (uv)′=u′v−uv′v2\left(\dfrac{u}{v}\right)' = \dfrac{u'v - uv'}{v^2}, and expand the numerator:

y′=(4x3−6x)x2−(x4−3x2+6)(2x)(x2)2=4x5−6x3−(2x5−6x3+12x)x4=2x5−12xx4=2x−12x3. y' = \frac{(4x^3 - 6x)x^2 - (x^4 - 3x^2 + 6)(2x)}{(x^2)^2} = \frac{4x^5 - 6x^3 - (2x^5 - 6x^3 + 12x)}{x^4} = \frac{2x^5 - 12x}{x^4} = 2x - \frac{12}{x^3}.

The two methods give the same derivative, and simplifying first takes fewer steps.

Example 2

Find the derivative:

y=4ex3x−2ln⁡(x)+5x3. y = 4e^x 3^x - 2\ln(x) + 5x^3.
ShowHide solution

The main operation is a sum. Its first term is 4 times the product ex3xe^x 3^x. Differentiate the product by substituting u=exu = e^x, u′=exu' = e^x, v=3xv = 3^x, and v′=3xln⁡(3)v' = 3^x\ln(3) into the product rule, (uv)′=u′v+uv′(uv)' = u'v + uv':

ddx(ex3x)=ex3x+ex3xln⁡(3)=ex3x(1+ln⁡(3)). \frac{d}{dx}\big(e^x 3^x\big) = e^x 3^x + e^x 3^x\ln(3) = e^x 3^x\big(1 + \ln(3)\big).

Differentiate the whole sum term by term with the constant multiple, logarithm, and power rules:

y′=4ex3x(1+ln⁡(3))−2⋅1x+5⋅3x2=4ex3x(1+ln⁡(3))−2x+15x2. y' = 4e^x 3^x\big(1 + \ln(3)\big) - 2 \cdot \frac{1}{x} + 5 \cdot 3x^2 = 4e^x 3^x\big(1 + \ln(3)\big) - \frac{2}{x} + 15x^2.

Example 3

Find the derivative:

f(x)=x5−xcos⁡(x). f(x) = \frac{x^5 - \sqrt{x}}{\cos(x)}.
ShowHide solution

The main operation is a quotient. Rewrite x\sqrt{x} as x1/2x^{1/2}, and write the numerator uu and the denominator vv with their derivatives:

u=x5−x1/2,u′=5x4−12x−1/2,v=cos⁡(x),v′=−sin⁡(x). u = x^5 - x^{1/2}, \qquad u' = 5x^4 - \tfrac{1}{2}x^{-1/2}, \qquad v = \cos(x), \qquad v' = -\sin(x).

Substitute uu, u′u', vv, and v′v' into the quotient rule. Since v′=−sin⁡(x)v' = -\sin(x), the term −uv′-uv' becomes +(x5−x)sin⁡(x)+\bigl(x^5 - \sqrt{x}\bigr)\sin(x) in the numerator. In the second line, x1/2x^{1/2} and x−1/2x^{-1/2} are written as roots again:

f′(x)=(5x4−12x−1/2)cos⁡(x)−(x5−x1/2)(−sin⁡(x))cos⁡2(x)=(5x4−12x)cos⁡(x)+(x5−x)sin⁡(x)cos⁡2(x).\begin{align*} f'(x) &= \frac{\left(5x^4 - \tfrac{1}{2}x^{-1/2}\right)\cos(x) - \left(x^5 - x^{1/2}\right)\big(-\sin(x)\big)}{\cos^2(x)}\\ &= \frac{\left(5x^4 - \dfrac{1}{2\sqrt{x}}\right)\cos(x) + \left(x^5 - \sqrt{x}\right)\sin(x)}{\cos^2(x)}. \end{align*}

Example 4

Find the derivative:

y=cos⁡(x)(x3+1) ex. y = \frac{\cos(x)}{(x^3 + 1)\,e^x}.
ShowHide solution

The main operation is a quotient with u=cos⁡(x)u = \cos(x), u′=−sin⁡(x)u' = -\sin(x), and v=(x3+1)exv = (x^3 + 1)e^x. The denominator is itself a product. Find v′v' by the product rule, with factors x3+1x^3 + 1 and exe^x and their derivatives 3x23x^2 and exe^x:

v′=3x2ex+(x3+1)ex=ex(x3+3x2+1). v' = 3x^2 e^x + (x^3 + 1)e^x = e^x(x^3 + 3x^2 + 1).

Substitute uu, u′u', vv, and v′v' into the quotient rule:

y′=(−sin⁡(x))(x3+1)ex−cos⁡(x) ex(x3+3x2+1)(x3+1)2(ex)2. y' = \frac{\big(-\sin(x)\big)(x^3 + 1)e^x - \cos(x)\,e^x(x^3 + 3x^2 + 1)}{(x^3 + 1)^2 (e^x)^2}.

Factor exe^x out of the numerator and cancel it against one factor of (ex)2(e^x)^2:

y′=ex(−(x3+1)sin⁡(x)−(x3+3x2+1)cos⁡(x))(x3+1)2exex=−(x3+1)sin⁡(x)−(x3+3x2+1)cos⁡(x)(x3+1)2ex. y' = \frac{e^x\big(-(x^3 + 1)\sin(x) - (x^3 + 3x^2 + 1)\cos(x)\big)}{(x^3 + 1)^2 e^x e^x} = \frac{-(x^3 + 1)\sin(x) - (x^3 + 3x^2 + 1)\cos(x)}{(x^3 + 1)^2 e^x}.

The product rule applied to (uv)w(uv)w, and again to uvuv, gives the product rule for three functions.

Rule 1 (Product rule for three functions).

Let u(x)u(x), v(x)v(x), and w(x)w(x) be differentiable functions. Then

(uvw)′=u′vw+uv′w+uvw′. (uvw)' = u'vw + uv'w + uvw'.

Example 5

Find the derivative:

y=x2exsin⁡(x). y = x^2 e^x \sin(x).
ShowHide solution

Name the three factors and their derivatives:

u=x2,u′=2x,v=ex,v′=ex,w=sin⁡(x),w′=cos⁡(x). u = x^2, \quad u' = 2x, \qquad v = e^x, \quad v' = e^x, \qquad w = \sin(x), \quad w' = \cos(x).

Substitute the three factors and their derivatives into the product rule for three functions, and factor out exe^x:

y′=2xexsin⁡(x)+x2exsin⁡(x)+x2excos⁡(x)=ex(2xsin⁡(x)+x2sin⁡(x)+x2cos⁡(x)). y' = 2x e^x\sin(x) + x^2 e^x\sin(x) + x^2 e^x\cos(x) = e^x\big(2x\sin(x) + x^2\sin(x) + x^2\cos(x)\big).

Matching answer choices.

  1. Substitute uu, u′u', vv, and v′v' into the product rule or the quotient rule.
  2. Simplify the result.
  3. Compare the result with each choice.

Example 6

Determine which choice is the derivative of

f(x)=ln⁡(x)x3+x. f(x) = \frac{\ln(x)}{x^3 + x}.
(a) ln⁡(x)(3x2+1)−1x(x3+x)(x3+x)2\dfrac{\ln(x)(3x^2 + 1) - \frac{1}{x}(x^3 + x)}{(x^3 + x)^2}(b) 1x(x3+x)+ln⁡(x)(3x2+1)(x3+x)2\dfrac{\frac{1}{x}(x^3 + x) + \ln(x)(3x^2 + 1)}{(x^3 + x)^2}
(c) 1x(x3+x)−ln⁡(x)(3x2+1)x3+x\dfrac{\frac{1}{x}(x^3 + x) - \ln(x)(3x^2 + 1)}{x^3 + x}(d) x2+1−(3x2+1)ln⁡(x)(x3+x)2\dfrac{x^2 + 1 - (3x^2 + 1)\ln(x)}{(x^3 + x)^2}
ShowHide solution

Substitute u=ln⁡(x)u = \ln(x), u′=1/xu' = 1/x, v=x3+xv = x^3 + x, and v′=3x2+1v' = 3x^2 + 1 into the quotient rule:

f′(x)=1x(x3+x)−ln⁡(x)(3x2+1)(x3+x)2. f'(x) = \frac{\frac{1}{x}(x^3 + x) - \ln(x)(3x^2 + 1)}{(x^3 + x)^2}.

Simplify the first term of the numerator, 1x(x3+x)=x2+1\frac{1}{x}(x^3 + x) = x^2 + 1:

f′(x)=x2+1−(3x2+1)ln⁡(x)(x3+x)2. f'(x) = \frac{x^2 + 1 - (3x^2 + 1)\ln(x)}{(x^3 + x)^2}.

Choice (d) matches this derivative. Choice (a) subtracts the numerator’s terms in the opposite order, choice (b) adds them, and choice (c) has no square in the denominator.

Lesson map

2. Derivatives in R

Objective. Using R, obtain and plot the derivative of a function.

Plotting a derivative. The command D() from section 5 of the Lesson 29 Notes returns the derivative as a function. Give it a name, as in df = D(f(x) ~ x), so that later commands can use it. To plot df for a≤x≤ba \le x \le b, with the vertical axis from cc to dd, use the command

plotFun(df(x) ~ x, xlim = range(a, b), ylim = range(c, d))

Roots in R. For positive xx, the cube root of xx is x^(1/3), with the exponent in parentheses. Without them, R reads x^1/3 as x1x^1 divided by 3 and gives a wrong value with no error:

> 8^(1/3)
[1] 2
> 8^1/3
[1] 2.666667

Example 7

For the function

f(x)=x5−xcos⁡(x), f(x) = \frac{x^5 - \sqrt{x}}{\cos(x)},

find f′(1)f'(1) in R. Then plot f′f' for 0.2≤x≤1.20.2 \le x \le 1.2, with the vertical axis from −5-5 to 4040.

ShowHide solution

Define ff, differentiate it with D(), evaluate the derivative at 1, and plot it over the requested window. Used R.

f = makeFun((x^5 - sqrt(x)) / cos(x) ~ x)
df = D(f(x) ~ x)
df(1)
[1] 8.328671
plotFun(df(x) ~ x, xlim = range(0.2, 1.2), ylim = range(-5, 40))

To three decimals, f′(1)≈8.329f'(1) \approx 8.329. As a check by the quotient rule with u=x5−xu = x^5 - \sqrt{x} and v=cos⁡(x)v = \cos(x), the values u(1)=0u(1) = 0, u′(1)=5−12=4.5u'(1) = 5 - \tfrac{1}{2} = 4.5, v(1)=cos⁡(1)v(1) = \cos(1), and v′(1)=−sin⁡(1)v'(1) = -\sin(1) give the same value:

f′(1)=u′(1)v(1)−u(1)v′(1)v(1)2=4.5cos⁡(1)−0cos⁡2(1)=4.5cos⁡(1)≈8.329. f'(1) = \frac{u'(1)v(1) - u(1)v'(1)}{v(1)^2} = \frac{4.5\cos(1) - 0}{\cos^2(1)} = \frac{4.5}{\cos(1)} \approx 8.329.

The plot is the graph of f′f' over 0.2≤x≤1.20.2 \le x \le 1.2. The value f′(1)≈8.329f'(1) \approx 8.329 is the height of that graph at x=1x = 1, the marked point.

Figure

Example 8

For the function

g(x)=xcos⁡(x), g(x) = x\cos(x),

determine which curve is the graph of g′(x)g'(x). Evaluate g′(2)g'(2) in R.

Figure
ShowHide solution

Find g′g' by the product rule, with u=xu = x and v=cos⁡(x)v = \cos(x):

g′(x)=(1)cos⁡(x)+x(−sin⁡(x))=cos⁡(x)−xsin⁡(x). g'(x) = (1)\cos(x) + x\big(-\sin(x)\big) = \cos(x) - x\sin(x).

Evaluate g′(2)g'(2) to locate one point on the graph of g′g'. Used R.

g = makeFun(x*cos(x) ~ x)
dg = D(g(x) ~ x)
dg(2)
[1] -2.234742

The formula for g′g' found by the product rule gives the same value:

g′(2)=cos⁡(2)−2sin⁡(2)≈−0.416−1.819=−2.235. g'(2) = \cos(2) - 2\sin(2) \approx -0.416 - 1.819 = -2.235.

At x=2x = 2, curve C is the only curve that passes through (2,g′(2))≈(2,−2.235)(2, g'(2)) \approx (2, -2.235). The other three curves sit above −1-1 there. Curve C is therefore the graph of g′g'.

Example 9

The concentration of a drug in the blood, in milligrams per liter, tt hours after a dose, is modeled by

C(t)=20tt2+4. C(t) = \frac{20t}{t^2 + 4}.

Find C′(1)C'(1) and C′(3)C'(3) in R. Give the units of C′C'. Determine whether the concentration is increasing or decreasing three hours after the dose.

ShowHide solution

Define CC, differentiate it with D(), and evaluate C′C' at 1 and 3. Used R.

C = makeFun(20*t / (t^2 + 4) ~ t)
dC = D(C(t) ~ t)
dC(1)
[1] 2.4
dC(3)
[1] -0.591716

The units of C′C' are the units of CC per unit of tt: milligrams per liter per hour.

One hour after the dose, the concentration is increasing at 2.4 milligrams per liter per hour, because C′(1)=2.4C'(1) = 2.4 is positive. Three hours after the dose, the concentration is decreasing at about 0.592 milligrams per liter per hour, because C′(3)≈−0.592C'(3) \approx -0.592 is negative. On the graph of CC, the tangent line rises at t=1t = 1 and falls at t=3t = 3.

Figure

Lesson map

Found a mistake, a broken tool or something unclear? Report a problem