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

Miscellaneous · Q3: Differentiate (5x)3cos⁡2x(5x)^{3\cos 2x} by taking logarithms

Miscellaneous ExerciseLogarithmic differentiation · Miscellaneous Exercise
The question

Differentiate w.r.t. xx the function

(5x)3cos⁡2x.(5x)^{3\cos 2x}.
Exam answer

Let y=(5x)3cos⁡2xy = (5x)^{3\cos 2x}⁠, x>0x \gt 0⁠.

Taking log on both sides,

log⁡y=3cos⁡2x⋅log⁡5x\log y = 3\cos 2x\cdot\log 5x

Differentiating both sides w.r.t. xx (product rule),

1ydydx=−6sin⁡2x⋅log⁡5x+3cos⁡2x⋅55x=3cos⁡2xx−6sin⁡2xlog⁡5x\begin{aligned} \frac1y\frac{dy}{dx} &= -6\sin 2x\cdot\log 5x \\ &\quad + 3\cos 2x\cdot\frac{5}{5x} \\ &= \frac{3\cos 2x}{x} - 6\sin 2x\log 5x \end{aligned}

∴ dydx=(5x)3cos⁡2x\therefore\ \dfrac{dy}{dx} = (5x)^{3\cos 2x} ×[3cos⁡2xx−6sin⁡2xlog⁡5x]\times\Big[\dfrac{3\cos 2x}{x} - 6\sin 2x\log 5x\Big] (x>0)(x \gt 0)

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

The one idea this problem is built on

Both the base 5x5x and the exponent 3cos⁡2x3\cos 2x change with xx⁠. The power rule needs a constant exponent and the rule for axa^x needs a constant base, so neither applies. Taking the logarithm turns the power into a product, log⁡y=3cos⁡2x⋅log⁡5x\log y = 3\cos 2x\cdot\log 5x⁠, and a product is differentiated by the product rule. This is logarithmic differentiation (Section 5.5), and it needs the base to be positive, here x>0x > 0⁠.

Given, to find, and the plan
Given
y=(5x)3cos⁡2xy = (5x)^{3\cos 2x}⁠. The question states no domain; a variable real power is only defined for a positive base, so we work on x>0x > 0⁠.
To find
dydx\dfrac{dy}{dx}⁠.
Plan
(1) Fix the domain. (2) Take logarithms. (3) Differentiate the left side by the chain rule. (4) Differentiate the right side by the product and chain rules. (5) Multiply by yy and write the answer in terms of xx⁠.

Basics you need

1Logarithms

log⁡\log means the natural logarithm (base ee⁠). It is defined only for positive numbers, and log⁡pn=nlog⁡p\log p^n = n\log p for p>0p > 0 and any real nn (Section 5.4). Basics: exponentials and logarithms

2Derivative of log⁡\log

ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x for x>0x > 0 (Theorem 5). With the chain rule, ddxlog⁡y=1y⋅dydx\frac{d}{dx}\log y = \frac1y\cdot\frac{dy}{dx}⁠.

3Product and chain rules

(uv)′=u′v+uv′(uv)' = u'v + uv'⁠. Chain rule: derivative of the outer function at the inner one, times the derivative of the inner one. Basics: derivative rules

4Logarithmic differentiation

For y=[u(x)]v(x)y = [u(x)]^{v(x)} with u(x)>0u(x) > 0⁠: take log⁡\log of both sides, differentiate, multiply by yy⁠. Lesson: logarithmic differentiation

Solution

  1. Fix the domain: x>0x > 0

    Let y=(5x)3cos⁡2xy = (5x)^{3\cos 2x}⁠. Here the base is u(x)=5xu(x) = 5x and the exponent is v(x)=3cos⁡2xv(x) = 3\cos 2x⁠. The exponent is not a whole number in general (for example at x=1x = 1 it is about −1.248-1.248⁠), so the power only makes sense for a positive base:

    5x>0  ⟺  x>0.5x > 0 \iff x > 0.

    For x>0x > 0 we also have y>0y > 0⁠, because a positive number raised to any real power is positive. So log⁡y\log y is defined.

    The book stresses that in logarithmic differentiation "f(x)f(x) and u(x)u(x) must always be positive", since their logarithms are taken (Section 5.5). Stating the domain first is what makes every later step legal.
    A real power pnp^n with a non-integer nn is defined for p>0p > 0⁠, and it is then positive. Basics: exponentials and logarithms
  2. Take logarithms of both sides

    log⁡y=log⁡(5x)3cos⁡2x=3cos⁡2x⋅log⁡5x.\log y = \log (5x)^{3\cos 2x} = 3\cos 2x\cdot\log 5x.
    The rule log⁡pn=nlog⁡p\log p^n = n\log p brings the exponent down in front. The awkward "variable power" becomes an ordinary product of two functions, 3cos⁡2x3\cos 2x and log⁡5x\log 5x⁠, each of which we can differentiate.
    log⁡bpn=nlog⁡bp\log_b p^n = n\log_b p for any real nn⁠, Section 5.4. Basics: exponentials and logarithms
  3. Differentiate the left side: ddxlog⁡y\frac{d}{dx}\log y

    Here log⁡y\log y is a composite: the outer function is log⁡\log⁠, the inner function is yy (a function of xx⁠). By the chain rule,

    ddx(log⁡y)=1y⋅dydx.\frac{d}{dx}(\log y) = \frac{1}{y}\cdot\frac{dy}{dx}.
    ddylog⁡y=1y\frac{d}{dy}\log y = \frac1y (Theorem 5), and the chain rule multiplies by the derivative of the inner function, dydx\frac{dy}{dx}⁠, which is exactly what we want to find.
    Chain rule, Theorem 4, Section 5.3.1. Lesson: chain rule
  4. Differentiate the right side by the product rule

    The two factors and their derivatives:

    ddx(3cos⁡2x)=3(−sin⁡2x)⋅2=−6sin⁡2x,ddx(log⁡5x)=15x⋅5=1x.\begin{aligned} \frac{d}{dx}(3\cos 2x) &= 3(-\sin 2x)\cdot 2 \\ &= -6\sin 2x, \\ \frac{d}{dx}(\log 5x) &= \frac{1}{5x}\cdot 5 = \frac{1}{x}. \end{aligned}

    Each line is a chain rule: in the first the inner function is 2x2x (derivative 2), in the second the inner function is 5x5x (derivative 5). Now the product rule:

    ddx(3cos⁡2x⋅log⁡5x)=−6sin⁡2xlog⁡5x+3cos⁡2x⋅1x=3cos⁡2xx−6sin⁡2xlog⁡5x.\begin{aligned} &\frac{d}{dx}\left(3\cos 2x\cdot\log 5x\right) \\ &= -6\sin 2x\log 5x + 3\cos 2x\cdot\frac1x \\ &= \frac{3\cos 2x}{x} - 6\sin 2x\log 5x. \end{aligned}
    The product rule is "derivative of the first times the second, plus the first times derivative of the second". A quick way to see ddxlog⁡5x=1x\frac{d}{dx}\log 5x = \frac1x⁠: log⁡5x=log⁡5+log⁡x\log 5x = \log 5 + \log x⁠, and log⁡5\log 5 is a constant. The 5 cancels, which surprises many students.
    Product rule (2), Section 5.3; ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin x (Table 5.3); ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x (Theorem 5). Basics: derivative rules
  5. Equate and multiply by yy

    Steps 3 and 4 differentiate the two sides of the same equation, so they are equal:

    1y⋅dydx=3cos⁡2xx−6sin⁡2xlog⁡5x.\frac1y\cdot\frac{dy}{dx} = \frac{3\cos 2x}{x} - 6\sin 2x\log 5x.

    Multiply both sides by y=(5x)3cos⁡2xy = (5x)^{3\cos 2x}⁠:

    dydx=(5x)3cos⁡2x[3cos⁡2xx−6sin⁡2xlog⁡5x].\begin{aligned} \frac{dy}{dx} = {}&(5x)^{3\cos 2x}\Bigl[\frac{3\cos 2x}{x} \\ &\qquad - 6\sin 2x\log 5x\Bigr]. \end{aligned}
    The derivative must be written in terms of xx⁠, so we put back y=(5x)3cos⁡2xy = (5x)^{3\cos 2x}⁠. Multiplying is allowed because yy is a number (non-zero, in fact positive), and nothing is divided by zero since x>0x > 0⁠.
    Logarithmic differentiation, Section 5.5 (compare Example 29, xsin⁡xx^{\sin x}⁠). Lesson: logarithmic differentiation
  6. Cross-check by writing the power as an exponential

    For x>0x > 0⁠, 5x=elog⁡5x5x = e^{\log 5x}⁠, so y=e3cos⁡2xlog⁡5xy = e^{3\cos 2x\log 5x}⁠. By the chain rule with outer function e( )e^{(\ )} and inner function 3cos⁡2xlog⁡5x3\cos 2x\log 5x⁠:

    dydx=e3cos⁡2xlog⁡5x⋅ddx(3cos⁡2xlog⁡5x).\frac{dy}{dx} = e^{3\cos 2x\log 5x}\cdot\frac{d}{dx}\left(3\cos 2x\log 5x\right).

    The first factor is yy itself and the second is the derivative of Step 4, so we get the same answer.

    Logarithmic differentiation and "write it as e( )e^{(\ )}" are the same idea seen from two sides. Getting the same result two ways guards against slips.
    ddxex=ex\frac{d}{dx}e^x = e^x (Theorem 5); p=elog⁡pp = e^{\log p} for p>0p > 0 (Example 25). Basics: exponentials and logarithms
Result

For x>0x > 0⁠,

dydx=(5x)3cos⁡2x[3cos⁡2xx−6sin⁡2xlog⁡5x].\begin{aligned} \frac{dy}{dx} = {}&(5x)^{3\cos 2x}\Bigl[\frac{3\cos 2x}{x} \\ &\qquad - 6\sin 2x\log 5x\Bigr]. \end{aligned}

(Textbook answer: (5x)3cos⁡2x[3cos⁡2xx−6sin⁡2xlog⁡5x](5x)^{3\cos 2x}\left[\frac{3\cos 2x}{x} - 6\sin 2x\log 5x\right]⁠, the same. The key does not state x>0x > 0⁠, but the function is only defined there.)

Check it with numbers

At x=1x = 1⁠: 3cos⁡2≈−1.24844053\cos 2 \approx -1.2484405⁠, sin⁡2≈0.9092974\sin 2 \approx 0.9092974⁠, log⁡5≈1.6094379\log 5 \approx 1.6094379⁠, so y=53cos⁡2≈0.1340842y = 5^{3\cos 2} \approx 0.1340842⁠.

The bracket is 3cos⁡2−6sin⁡2log⁡53\cos 2 - 6\sin 2\log 5⁠, which is about −10.0291870-10.0291870⁠. So the formula gives 0.1340842×(−10.0291870)0.1340842 \times (-10.0291870)⁠, about −1.3447553-1.3447553⁠.

Difference quotient with h=0.0001h = 0.0001⁠: y(1.0001)≈0.13394977y(1.0001) \approx 0.13394977 and y(0.9999)≈0.13421872y(0.9999) \approx 0.13421872⁠, so the quotient 0.13394977−0.134218720.0002\frac{0.13394977 - 0.13421872}{0.0002} is about −1.3447555-1.3447555⁠. ✓

Common mistakes
  1. Using the power rule and writing 3cos⁡2x (5x)3cos⁡2x−1⋅53\cos 2x\,(5x)^{3\cos 2x - 1}\cdot 5⁠. The power rule ddxxn=nxn−1\frac{d}{dx}x^n = nx^{n-1} needs a constant nn⁠; here the exponent varies.
  2. Writing ddxlog⁡5x=15x\frac{d}{dx}\log 5x = \frac{1}{5x}. The chain rule supplies a factor 5, giving 1x\frac1x⁠.
  3. Dropping the 2 from cos⁡2x\cos 2x: ddxcos⁡2x=−2sin⁡2x\frac{d}{dx}\cos 2x = -2\sin 2x⁠, not −sin⁡2x-\sin 2x⁠.
  4. Leaving the answer as y[…]y[\ldots] without substituting y=(5x)3cos⁡2xy = (5x)^{3\cos 2x}⁠.
What to take away
  1. Variable base and variable exponent: take logarithms (base must be positive), then use the product rule.
  2. The result always has the shape y[v′log⁡u+v u′u]y\left[v'\log u + v\,\frac{u'}{u}\right] for y=uvy = u^v⁠.

Every fact used, and where it comes from

FactUsed inSource
log⁡\log is defined only for positive numbersStep 1Section 5.4, observation (1) on the log function
log⁡pn=nlog⁡p\log p^n = n\log p (any real nn⁠)Step 2Section 5.4 (stated there for every real nn⁠, without proof)
ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠; ddxex=ex\frac{d}{dx}e^x = e^xSteps 3, 4, 6Theorem 5, Section 5.4
Chain ruleSteps 3, 4, 6Theorem 4, Section 5.3.1 (Lesson: chain rule)
Product rule; ddxcos⁡x=−sin⁡x\frac{d}{dx}\cos x = -\sin xStep 4Rule (2) and Table 5.3, Section 5.3
Logarithmic differentiation, positive baseSteps 1, 5Section 5.5, Example 29 (Lesson: logarithmic differentiation)
AnswerResultAnswers, Miscellaneous Exercise on Chapter 5, Q3
Numerical valuesCheckRecomputed in the site's verification script
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 →