Class 12 Maths, Worked in Full Past papersGet updates
Chapter 5 · Continuity and Differentiability

Exercise 5.5 · Q17: Differentiate (x2−5x+8)(x3+7x+9)(x^2-5x+8)(x^3+7x+9) three ways

Exercise 5.5Logarithmic differentiation · Section 5.5
The question

Differentiate (x2−5x+8)(x3+7x+9)(x^2 - 5x + 8)(x^3 + 7x + 9) in three ways mentioned below:

(i) by using product rule

(ii) by expanding the product to obtain a single polynomial.

(iii) by logarithmic differentiation.

Do they all give the same answer?

Exam answer

Let y=(x2−5x+8)(x3+7x+9)y = (x^2 - 5x + 8)(x^3 + 7x + 9)⁠.

(i) By the product rule,

dydx=(2x−5)(x3+7x+9)+(x2−5x+8)×(3x2+7)=2x4−5x3+14x2−17x−45+3x4−15x3+31x2−35x+56\begin{aligned} \frac{dy}{dx} &= (2x - 5)(x^3 + 7x + 9) \\ &\quad + (x^2 - 5x + 8) \\ &\qquad\times(3x^2 + 7) \\ &= 2x^4 - 5x^3 + 14x^2 \\ &\quad - 17x - 45 \\ &\quad + 3x^4 - 15x^3 + 31x^2 \\ &\quad - 35x + 56 \end{aligned}

∴ dydx=5x4−20x3+45x2\therefore\ \frac{dy}{dx} = 5x^4 - 20x^3 + 45x^2 −52x+11- 52x + 11

(ii) Expanding the product,

y=x5+7x3+9x2−5x4−35x2−45x+8x3+56x+72=x5−5x4+15x3−26x2+11x+72\begin{aligned} y &= x^5 + 7x^3 + 9x^2 - 5x^4 \\ &\quad - 35x^2 - 45x + 8x^3 \\ &\quad + 56x + 72 \\ &= x^5 - 5x^4 + 15x^3 - 26x^2 \\ &\quad + 11x + 72 \end{aligned}

∴ dydx=5x4−20x3+45x2\therefore\ \frac{dy}{dx} = 5x^4 - 20x^3 + 45x^2 −52x+11- 52x + 11

(iii) Taking log on both sides,

log⁡y=log⁡(x2−5x+8)+log⁡(x3+7x+9)\begin{aligned} \log y &= \log(x^2 - 5x + 8) \\ &\quad + \log(x^3 + 7x + 9) \end{aligned}

Differentiating both sides w.r.t. xx⁠,

1ydydx=2x−5x2−5x+8+3x2+7x3+7x+9\begin{aligned} \frac1y\frac{dy}{dx} &= \frac{2x - 5}{x^2 - 5x + 8} \\ &\quad + \frac{3x^2 + 7}{x^3 + 7x + 9} \end{aligned}

Multiplying both sides by yy and cancelling,

dydx=(2x−5)(x3+7x+9)+(x2−5x+8)×(3x2+7)\begin{aligned} \frac{dy}{dx} &= (2x - 5)(x^3 + 7x + 9) \\ &\quad + (x^2 - 5x + 8) \\ &\qquad\times(3x^2 + 7) \end{aligned}

Expanding as in (i),

dydx=5x4−20x3+45x2\frac{dy}{dx} = 5x^4 - 20x^3 + 45x^2 −52x+11- 52x + 11

Yes, all three methods give the same answer.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

The derivative of a function does not depend on the method used to find it. Three correct methods must therefore give the same polynomial, possibly written differently; multiplying out shows they agree. Logarithmic differentiation, which needs positive quantities, turns out to reproduce the product rule exactly.

Given, to find, and the plan
Given
y=(x2−5x+8)(x3+7x+9)y = (x^2 - 5x + 8)(x^3 + 7x + 9)⁠. Write u=x2−5x+8u = x^2 - 5x + 8⁠, v=x3+7x+9v = x^3 + 7x + 9⁠.
To find
dydx\frac{dy}{dx} by each of the three methods; whether they agree.
Plan
Part (i): u′v+uv′u'v + uv'⁠, then expand. Part (ii): expand uvuv first, then differentiate term by term. Part (iii): find where uu⁠, vv are positive, take logs, differentiate, multiply back. Then compare.

Basics you need

1Product rule and power rule

(uv)′=u′v+uv′(uv)' = u'v + uv' (Section 5.3) and (xn)′=nxn−1(x^n)' = nx^{n-1} (Table 5.3). Basics: derivative rules

2Logarithmic differentiation

For u,v>0u, v > 0⁠: log⁡(uv)=log⁡u+log⁡v\log(uv) = \log u + \log v⁠, and ddxlog⁡g=g′g\frac{d}{dx}\log g = \frac{g'}{g} (Sections 5.4, 5.5). Basics: exponentials and logarithms

3Sign of a quadratic

If a>0a > 0 and b2−4ac<0b^2 - 4ac < 0⁠, then ax2+bx+c>0ax^2 + bx + c > 0 for every xx⁠. Basics: solving for dy/dx

Part (i): by the product rule

  1. Differentiate each factor

    u=x2−5x+8,u′=2x−5,v=x3+7x+9,v′=3x2+7.\begin{aligned} u &= x^2 - 5x + 8, & u' &= 2x - 5, \\ v &= x^3 + 7x + 9, & v' &= 3x^2 + 7. \end{aligned}
    Each factor is a polynomial; differentiate term by term with the power rule. Constants (88 and 99⁠) have derivative 00⁠.
    Power rule (Table 5.3); sum rule (Section 5.3). Basics: derivative rules
  2. Apply the product rule

    dydx=u′v+uv′=(2x−5)(x3+7x+9)+(x2−5x+8)(3x2+7).\begin{aligned} \frac{dy}{dx} &= u'v + uv' \\ &= (2x - 5)(x^3 + 7x + 9) \\ &\quad + (x^2 - 5x + 8)(3x^2 + 7). \end{aligned}
    The product rule: derivative of the first times the second, plus the first times the derivative of the second. This is already a correct answer; we expand it so that the three methods can be compared.
    Product (Leibnitz) rule (Section 5.3). Basics: derivative rules
  3. Expand the two products

    (2x−5)(x3+7x+9)=2x4+14x2+18x−5x3−35x−45=2x4−5x3+14x2−17x−45,\begin{aligned} &(2x - 5)(x^3 + 7x + 9) \\ &= 2x^4 + 14x^2 + 18x - 5x^3 - 35x - 45 \\ &= 2x^4 - 5x^3 + 14x^2 - 17x - 45, \end{aligned} (x2−5x+8)(3x2+7)=3x4+7x2−15x3−35x+24x2+56=3x4−15x3+31x2−35x+56.\begin{aligned} &(x^2 - 5x + 8)(3x^2 + 7) \\ &= 3x^4 + 7x^2 - 15x^3 - 35x + 24x^2 + 56 \\ &= 3x^4 - 15x^3 + 31x^2 - 35x + 56. \end{aligned}
    Multiply every term of the first bracket by every term of the second, then collect like powers: 18x−35x=−17x18x - 35x = -17x and 7x2+24x2=31x27x^2 + 24x^2 = 31x^2⁠.
    Distributive law; collecting like terms. Basics: solving for dy/dx
  4. Add

    dydx=(2+3)x4+(−5−15)x3+(14+31)x2+(−17−35)x+(−45+56)=5x4−20x3+45x2−52x+11.\begin{aligned} \frac{dy}{dx} &= (2 + 3)x^4 + (-5 - 15)x^3 + (14 + 31)x^2 \\ &\quad + (-17 - 35)x + (-45 + 56) \\ &= 5x^4 - 20x^3 + 45x^2 - 52x + 11. \end{aligned}
    Add the coefficients of each power of xx separately.
    Collecting like terms. Basics: solving for dy/dx

Part (ii): by expanding first

  1. Multiply out the product

    Multiply v=x3+7x+9v = x^3 + 7x + 9 by each term of uu⁠:

    x2⋅v=x5+7x3+9x2,−5x⋅v=−5x4−35x2−45x,8⋅v=8x3+56x+72.\begin{aligned} x^2\cdot v &= x^5 + 7x^3 + 9x^2, \\ -5x\cdot v &= -5x^4 - 35x^2 - 45x, \\ 8\cdot v &= 8x^3 + 56x + 72. \end{aligned}

    Adding the three rows:

    y=x5−5x4+15x3−26x2+11x+72.y = x^5 - 5x^4 + 15x^3 - 26x^2 + 11x + 72.
    Writing one row per term of uu keeps the bookkeeping safe. Collect: x3x^3⁠: 7+8=157 + 8 = 15⁠; x2x^2⁠: 9−35=−269 - 35 = -26⁠; xx⁠: −45+56=11-45 + 56 = 11⁠.
    Distributive law. Basics: solving for dy/dx
  2. Differentiate term by term

    dydx=5x4−5⋅4x3+15⋅3x2−26⋅2x+11+0=5x4−20x3+45x2−52x+11.\begin{aligned} \frac{dy}{dx} &= 5x^4 - 5\cdot 4x^3 + 15\cdot 3x^2 \\ &\quad - 26\cdot 2x + 11 + 0 \\ &= 5x^4 - 20x^3 + 45x^2 - 52x + 11. \end{aligned}
    Each term axnax^n becomes naxn−1nax^{n-1}⁠; the constant 7272 disappears.
    Power rule (Table 5.3); sum rule (Section 5.3). Basics: derivative rules

Part (iii): by logarithmic differentiation

  1. Where are the factors positive?

    u=x2−5x+8u = x^2 - 5x + 8⁠: a=1>0a = 1 > 0 and b2−4ac=25−32=−7<0b^2 - 4ac = 25 - 32 = -7 < 0⁠, so u>0u > 0 for every xx⁠. Completing the square: u=(x−52)2+74u = (x - \frac52)^2 + \frac74⁠.

    v=x3+7x+9v = x^3 + 7x + 9⁠: its derivative 3x2+73x^2 + 7 is always positive, so vv is increasing and has at most one real zero. Since vv is continuous with v(−2)=−13<0v(-2) = -13 < 0 and v(−1)=1>0v(-1) = 1 > 0⁠, it has a zero rr between −2-2 and −1-1 (intermediate value property); numerically r=−1.0970811r = -1.0970811⁠. So

    v>0 for x>r,v<0 for x<r.v > 0 \text{ for } x > r, \qquad v < 0 \text{ for } x < r.
    Logs exist only for positive numbers, so the log method applies directly where y=uv>0y = uv > 0⁠, that is for x>rx > r⁠. Part (iii), Step 4 deals with x≤rx \le r⁠.
    Sign of a quadratic; positive derivative means increasing, so zero is crossed at most once (Theorem 1, Section 6.3, in the later Chapter 6); intermediate value property: a function continuous on [a,b][a, b] takes every value between f(a)f(a) and f(b)f(b) (a standard property of continuous functions, not stated or proved in this chapter). Lesson: logarithmic differentiation
  2. Take logs and differentiate (for x>rx > r⁠)

    log⁡y=log⁡(x2−5x+8)+log⁡(x3+7x+9).\log y = \log(x^2 - 5x + 8) + \log(x^3 + 7x + 9).

    Differentiate, using ddxlog⁡g=g′g\frac{d}{dx}\log g = \frac{g'}{g} on each term:

    1ydydx=2x−5x2−5x+8+3x2+7x3+7x+9.\frac1y\frac{dy}{dx} = \frac{2x - 5}{x^2 - 5x + 8} + \frac{3x^2 + 7}{x^3 + 7x + 9}.
    The log of the product of two positive numbers is the sum of their logs. On the left, ddxlog⁡y=1ydydx\frac{d}{dx}\log y = \frac1y\frac{dy}{dx} by the chain rule.
    log⁡pq=log⁡p+log⁡q\log pq = \log p + \log q (Section 5.4); Theorem 5 and the chain rule. Basics: exponentials and logarithms
  3. Multiply by yy and simplify

    dydx= (x2−5x+8)(x3+7x+9)×[2x−5x2−5x+8+3x2+7x3+7x+9].\begin{aligned} \frac{dy}{dx} = \ &(x^2 - 5x + 8)(x^3 + 7x + 9) \\ &\times\left[\frac{2x - 5}{x^2 - 5x + 8} + \frac{3x^2 + 7}{x^3 + 7x + 9}\right]. \end{aligned}

    Multiply each fraction by the product: each denominator cancels its own factor, leaving

    dydx=(2x−5)(x3+7x+9)+(x2−5x+8)(3x2+7),\begin{aligned} \frac{dy}{dx} &= (2x - 5)(x^3 + 7x + 9) \\ &\quad + (x^2 - 5x + 8)(3x^2 + 7), \end{aligned}

    which is exactly the expression of Part (i), Step 2. Expanding as in Part (i), Steps 3 and 4:

    dydx=5x4−20x3+45x2−52x+11.\frac{dy}{dx} = 5x^4 - 20x^3 + 45x^2 - 52x + 11.
    The cancellation is allowed because both factors are non-zero for x>rx > r⁠. Logarithmic differentiation of a product of two factors is the product rule in disguise.
    Logarithmic differentiation, y′=y⋅(log⁡y)′y' = y\cdot(\log y)' (Section 5.5). Lesson: logarithmic differentiation
  4. The points x≤rx \le r

    For x<rx < r⁠, y<0y < 0⁠. Apply the method to −y=u⋅(−v)>0-y = u\cdot(-v) > 0⁠: log⁡(−y)=log⁡u+log⁡(−v)\log(-y) = \log u + \log(-v)⁠. Since ddxlog⁡(−y)=−y′−y=y′y\frac{d}{dx}\log(-y) = \frac{-y'}{-y} = \frac{y'}{y} and ddxlog⁡(−v)=−v′−v=v′v\frac{d}{dx}\log(-v) = \frac{-v'}{-v} = \frac{v'}{v}⁠, we get the same equation as in Part (iii), Step 2, and so the same answer. At x=rx = r itself, y=0y = 0 and no logarithm exists; there the answer comes from Part (i) or Part (ii), which hold for every xx⁠, and it is the same polynomial.

    The book's warning that the function must be positive is about the logarithm, not about the derivative. Logging −y-y (equivalently ∣y∣|y|⁠) extends the method wherever y≠0y \ne 0⁠.
    Chain rule on log⁡(−g)\log(-g)⁠: derivative −g′−g=g′g\frac{-g'}{-g} = \frac{g'}{g}⁠. Basics: derivative rules

Do they all give the same answer?

  1. Compare

    Part (i), Part (ii) and Part (iii) all give

    dydx=5x4−20x3+45x2−52x+11.\frac{dy}{dx} = 5x^4 - 20x^3 + 45x^2 - 52x + 11.

    Yes: all three give the same answer, as they must, since a function has only one derivative. Logarithmic differentiation reaches it by a detour (logs exist only where y≠0y \ne 0⁠), but after simplification it is the product-rule expression, valid for every xx⁠.

    For a product of only two polynomials, expanding (Part (ii)) is quickest; logs pay off for products of many factors or for powers with variable exponents.
    Uniqueness of the derivative: it is a single limit (Section 5.3). Basics: slope at a point
Result dydx=5x4−20x3+45x2−52x+11\frac{dy}{dx} = 5x^4 - 20x^3 + 45x^2 - 52x + 11

by all three methods; yes, they give the same answer. (Textbook answer: 5x4−20x3+45x2−52x+115x^4 - 20x^3 + 45x^2 - 52x + 11⁠.)

Check it with numbers

At x=2x = 2⁠: u=2u = 2⁠, v=31v = 31⁠, u′=−1u' = -1⁠, v′=19v' = 19⁠.

  • Part (i): (−1)(31)+(2)(19)=−31+38=7(-1)(31) + (2)(19) = -31 + 38 = 7⁠.
  • Part (ii): 80−160+180−104+11=780 - 160 + 180 - 104 + 11 = 7⁠.
  • Part (iii): y=62y = 62 and 62(−12+1931)=−31+38=762\left(-\frac12 + \frac{19}{31}\right) = -31 + 38 = 7⁠.

At x=1x = 1⁠: 5−20+45−52+11=−115 - 20 + 45 - 52 + 11 = -11⁠, and the product rule gives (−3)(17)+(4)(10)=−11(-3)(17) + (4)(10) = -11⁠.

Common mistakes
  1. Multiplying the derivatives: (uv)′≠u′v′(uv)' \ne u'v'⁠.
  2. Dropping a term when expanding; one row per term of uu avoids it.
  3. Sign slips with −5-5 and −5x-5x⁠: for example (−5)(7x)=−35x(-5)(7x) = -35x⁠.
  4. Claiming logs work everywhere. They need y≠0y \ne 0 (after using −y-y where y<0y < 0⁠); here y=0y = 0 at x=rx = r⁠.
What to take away
  1. Different correct methods must give the same derivative; comparing them is a strong check.
  2. For a product, logarithmic differentiation is the product rule in another form.
  3. Choose the quickest method: expand short products; use logs for long products and variable exponents.

Every fact used, and where it comes from

FactUsed inSource
Sum rule; product (Leibnitz) rulePart (i); Part (ii), Step 2Algebra of derivatives, Section 5.3
Power rule (xn)′=nxn−1(x^n)' = nx^{n-1}Parts (i), (ii)Table 5.3, Section 5.3
Sign of a quadratic with negative discriminantPart (iii), Step 1Quadratic equations (Class XI)
Positive derivative means increasingPart (iii), Step 1Theorem 1, Section 6.3, Chapter 6 (a later chapter; not proved in Chapter 5)
Intermediate value propertyPart (iii), Step 1Standard property of continuous functions; not stated or proved in this chapter
log⁡pq=log⁡p+log⁡q\log pq = \log p + \log q⁠; (log⁡x)′=1x(\log x)' = \frac1xPart (iii), Steps 2, 4Section 5.4; Theorem 5
Logarithmic differentiation (positive quantities)Part (iii)Section 5.5 (Lesson: logarithmic differentiation)
Chain rulePart (iii), Steps 2, 4Theorem 4, Section 5.3.1
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →