Tutorials › Calculus I › A Mixed Workshop on Exponential and Logarithmic Derivatives

Exponential and Logarithmic Derivatives · Tutorial 562 of 1495

A Mixed Workshop on Exponential and Logarithmic Derivatives

Combine exponential, logarithmic, product, quotient, and chain rules to differentiate expressions with variable bases and exponents while keeping domain restrictions in view.

Intermediate 11 min read

What You'll Learn

  • Differentiate a variable power by rewriting it using the exponential and natural logarithm.
  • Choose a rule sequence for nested bases and exponents.
  • Use logarithmic differentiation for products and quotients of powers.
  • State where an expression and its derivative are defined.
  • Check a derivative by comparing its logarithmic rate of change with the result.
  • Recognize and correct common errors with variable powers.

Introduction

A derivative involving exponentials or logarithms can combine several familiar rules at once. A base may depend on \(x\), an exponent may depend on \(x\), and either may contain a nested function. A product or quotient may add more factors to manage.

The main task in this workshop is to choose a reliable sequence of rules. For a variable power, taking a logarithm often turns the exponent into a factor. For a product or quotient, logarithms turn multiplication and division into addition and subtraction. In every case, the domain matters: the real logarithm requires a positive input.

The Variable-Power Rule

Let \(a(x)\) and \(b(x)\) be differentiable functions on an interval, and suppose \(a(x)>0\) there. The positive-base variable power \(y=a(x)^{b(x)}\) can be written using the exponential function as \(y=\exp(b(x)\ln(a(x)))\). Differentiating this representation gives the rule below.

Theorem: If \(a\) and \(b\) are differentiable and \(a(x)>0\), then \(a(x)^{b(x)}\) is differentiable and \(\frac{d}{dx}\bigl(a(x)^{b(x)}\bigr) =a(x)^{b(x)}\left(b'(x)\ln(a(x))+b(x)\frac{a'(x)}{a(x)}\right)\).

The condition \(a(x)>0\) is what permits the real logarithm \(\ln(a(x))\). It also makes the real-valued definition \(a(x)^{b(x)}=\exp(b(x)\ln(a(x)))\) available for arbitrary real-valued \(b(x)\).

Why the Rule Works

Here is the derivation, including the chain-rule steps. Write \(y=a(x)^{b(x)}\) on an interval where \(a(x)>0\). Then \(y>0\), so taking natural logarithms is valid.

$$ \begin{aligned} \ln y &= b(x)\ln(a(x)),\\ \frac{y'}{y} &=b'(x)\ln(a(x))+b(x)\frac{a'(x)}{a(x)},\\ y' &=y\left(b'(x)\ln(a(x))+b(x)\frac{a'(x)}{a(x)}\right). \end{aligned} $$

In the second line, the product rule differentiates \(b(x)\ln(a(x))\), and the chain rule gives \(\frac{d}{dx}\ln(a(x))=\frac{a'(x)}{a(x)}\). Substituting \(y=a(x)^{b(x)}\) gives the stated formula. The two terms in the parentheses record the change in the exponent and the change in the base, respectively.

A Reliable Rule Sequence

Before differentiating, identify the outer structure and check where the expression is real-valued. Then apply the rules from the outside inward. For a variable power, the following sequence keeps the two sources of change distinct.

1
Check the base.
For a general real variable exponent, require the base \(a(x)\) to be positive wherever the logarithmic method is used.
2
Name the base and exponent.
Set \(y=a(x)^{b(x)}\), then identify \(a'(x)\) and \(b'(x)\), using the chain rule for nested inputs.
3
Differentiate both contributions.
Use \(b'(x)\ln(a(x))\) for the changing exponent and \(b(x)a'(x)/a(x)\) for the changing base.
4
Multiply by the original function.
The derivative is the original power multiplied by the sum of those contributions.

Worked Examples

Worked Example: A Shifted Base and a Quadratic Exponent

Differentiate \(y=(3x+2)^{x^2}\) on its real-valued domain. For a general real exponent, the base must be positive: \(3x+2>0\), so \(x>-\frac23\).

Set \(a(x)=3x+2\) and \(b(x)=x^2\). Then \(a'(x)=3\) and \(b'(x)=2x\). Applying the variable-power rule gives

$$ \begin{aligned} y' &=(3x+2)^{x^2} \left(2x\ln(3x+2)+x^2\frac{3}{3x+2}\right)\\ &=(3x+2)^{x^2} \left(2x\ln(3x+2)+\frac{3x^2}{3x+2}\right). \end{aligned} $$

Check at \(x=0\), which lies in the domain. The original function gives \(y(0)=2^0=1\). The derivative formula gives \(y'(0)=1(0+0)=0\). This agrees with the logarithmic rate of change: at \(x=0\), both \(b'(0)\) and \(b(0)\) are zero, so the derivative contributions vanish.

Worked Example: A Logarithm in the Exponent

Differentiate \(y=(x^2+4)^{\ln(x+1)}\). The base \(x^2+4\) is positive for every real \(x\), while the logarithm in the exponent requires \(x+1>0\). Thus the real-valued domain is \(x>-1\).

Let \(a(x)=x^2+4\) and \(b(x)=\ln(x+1)\). Their derivatives are \(a'(x)=2x\) and \(b'(x)=\frac1{x+1}\). Therefore

$$ \begin{aligned} y' &=(x^2+4)^{\ln(x+1)} \left( \frac{\ln(x^2+4)}{x+1} +\ln(x+1)\frac{2x}{x^2+4} \right). \end{aligned} $$

To check, evaluate at \(x=0\). The original function is \(4^{\ln 1}=4^0=1\). In the derivative formula, the first term in parentheses is \(\ln 4\), and the second is zero, so \(y'(0)=\ln 4\). This also follows from the logarithmic derivative: \(\frac{y'}y=\frac{\ln 4}{1}+0=\ln 4\), and \(y(0)=1\).

Worked Example: Logarithmic Differentiation of a Quotient

Differentiate \(y=\frac{(x-1)^3\sqrt{x+2}}{(2x+1)^2}\) on its real-valued domain. The square root requires \(x\geq -2\), and the denominator requires \(2x+1\ne0\). However, the logarithmic differentiation below takes \(\ln y\), so it applies where \(y>0\). The factor \((x-1)^3\) makes \(y>0\) when \(x>1\), which is the interval used for this calculation.

Take the logarithm and use the laws for products, quotients, and powers:

$$ \ln y=3\ln(x-1)+\frac12\ln(x+2)-2\ln(2x+1). $$

Differentiate each term. The chain rule gives \(\frac{d}{dx}\ln(2x+1)=\frac{2}{2x+1}\), so

$$ \frac{y'}y =\frac{3}{x-1}+\frac{1}{2(x+2)}-\frac{4}{2x+1}. $$

Multiplying by the original \(y\) yields

$$ y'=\frac{(x-1)^3\sqrt{x+2}}{(2x+1)^2} \left(\frac{3}{x-1}+\frac{1}{2(x+2)}-\frac{4}{2x+1}\right). $$

Check at \(x=2\). The original function is \(y(2)=\frac{1\cdot2}{25}=\frac2{25}\). The logarithmic derivative is \(3+\frac18-\frac45=\frac{120+5-32}{40}=\frac{93}{40}\). Hence \(y'(2)=\frac2{25}\cdot\frac{93}{40}=\frac{93}{500}\). The derivative formula gives the same value after substituting \(x=2\).

Worked Example: Nested Logarithms in a Variable Power

Differentiate \(y=(\ln(x^2+1))^{\cos x}\). For the base to be positive, we need \(\ln(x^2+1)>0\), equivalent to \(x^2+1>1\), or \(x\ne0\). Thus the real-valued domain is \(\mathbb R\setminus\{0\}\).

Take \(a(x)=\ln(x^2+1)\) and \(b(x)=\cos x\). By the chain rule, \(a'(x)=\frac{2x}{x^2+1}\), while \(b'(x)=-\sin x\). The derivative is

$$ \begin{aligned} y' &=(\ln(x^2+1))^{\cos x} \left[ -\sin x\ln(\ln(x^2+1)) +\cos x\frac{2x}{(x^2+1)\ln(x^2+1)} \right]. \end{aligned} $$

Check at \(x=1\). The base is \(\ln2>0\), and the exponent is \(\cos1\). Substitution gives \(y'(1)=(\ln2)^{\cos1}\left[-\sin1\ln(\ln2)+\frac{\cos1}{\ln2}\right]\). The logarithmic derivative of the original function is exactly the bracketed expression, so multiplying it by \(y(1)=(\ln2)^{\cos1}\) reproduces the derivative above.

Products and Quotients: What Logarithms Contribute

For a positive differentiable function \(y\), the logarithmic derivative is \(\frac{y'}y\), the rate of change of \(y\) relative to its current value. If \(y\) is a product of positive differentiable factors, taking \(\ln y\) turns the product into a sum. For a quotient, it turns division into subtraction. Differentiating that sum or difference can be simpler than applying repeated product and quotient rules directly.

When factors are not all positive, logarithms of their absolute values can be used on intervals where none of the factors is zero. In that setting, \(\frac{d}{dx}\ln|u(x)|=\frac{u'(x)}{u(x)}\) wherever \(u(x)\ne0\). The original function's domain still needs to be checked separately. Logarithmic differentiation does not make an undefined factor valid or allow division by zero.

A Common Mistake

A frequent error is to differentiate \(x^x\) as though it were an ordinary power with constant exponent, writing \(x\cdot x^{x-1}\). That rule applies to \(x^n\) when \(n\) is constant, not when the exponent also varies. For \(x^x\), the real-valued logarithmic method requires \(x>0\). Taking logarithms gives \(\ln y=x\ln x\), so

$$ \frac{y'}y=\ln x+1 \qquad\Longrightarrow\qquad y'=x^x(\ln x+1). $$

The incorrect expression gives \(4\) at \(x=2\), whereas the correct derivative gives \(4(\ln2+1)\). The difference comes from ignoring the derivative of the exponent. A useful check is to ask whether the result includes both contributions: the change in the exponent and the change in the base.

Why Domain Checks Matter

The variable-power rule is especially convenient because it handles arbitrary differentiable exponents, but its real-valued logarithmic form requires a positive base. An expression can have a larger domain in special cases—for example, a negative base raised to a fixed integer power—but that does not justify applying the general variable-exponent rule there. Check the original expression first, then state the interval on which the chosen differentiation method is valid.

For a nested expression, check each layer. In \((\ln(x^2+1))^{\cos x}\), the outer variable power requires \(\ln(x^2+1)>0\); the inner logarithm itself requires \(x^2+1>0\). The stronger requirement is \(x\ne0\). Keeping these conditions explicit prevents a formally correct differentiation from being presented on points where the original function is not defined.

Key takeaway: For a positive base \(a(x)\), differentiate \(a(x)^{b(x)}\) by multiplying the original power by \(b'(x)\ln(a(x))+b(x)a'(x)/a(x)\). For products and quotients, logarithms can simplify the algebra, but domain restrictions remain in force.

Check Your Understanding

For each question, identify the relevant domain before differentiating or simplifying.

  1. Differentiate \(y=(2x+5)^{x^3}\). On what interval is the general real variable-power rule applicable?
  2. For \(y=(x^2+1)^{\ln x}\), state the real-valued domain and write the derivative using the variable-power rule.
  3. Explain why differentiating \(x^x\) as \(x\cdot x^{x-1}\) omits a term.
  4. For a positive differentiable function \(y\), what does \(\frac{y'}y\) represent in logarithmic differentiation?
  5. When using \(\ln|u(x)|\), what condition on \(u(x)\) is needed at the point of differentiation?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon