girgit.org

Continuity and Differentiability

What is the derivative of xˣ? Logarithmic differentiation

The big ideaWhen the variable sits in both the base and the power, as in \( y = [u(x)]^{v(x)} \), take log of both sides first: \( \log y = v \log u \) turns a hard power into an easy product.

In simple words

Logs turn powers into times, and times into plus. Plus and times are much easier to differentiate than tricky powers. So when a function looks scary, take its log, differentiate the friendly version, and then multiply back to undo the log.

Guess first: what is the derivative of xˣ?

The power rule says \( \frac{d}{dx}x^n = nx^{n-1} \). Guess: is \( \frac{d}{dx}x^x = x \cdot x^{x-1} = x^x \)?

See what happens
No. The power rule needs a fixed power n. In \( x^x \) the power moves too. Take logs: \( \log y = x\log x \) (for \( x \gt 0 \)). Differentiate: \( \frac{1}{y}\frac{dy}{dx} = 1 \cdot \log x + x \cdot \frac{1}{x} = \log x + 1 \). So \[ \frac{d}{dx}x^x = x^x(1 + \log x) \] Check with numbers: at \( x = 2 \), \( x^x = 4 \), and the true slope is \( 4(1 + \log 2) \approx 6.77 \), not 4. Notice the answer is two pieces added: \( x^x \) (what the power rule gives, treating the power as fixed) plus \( x^x\log x \) (what the exponential rule gives, treating the base as fixed). Both the base and the power are changing, so both effects count.

Try it: split the slope of \( x^x \) into its two parts at any point.

The method

For \( y = f(x) = [u(x)]^{v(x)} \), with \( u \gt 0 \):

  1. Take log to base e: \( \log y = v(x)\log u(x) \).
  2. Differentiate both sides (implicitly on the left, product rule on the right): \( \frac{1}{y}\frac{dy}{dx} = v(x)\cdot\frac{u'(x)}{u(x)} + v'(x)\log u(x) \).
  3. Multiply by y:
\[ \frac{dy}{dx} = [u(x)]^{v(x)}\left[ \frac{v(x)}{u(x)}u'(x) + v'(x)\log u(x) \right] \]

This is logarithmic differentiation. The key condition: \( f(x) \) and \( u(x) \) must be positive, or their logs are not defined.

Worked example 1: a constant base, a^x

Let \( y = a^x \), with \( a \gt 0 \) a constant. Then \( \log y = x\log a \), so \( \frac{1}{y}\frac{dy}{dx} = \log a \), and

\[ \frac{d}{dx}a^x = a^x\log a \]

Another way: \( a^x = e^{x\log a} \), and the chain rule gives \( e^{x\log a}\cdot\log a \). For \( a = e \), \( \log e = 1 \) and we get back \( (e^x)' = e^x \).

Worked example 2: x to the power √x

\( y = x^{\sqrt{x}} \), \( x \gt 0 \). \( \log y = \sqrt{x}\log x \).

\( \frac{1}{y}\frac{dy}{dx} = \frac{1}{2\sqrt{x}}\log x + \sqrt{x}\cdot\frac{1}{x} = \frac{\log x + 2}{2\sqrt{x}} \). So \( \frac{dy}{dx} = x^{\sqrt{x}}\cdot\dfrac{2 + \log x}{2\sqrt{x}} \).

Worked example 3: a long product and quotient

\( y = \dfrac{(x + 1)^2(x - 2)^3}{(x + 3)^4} \) (take \( x \gt 2 \), so every bracket is positive).

  1. \( \log y = 2\log(x + 1) + 3\log(x - 2) - 4\log(x + 3) \).
  2. \( \frac{1}{y}\frac{dy}{dx} = \frac{2}{x + 1} + \frac{3}{x - 2} - \frac{4}{x + 3} \).
  3. \( \frac{dy}{dx} = \dfrac{(x + 1)^2(x - 2)^3}{(x + 3)^4}\left[ \frac{2}{x + 1} + \frac{3}{x - 2} - \frac{4}{x + 3} \right] \).

Logs turn the mess of product and quotient rules into three simple fractions.

Sort these by which rule applies; the trap is a number like e or π sitting where x usually goes.

Sums of such powers

There is no log rule for a sum: \( \log(A + B) \) does not split. So for \( y = x^x + 2^x \), differentiate each term separately and add:

\[ \frac{dy}{dx} = x^x(1 + \log x) + 2^x\log 2 \]

The same idea works for implicit equations with variable powers. Name each tricky term (say \( u = y^x \), \( v = x^y \)), find \( \frac{du}{dx} \) and \( \frac{dv}{dx} \) by logs, then add.

Worked example 4: an implicit power

Find \( \frac{dy}{dx} \) if \( x^y = 10 \), \( x \gt 0 \), \( x \ne 1 \).

\( y\log x = \log 10 \). Differentiate: \( \frac{dy}{dx}\log x + \frac{y}{x} = 0 \), so \( \frac{dy}{dx} = -\dfrac{y}{x\log x} \).

Don't mix these up

  • \( x^n \) (fixed power): \( nx^{n-1} \). \( a^x \) (fixed base): \( a^x\log a \). \( x^x \) (both move): \( x^x(1 + \log x) \).
  • Logs split products and quotients, never sums. For a sum of powers, differentiate term by term.
  • After differentiating \( \log y \), remember to multiply by y. Leaving the answer as \( \frac{1}{y}\frac{dy}{dx} = \dots \) is unfinished.

Try it. Differentiate (a) \( 3^x \), (b) \( x^{\sin x} \) for \( x \gt 0 \), (c) \( (\sin x)^x \) for \( 0 \lt x \lt \pi \).

Answer
(a) \( 3^x\log 3 \). (b) \( \log y = \sin x\log x \), so \( \frac{dy}{dx} = x^{\sin x}\left( \cos x\log x + \frac{\sin x}{x} \right) \). (c) \( \log y = x\log\sin x \), so \( \frac{dy}{dx} = (\sin x)^x\left( \log\sin x + x\cot x \right) \).

Words to know

Logarithmic differentiation
Taking log of both sides before differentiating, then multiplying by y.
Variable power
A power that depends on x, like the x in \( x^x \); the power rule does not apply.
\( (a^x)' \)
\( a^x\log a \), for a constant \( a \gt 0 \).
\( (x^x)' \)
\( x^x(1 + \log x) \), for \( x \gt 0 \).

What is \( \frac{d}{dx}x^x \) at \( x = 1 \)?

  1. 1
  2. 0
  3. It is not defined, because of the log

What is \( \frac{d}{dx}5^x \)?

  1. \( x \cdot 5^{x - 1} \)
  2. \( 5^x \)
  3. \( 5^x\log 5 \)

To differentiate \( y = x^x + x^2 \), what should you do?

  1. Take log of both sides straight away
  2. Differentiate each term on its own and add
  3. Use the power rule on both terms