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

Example 27: Log-differentiate (x−3)(x2+4)3x2+4x+5\sqrt{\frac{(x-3)(x^2+4)}{3x^2+4x+5}}

ExamplesLogarithmic differentiation · Section 5.5
The question

Differentiate (x−3)(x2+4)3x2+4x+5\sqrt{\dfrac{(x-3)(x^2+4)}{3x^2+4x+5}} w.r.t. xx⁠.

Exam answer

Let y=(x−3)(x2+4)3x2+4x+5y = \sqrt{\dfrac{(x - 3)(x^2 + 4)}{3x^2 + 4x + 5}}⁠, x>3x > 3⁠. Taking log on both sides,

log⁡y=12[log⁡(x−3)+log⁡(x2+4)−log⁡(3x2+4x+5)]\begin{aligned} \log y &= \frac12\big[\log(x - 3) \\ &\qquad + \log(x^2 + 4) \\ &\qquad -\log(3x^2 + 4x + 5)\big] \end{aligned}

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

1y⋅dydx=12[1x−3+2xx2+4−6x+43x2+4x+5]\begin{aligned} \frac1y\cdot\frac{dy}{dx} &= \frac12\bigg[\frac{1}{x - 3} + \frac{2x}{x^2 + 4} \\ &\qquad - \frac{6x + 4}{3x^2 + 4x + 5}\bigg] \end{aligned}

∴ dydx=12(x−3)(x2+4)3x2+4x+5\therefore\ \dfrac{dy}{dx} = \dfrac12\sqrt{\dfrac{(x - 3)(x^2 + 4)}{3x^2 + 4x + 5}} ×[1x−3+2xx2+4\times\Big[\dfrac{1}{x - 3} + \dfrac{2x}{x^2 + 4} −6x+43x2+4x+5]- \dfrac{6x + 4}{3x^2 + 4x + 5}\Big] (x>3)(x > 3)⁠.

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

The one idea this problem is built on

A square root of a product divided by something is painful with the product and quotient rules. Taking logarithms turns the root into a factor 12\frac12⁠, the product into a sum and the quotient into a difference. Sums are easy to differentiate term by term. This is logarithmic differentiation. Its one demand is that every quantity we take the log of is positive, so we first find where that is true.

Given, to find, and the plan
Given
y=(x−3)(x2+4)3x2+4x+5y = \sqrt{\dfrac{(x-3)(x^2+4)}{3x^2+4x+5}}⁠.
To find
dydx\frac{dy}{dx}⁠, and where it is valid.
Plan
(1) Find where yy is defined and where the logs exist. (2) Take logs and expand with the log laws. (3) Differentiate both sides. (4) Multiply by yy⁠. (5) Look at the endpoint x=3x = 3⁠.

Basics you need

1Log laws (for positive numbers)

log⁡(pq)=log⁡p+log⁡q\log(pq) = \log p + \log q⁠, log⁡pq=log⁡p−log⁡q\log\frac{p}{q} = \log p - \log q⁠, log⁡pn=nlog⁡p\log p^n = n\log p⁠, all for p,q>0p, q > 0⁠. With n=12n = \frac12⁠: log⁡p=12log⁡p\log\sqrt{p} = \frac12\log p⁠. Basics: exponentials and logarithms

2Derivative of log⁡\log of a function

By the chain rule and Theorem 5: ddxlog⁡g(x)=1g(x)⋅g′(x)\frac{d}{dx}\log g(x) = \frac{1}{g(x)}\cdot g'(x)⁠, where g(x)>0g(x) > 0⁠. In particular ddxlog⁡y=1ydydx\frac{d}{dx}\log y = \frac1y\frac{dy}{dx}⁠. Basics: derivative rules

3Sign of a quadratic

If a>0a > 0 and the discriminant b2−4ac<0b^2 - 4ac < 0⁠, then ax2+bx+c>0ax^2 + bx + c > 0 for every xx (the parabola opens upward and never meets the xx-axis). This is from Class XI (quadratic equations).

Solution

  1. Where is yy defined, and where can we take logs?

    Look at the sign of each factor.

    • x2+4≥4>0x^2 + 4 \ge 4 > 0 for every xx⁠.
    • 3x2+4x+53x^2 + 4x + 5⁠: here a=3>0a = 3 > 0 and b2−4ac=16−60=−44<0b^2 - 4ac = 16 - 60 = -44 < 0⁠, so it is positive for every xx⁠. Completing the square shows it directly: 3x2+4x+5=3(x+23)2+113>0.\begin{aligned} &3x^2 + 4x + 5 \\ &= 3\left(x + \tfrac23\right)^2 + \tfrac{11}{3} > 0. \end{aligned}
    • x−3x - 3 is positive for x>3x > 3⁠, zero at x=3x = 3⁠, negative for x<3x < 3⁠.

    So the fraction under the root has the sign of x−3x - 3⁠. A real square root needs it ≥0\ge 0⁠, so yy is defined for x≥3x \ge 3⁠. For the logarithms we need x−3>0x - 3 > 0⁠, so we work on

    x>3,where y>0.x > 3, \qquad\text{where } y > 0.
    The book stresses that in logarithmic differentiation the function and the quantities whose logs we take must be positive, "as otherwise their logarithms are not defined". Its solution does not say where this holds; here it is x>3x > 3⁠. The point x=3x = 3 (where y=0y = 0⁠) is treated separately in Step 5.
    A quadratic with positive leading coefficient and negative discriminant is always positive (Basic 3).
  2. Take logarithms and expand

    For x>3x > 3⁠, write the root as a power,

    y=((x−3)(x2+4)3x2+4x+5)1/2,y = \left(\frac{(x-3)(x^2+4)}{3x^2+4x+5}\right)^{1/2},

    and take log⁡\log of both sides:

    log⁡y=12[log⁡(x−3)+log⁡(x2+4)−log⁡(3x2+4x+5)].\begin{aligned} \log y = \tfrac12\big[&\log(x-3) + \log(x^2+4) \\ &- \log(3x^2+4x+5)\big]. \end{aligned}
    Three log laws are used, each valid because every quantity is positive for x>3x > 3⁠: log⁡p1/2=12log⁡p\log p^{1/2} = \frac12\log p brings the root down as a factor; log⁡ABC=log⁡A+log⁡B−log⁡C\log\frac{AB}{C} = \log A + \log B - \log C splits the product and the quotient. The right side is now a sum of simple logs, each of which we can differentiate with one chain-rule step.
    log⁡bpq=log⁡bp+log⁡bq\log_b pq = \log_b p + \log_b q⁠, log⁡bxy=log⁡bx−log⁡by\log_b\frac{x}{y} = \log_b x - \log_b y⁠, log⁡bpn=nlog⁡bp\log_b p^n = n\log_b p (Section 5.4). Basics: exponentials and logarithms
  3. Differentiate both sides with respect to xx

    Left side: the outer function is log⁡\log⁠, the inner is yy⁠, so ddxlog⁡y=1y⋅dydx\frac{d}{dx}\log y = \frac1y\cdot\frac{dy}{dx}⁠. Right side: use ddxlog⁡g=g′g\frac{d}{dx}\log g = \frac{g'}{g} on each term:

    ddxlog⁡(x−3)=1x−3,ddxlog⁡(x2+4)=2xx2+4,\begin{gathered} \frac{d}{dx}\log(x-3) = \frac{1}{x-3}, \\ \frac{d}{dx}\log(x^2+4) = \frac{2x}{x^2+4}, \end{gathered} ddxlog⁡(3x2+4x+5)=6x+43x2+4x+5.\frac{d}{dx}\log(3x^2+4x+5) = \frac{6x+4}{3x^2+4x+5}.

    So

    1y⋅dydx=12[1x−3+2xx2+4−6x+43x2+4x+5].\begin{aligned} \frac1y\cdot\frac{dy}{dx} = \frac12\Bigg[&\frac{1}{x-3} + \frac{2x}{x^2+4} \\ &- \frac{6x+4}{3x^2+4x+5}\Bigg]. \end{aligned}
    Each log term is a composite with outer log⁡\log and an inner polynomial gg⁠. The chain rule gives 1g\frac1g times g′g'⁠. The inner derivatives are 11⁠, 2x2x and 6x+46x + 4 by the power rule. Forgetting them (writing just 1g\frac1g⁠) is the classic error.
    Theorem 5 (2) and the chain rule: ddxlog⁡g(x)=g′(x)g(x)\frac{d}{dx}\log g(x) = \frac{g'(x)}{g(x)}⁠. Lesson: logarithmic differentiation
  4. Multiply by yy and substitute it back

    dydx=y2[1x−3+2xx2+4−6x+43x2+4x+5],\begin{aligned} \frac{dy}{dx} = \frac{y}{2}\Bigg[&\frac{1}{x-3} + \frac{2x}{x^2+4} \\ &- \frac{6x+4}{3x^2+4x+5}\Bigg], \end{aligned}

    that is, for x>3x > 3⁠,

    dydx= 12(x−3)(x2+4)3x2+4x+5×[1x−3+2xx2+4−6x+43x2+4x+5].\begin{aligned} \frac{dy}{dx} = \ &\frac12\sqrt{\frac{(x-3)(x^2+4)}{3x^2+4x+5}} \\ &\times\Bigg[\frac{1}{x-3} + \frac{2x}{x^2+4} \\ &\qquad - \frac{6x+4}{3x^2+4x+5}\Bigg]. \end{aligned}
    The left side was 1ydydx\frac1y\frac{dy}{dx}⁠; multiplying both sides by yy isolates dydx\frac{dy}{dx}⁠. We then replace yy by its formula so the answer is in xx alone. This is exactly the book's final form.
    Rearranging: if 1y Y=R\frac1y\,Y = R with y≠0y \ne 0⁠, then Y=yRY = yR⁠. Basics: solving for dy/dx
  5. What happens at x=3x = 3⁠?

    At x=3x = 3⁠, y=0y = 0 and the log method cannot be used. Near x=3x = 3⁠, y≈1344(x−3)y \approx \sqrt{\frac{13}{44}(x - 3)} (using 32+4=133^2 + 4 = 13 and 27+12+5=4427 + 12 + 5 = 44⁠), so the right-hand difference quotient behaves like

    y(3+h)−0h≈1344⋅1h,\frac{y(3+h) - 0}{h} \approx \sqrt{\frac{13}{44}}\cdot\frac{1}{\sqrt h},

    which grows without bound as h→0+h \to 0^+⁠. The graph starts at (3,0)(3, 0) with a vertical tangent, and yy has no derivative there.

    This explains why the formula is valid only for x>3x > 3⁠: the factor 1x−3\frac{1}{x-3} in the bracket blows up as x→3x \to 3⁠, and the derivative really does not exist at 33⁠. The function is not defined at all for x<3x < 3⁠.
    A derivative exists only when the limit of the difference quotient is finite (Section 5.3). Basics: slope at a point
Result

For x>3x > 3⁠,

dydx= 12(x−3)(x2+4)3x2+4x+5×[1x−3+2xx2+4−6x+43x2+4x+5].\begin{aligned} \frac{dy}{dx} = \ &\frac12\sqrt{\frac{(x-3)(x^2+4)}{3x^2+4x+5}} \\ &\times\Bigg[\frac{1}{x-3} + \frac{2x}{x^2+4} \\ &\qquad - \frac{6x+4}{3x^2+4x+5}\Bigg]. \end{aligned}

(This is the book's answer. The function exists only for x≥3x \ge 3⁠; the formula holds for x>3x > 3⁠, and at x=3x = 3 there is no derivative.)

Check it with numbers

At x=4x = 4⁠: y=1⋅2048+16+5y = \sqrt{\frac{1\cdot 20}{48 + 16 + 5}} =2069=0.5383819…= \sqrt{\frac{20}{69}} = 0.5383819\ldots⁠. The bracket is 1+820−2869=0.9942029…1 + \frac{8}{20} - \frac{28}{69} = 0.9942029\ldots⁠. So

dydx=0.53838192×0.9942029=0.2676304…\begin{aligned} \frac{dy}{dx} &= \frac{0.5383819}{2}\times 0.9942029 \\ &= 0.2676304\ldots \end{aligned}

The central difference quotient y(4.0001)−y(3.9999)0.0002\frac{y(4.0001) - y(3.9999)}{0.0002} gives 0.26763040.2676304⁠, the same to 7 decimal places.

Common mistakes
  1. Forgetting the 1y\frac1y on the left: ddxlog⁡y=1ydydx\frac{d}{dx}\log y = \frac1y\frac{dy}{dx}⁠, not dydx\frac{dy}{dx}⁠.
  2. Dropping inner derivatives: ddxlog⁡(x2+4)=2xx2+4\frac{d}{dx}\log(x^2+4) = \frac{2x}{x^2+4}⁠, not 1x2+4\frac{1}{x^2+4}⁠.
  3. "Log of a sum is the sum of the logs." False: log⁡(x2+4)≠log⁡x2+log⁡4\log(x^2 + 4) \ne \log x^2 + \log 4⁠. Only products and quotients split.
  4. Losing the 12\frac12 from the square root, or forgetting to multiply back by yy at the end.
  5. Ignoring where the logs exist; here only x>3x > 3⁠.
What to take away
  1. Logarithmic differentiation: take logs, expand with the log laws, differentiate (left side gives 1ydydx\frac1y\frac{dy}{dx}⁠), multiply by yy⁠.
  2. It pays off whenever the function is built from products, quotients and powers of several factors.
  3. First find where every logged quantity is positive; the answer is valid only there.

Every fact used, and where it comes from

FactUsed inSource
Positivity requirement for logarithmic differentiationStep 1Section 5.5 (Lesson: logarithmic differentiation)
Quadratic with a>0a > 0⁠, b2−4ac<0b^2 - 4ac < 0 is always positiveStep 1Quadratic equations (Class XI)
log⁡pq\log pq⁠, log⁡pq\log\frac{p}{q}⁠, log⁡pn\log p^n lawsStep 2Section 5.4
ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠; chain ruleStep 3Theorem 5, Section 5.4; Theorem 4, Section 5.3.1
Power rule for the inner derivativesStep 3Table 5.3, Section 5.3
Derivative as a finite limitStep 5Section 5.3
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 →