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

Miscellaneous · Q10: Differentiate xx+xa+ax+aax^x+x^a+a^x+a^a term by term

Miscellaneous ExerciseLogarithmic differentiation · Miscellaneous Exercise
The question

Differentiate w.r.t. xx the function

xx+xa+ax+aa,x^x + x^a + a^x + a^a,

for some fixed a>0a > 0 and x>0x > 0⁠.

Exam answer

Let y=u+xa+ax+aay = u + x^a + a^x + a^a⁠, where u=xxu = x^x (x>0x \gt 0⁠, a>0a \gt 0⁠).

Taking log on both sides of u=xxu = x^x⁠, log⁡u=xlog⁡x\log u = x\log x⁠. Differentiating w.r.t. xx⁠,

1ududx=1⋅log⁡x+x⋅1x⇒ dudx=xx(1+log⁡x)\begin{aligned} \frac1u\frac{du}{dx} &= 1\cdot\log x + x\cdot\frac1x \\ \Rightarrow\ \frac{du}{dx} &= x^x(1 + \log x) \end{aligned}

Also ddx(xa)=axa−1\frac{d}{dx}(x^a) = ax^{a - 1}⁠, ddx(ax)=axlog⁡a\frac{d}{dx}(a^x) = a^x\log a and ddx(aa)=0\frac{d}{dx}(a^a) = 0⁠, as aaa^a is a constant.

∴ dydx=xx(1+log⁡x)\therefore\ \dfrac{dy}{dx} = x^x(1 + \log x) +axa−1+axlog⁡a+ ax^{a - 1} + a^x\log a (x>0)(x \gt 0)

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

The one idea this problem is built on

Four terms that look alike but are four different kinds of function. Ask of each term: is the base varying, the exponent varying, both, or neither?

xxx^x⁠: both vary (logarithmic differentiation). xax^a⁠: only the base varies (power rule). axa^x⁠: only the exponent varies (exponential rule). aaa^a⁠: neither varies, so it is a constant. The derivative of a sum is the sum of the derivatives, so we treat them one at a time.

Given, to find, and the plan
Given
y=xx+xa+ax+aay = x^x + x^a + a^x + a^a⁠, with a>0a > 0 a fixed constant and x>0x > 0⁠.
To find
dydx\dfrac{dy}{dx}⁠.
Plan
(1) Split by the sum rule. (2) xxx^x by logarithmic differentiation. (3) xax^a by the power rule. (4) axa^x as in Example 28. (5) aaa^a is constant. (6) Add.

Basics you need

1Sum rule

(u+v)′=u′+v′(u + v)' = u' + v' (rule (1), Section 5.3), and the derivative of a constant is 0 (Class XI, Limits and Derivatives). Basics: derivative rules

2Logarithms

For p>0p > 0⁠: log⁡pn=nlog⁡p\log p^n = n\log p (any real nn⁠); ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x (Theorem 5). Basics: exponentials and logarithms

3Exponential with a constant base

ddxax=axlog⁡a\frac{d}{dx}a^x = a^x\log a for a positive constant aa (Example 28).

4Logarithmic differentiation

For y=[u(x)]v(x)y = [u(x)]^{v(x)} with u(x)>0u(x) > 0 (Section 5.5). Lesson: logarithmic differentiation

Solution

  1. Split the sum

    dydx=ddx(xx)+ddx(xa)+ddx(ax)+ddx(aa).\begin{aligned} \frac{dy}{dx} = {}&\frac{d}{dx}(x^x) + \frac{d}{dx}(x^a) \\ &+ \frac{d}{dx}(a^x) + \frac{d}{dx}(a^a). \end{aligned}
    Each term can be differentiated separately. We must not take the logarithm of the whole sum: log⁡(p+q)\log(p + q) does not split into log⁡p+log⁡q\log p + \log q⁠, so logarithms only help one term at a time.
    Rule (1), Section 5.3. Basics: derivative rules
  2. xxx^x⁠: logarithmic differentiation

    Let v=xxv = x^x⁠. Since x>0x > 0⁠, v>0v > 0 and log⁡v=xlog⁡x\log v = x\log x⁠. Differentiate both sides (chain rule on the left, product rule on the right):

    1vdvdx=1⋅log⁡x+x⋅1x=log⁡x+1.\frac1v\frac{dv}{dx} = 1\cdot\log x + x\cdot\frac1x = \log x + 1.

    So dvdx=xx(1+log⁡x)\dfrac{dv}{dx} = x^x(1 + \log x)⁠.

    Base and exponent both vary, so neither the power rule nor the exponential rule fits. Logarithms turn the power into the product xlog⁡xx\log x⁠.
    Section 5.5; product rule (2), Section 5.3; Theorem 5. Lesson: logarithmic differentiation
  3. xax^a⁠: the power rule

    Here the exponent aa is a constant. Let w=xaw = x^a (positive, as x>0x > 0⁠). Then log⁡w=alog⁡x\log w = a\log x⁠, and

    1wdwdx=ax,sodwdx=a xax=a xa−1.\frac1w\frac{dw}{dx} = \frac{a}{x}, \quad\text{so}\quad \frac{dw}{dx} = \frac{a\,x^a}{x} = a\,x^{a-1}.
    This is the familiar ddxxn=nxn−1\frac{d}{dx}x^n = nx^{n-1}⁠. Table 5.3 lists it for the power nn⁠; since aa may be any positive real number (not necessarily whole), we confirmed it with logarithms, which works for every real exponent when x>0x > 0⁠.
    Table 5.3; log⁡pn=nlog⁡p\log p^n = n\log p⁠, Section 5.4; xax=xa−1\frac{x^a}{x} = x^{a-1} (laws of indices). Basics: exponentials and logarithms
  4. axa^x⁠: constant base, variable exponent

    Let z=axz = a^x⁠. Then log⁡z=xlog⁡a\log z = x\log a⁠, where log⁡a\log a is a constant, so 1zdzdx=log⁡a\frac1z\frac{dz}{dx} = \log a and

    dzdx=axlog⁡a.\frac{dz}{dx} = a^x\log a.
    This is exactly Example 28 in the book. The derivative of axa^x is not x ax−1x\,a^{x-1}⁠: that would be the power rule, which needs the exponent to be constant.
  5. aaa^a⁠: a constant

    ddx(aa)=0.\frac{d}{dx}(a^a) = 0.
    aa is fixed, so aaa^a is one fixed number (for instance 22=42^2 = 4 when a=2a = 2⁠); it does not change as xx changes.
    The derivative of a constant is 0 (Class XI, Limits and Derivatives). Basics: derivative rules
  6. Add the four pieces

    dydx=xx(1+log⁡x)+a xa−1+axlog⁡a.\begin{aligned} \frac{dy}{dx} = {}&x^x(1 + \log x) \\ &+ a\,x^{a-1} + a^x\log a. \end{aligned}
    Step 1 said the derivative of the sum is the sum of the derivatives found in Steps 2 to 5.
    Rule (1), Section 5.3.
Result

For x>0x > 0 (and fixed a>0a > 0⁠),

dydx=xx(1+log⁡x)+a xa−1+axlog⁡a.\begin{aligned} \frac{dy}{dx} = {}&x^x(1 + \log x) \\ &+ a\,x^{a-1} + a^x\log a. \end{aligned}

(Textbook answer: xx(1+log⁡x)+axa−1+axlog⁡ax^x(1 + \log x) + ax^{a-1} + a^x\log a⁠, the same.)

Check it with numbers

Take a=2a = 2 and x=1x = 1⁠. Then y=1+1+2+4=8y = 1 + 1 + 2 + 4 = 8⁠, and the formula gives 1(1+0)+2⋅1+2log⁡21(1 + 0) + 2\cdot 1 + 2\log 2⁠, which is about 3+1.3862944=4.38629443 + 1.3862944 = 4.3862944⁠.

Difference quotient with h=0.0001h = 0.0001⁠: y(1.0001)≈8.00043865y(1.0001) \approx 8.00043865 and y(0.9999)≈7.99956140y(0.9999) \approx 7.99956140⁠, so the quotient is about 4.38629444.3862944⁠. ✓

Common mistakes
  1. Taking the logarithm of the whole sum and writing log⁡y=xlog⁡x+alog⁡x+…\log y = x\log x + a\log x + \dots⁠. The log of a sum is not the sum of the logs.
  2. Mixing up xax^a and axa^x: ddxxa=axa−1\frac{d}{dx}x^a = ax^{a-1} but ddxax=axlog⁡a\frac{d}{dx}a^x = a^x\log a⁠.
  3. Giving aaa^a a non-zero derivative, such as a⋅aa−1a\cdot a^{a-1}⁠. It is a constant.
  4. Writing ddxxx=x⋅xx−1\frac{d}{dx}x^x = x\cdot x^{x-1}: the power rule does not apply when the exponent varies.
What to take away
  1. For any power, first ask which of base and exponent vary: base only (power rule), exponent only (axlog⁡aa^x\log a⁠), both (logarithms), neither (constant).
  2. Logarithmic differentiation works on a product or a single power, not on a sum: split sums first.

Every fact used, and where it comes from

FactUsed inSource
Sum rule; derivative of a constant is 0Steps 1, 5, 6Rule (1), Section 5.3 (sum); Class XI, Limits and Derivatives (constant)
log⁡pn=nlog⁡p\log p^n = n\log p⁠; ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1xSteps 2–4Section 5.4 (the log rule is stated there for every real nn⁠, without proof); Theorem 5
Logarithmic differentiation of xxx^xStep 2Section 5.5 (Lesson: logarithmic differentiation)
ddxxn=nxn−1\frac{d}{dx}x^n = nx^{n-1}Step 3Table 5.3
ddxax=axlog⁡a\frac{d}{dx}a^x = a^x\log aStep 4Example 28, Section 5.5
AnswerResultAnswers, Miscellaneous Exercise on Chapter 5, Q10
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 →