Introduction
When the base of an exponential function is a positive constant, its rate of change depends on two things: the current value of the exponential and the rate at which its exponent changes. The chain rule combines these two contributions.
For example, differentiating \(2^{x^2}\) is not just a matter of keeping the exponential and differentiating the exponent. The base also contributes a factor of \(\ln 2\). That factor is necessary for the derivative to have the correct size.
This tutorial develops the rule for \(a^{u(x)}\), where \(a\) is a positive constant and \(u\) is a differentiable function. The earlier result for differentiating \(a^x\) supplies the derivative of the outer function; the chain rule accounts for the changing exponent.
The derivative rule
The base \(a\) is fixed, while \(u(x)\) varies with \(x\). The result has three factors:
- \(a^{u(x)}\), the value of the exponential function;
- \(\ln(a)\), the factor contributed by the base; and
- \(u'(x)\), the rate of change of the exponent.
The condition \(a>0\) makes \(\ln(a)\) defined and allows \(a^{u(x)}\) to be defined for arbitrary real values of \(u(x)\). The base may equal \(1\): in that case \(1^{u(x)}=1\) is constant and the formula gives derivative \(0\), since \(\ln(1)=0\). The base \(a=0\) or a negative base is not covered by this real-valued rule for arbitrary real exponents.
Why the rule works
Set \(F(x)=a^{u(x)}\). The derivative of the outer function \(t\mapsto a^t\), established in the earlier material on differentiating \(a^x\), is \(a^t\ln(a)\). Applying the chain rule to the composition \(F(x)=a^{u(x)}\) gives that outer derivative evaluated at \(u(x)\), multiplied by \(u'(x)\).
The same conclusion can be seen directly from the difference quotient. Fix \(x\), and write \(\Delta u=u(x+h)-u(x)\). When \(h\ne 0\), the quotient can be expressed as
when \(\Delta u\ne 0\). As \(h\to 0\), differentiability of \(u\) implies \(\Delta u\to 0\). The first quotient involving \(\Delta u\) tends to \(\ln(a)\), because it is the difference quotient for \(t\mapsto a^t\) at \(t=0\). The final quotient tends to \(u'(x)\). If \(\Delta u=0\) for some \(h\), the original numerator is zero for that \(h\); the same limiting argument applies by defining the middle factor to equal \(\ln(a)\) at \(\Delta u=0\). Thus the limit is
which proves the rule. This argument shows why both factors \(\ln(a)\) and \(u'(x)\) appear: the first describes the response of the exponential to a change in its exponent, and the second describes how quickly that exponent changes with \(x\).
A reliable way to apply the rule
Before differentiating, identify the base and the exponent. The base is the positive constant \(a\); the exponent is the entire function \(u(x)\), including any parentheses. Then differentiate \(u(x)\) and substitute it into the formula. Keeping these roles explicit is particularly useful when the exponent is more than a single term.
Write the expression as \(a^{u(x)}\), with \(a>0\) constant.
Find \(u'(x)\), observing any domain restrictions on \(u\).
Multiply \(a^{u(x)}\), \(\ln(a)\), and \(u'(x)\).
Worked examples
Worked Example: A quadratic exponent
Differentiate \(f(x)=2^{x^2-3x+1}\).
The base is \(a=2\), and the exponent is \(u(x)=x^2-3x+1\). Differentiate the exponent term by term:
Apply the general-base rule:
To check the factors, the derivative of the outer function \(2^t\) at \(t=u(x)\) is \(2^{u(x)}\ln(2)\), and the inner derivative is \(2x-3\); their product is the displayed result. At \(x=2\), the exponent is \(4-6+1=-1\), and \(2x-3=4-3=1\). Hence \(f'(2)=2^{-1}\ln(2)=\ln(2)/2\), consistent with the formula.
Worked Example: A trigonometric exponent and a base below one
Differentiate \(g(x)=(1/3)^{\sin x}\).
Here \(a=1/3>0\), and \(u(x)=\sin x\), so \(u'(x)=\cos x\). Also,
because \(1/3=3^{-1}\). Therefore
For a check at \(x=0\), \(\sin(0)=0\) and \(\cos(0)=1\). The function value is \((1/3)^0=1\), so the derivative formula gives \(g'(0)=1\cdot(-\ln 3)\cdot 1=-\ln 3\). The negative sign is appropriate here: near zero, the exponent \(\sin x\) is increasing, while a base below one makes \(a^t\) decrease as \(t\) increases.
Worked Example: A radical exponent
Differentiate \(h(x)=5^{\sqrt{x+4}}\) on its differentiability domain.
The square root requires \(x+4\ge 0\), but its derivative is finite only when \(x+4>0\). Thus the function is differentiable for \(x>-4\). Set \(u(x)=\sqrt{x+4}=(x+4)^{1/2}\). The power rule and chain rule give
Now apply the exponential rule:
At \(x=5\), \(x+4=9\), \(\sqrt{9}=3\), and \(2\sqrt{9}=6\), so \(h'(5)=5^3\ln(5)/6=125\ln(5)/6\). Substitution into the general formula confirms the result: the exponential factor is \(125\), the base factor is \(\ln(5)\), and the exponent derivative is \(1/6\).
What changes when the base changes?
The factor \(\ln(a)\) records how the base affects the derivative. If \(a>1\), then \(\ln(a)>0\). If \(0<a<1\), then \(\ln(a)<0\). Consequently, when \(u'(x)>0\), the derivative of \(a^{u(x)}\) is positive for \(a>1\) and negative for \(0<a<1\). If \(u'(x)<0\), those signs reverse. If \(u'(x)=0\), the derivative is zero, regardless of the positive base.
This sign information is a useful check, not a replacement for the formula. For example, in the second worked example the exponent is increasing at \(x=0\), but the base is \(1/3\), so the function decreases there. Omitting the negative sign from \(\ln(1/3)\) would contradict that behavior.
Common mistake: omitting a factor
A frequent error is to differentiate \(a^{u(x)}\) as \(a^{u(x)}u'(x)\), leaving out \(\ln(a)\). For instance, the incorrect calculation
misses the response of the exponential to its base. The correct calculation identifies \(u(x)=x^2\), so \(u'(x)=2x\), and includes the logarithm of the base:
At \(x=1\), the incorrect expression gives \(6\), while the correct derivative is \(6\ln(3)\). These are not equal, since \(\ln(3)\ne 1\). A practical check is to write all three factors in the rule before simplifying; this makes it harder to lose either the base factor or the derivative of the exponent.
Why the rule matters
Composite exponents arise whenever an exponential quantity responds to a changing input: the exponent may be a polynomial, a trigonometric function, or another differentiable expression. The rule gives a direct way to calculate the instantaneous rate without treating the exponent as though it were simply \(x\). It also makes clear which part controls the value, which part comes from the base, and which part describes the changing input.
Before finalizing a derivative, check three items: the exponential expression has been preserved, \(\ln(a)\) is present, and the derivative of the entire exponent has been included. Also check that the base is a positive constant and that the exponent is differentiable at the point under consideration. These checks address the most common sources of error.
Check Your Understanding
For each question, identify the base and exponent before applying the rule.
- Differentiate \(4^{x^3-2x}\).
- Differentiate \((1/5)^{\cos x}\). What determines the sign of the logarithm-of-the-base factor?
- For \(6^{\sqrt{x}}\), state the interval on which the function is differentiable and find its derivative there.
- Explain why the derivative of \(1^{u(x)}\) is zero for every differentiable \(u\).
- Which factor is missing from the incorrect expression \(a^{u(x)}u'(x)\) for the derivative of \(a^{u(x)}\)?