Tutorials › AP Calculus › Exponential Functions with Composite Exponents

Chain Rule and Nested Functions · Tutorial 171 of 999

Exponential Functions with Composite Exponents

Differentiate exponential functions whose exponents are themselves functions, using the chain rule and the factor ln a for bases other than e.

Intermediate 9 min read

What You'll Learn

  • Differentiate e^(g(x)) and a^(g(x)) with the chain rule
  • Explain why the factor ln a appears for bases other than e
  • Handle polynomial, trigonometric and nested exponents
  • Check a derivative at a convenient point

Why a Composite Exponent Needs the Chain Rule

The functions \(e^x\) and \(2^x\) have exponent \(x\), the simplest possible input. In practice the exponent is often itself a function: \(e^{x^2+3x}\), \(2^{\sin x}\), or \(e^{\cos 3x}\). Each of these is a composition. An outer exponential function is applied to an inner function \(g(x)\), so the derivative must account for how fast the inner function is changing.

The basic exponential derivatives are \(\dfrac{d}{dx}e^x=e^x\) and \(\dfrac{d}{dx}a^x=a^x\ln a\) for a constant \(a>0\). They apply only when the exponent is exactly \(x\). When the exponent is \(g(x)\), a correction factor \(g'(x)\) appears, exactly as in every other chain-rule problem.

Rules for composite exponents: If \(g\) is differentiable, then $$ \frac{d}{dx}\,e^{g(x)}=e^{g(x)}\,g'(x) \qquad\text{and}\qquad \frac{d}{dx}\,a^{g(x)}=a^{g(x)}\,(\ln a)\,g'(x)\quad(a>0). $$

In words: keep the exponential function unchanged, multiply by \(\ln a\) when the base is not \(e\), and then multiply by the derivative of the exponent.

Why the Rules Work

Let \(u=g(x)\). Then \(e^{g(x)}\) is the composition \(e^u\), where \(u\) depends on \(x\). The chain rule says that the derivative of the composition is the derivative of the outer function, evaluated at the inner function, times the derivative of the inner function:

$$ \frac{d}{dx}e^{u}=\frac{d}{du}\left(e^{u}\right)\cdot\frac{du}{dx}=e^{u}\cdot g'(x)=e^{g(x)}g'(x). $$

For a general base, rewrite \(a^{g(x)}=e^{g(x)\ln a}\). The exponent \(g(x)\ln a\) has derivative \(g'(x)\ln a\), because \(\ln a\) is a constant. Applying the \(e^{g}\) rule gives \(a^{g(x)}\,(\ln a)\,g'(x)\). The base \(e\) is the special case in which \(\ln e=1\), so the extra factor disappears.

Worked Examples

Worked Example: A Polynomial Exponent

Differentiate \(f(x)=e^{x^2+3x}\).

The inner function is \(g(x)=x^2+3x\), so \(g'(x)=2x+3\). Keep the exponential and multiply by \(g'(x)\):

$$ f'(x)=(2x+3)\,e^{x^2+3x}. $$

Check at \(x=0\): \(f(0)=e^0=1\) and \(f'(0)=3\cdot1=3\). A quick estimate agrees, since near \(x=0\) the exponent is about \(3x\) and \(e^{3x}\) has slope \(3\) at the origin.

Worked Example: A Trigonometric Exponent with Base 2

Differentiate \(h(x)=2^{\sin x}\).

Here \(a=2\) and \(g(x)=\sin x\), so \(g'(x)=\cos x\). The base is not \(e\), so the factor \(\ln 2\) is required:

$$ h'(x)=2^{\sin x}\,(\ln 2)\,\cos x. $$

Check at \(x=0\): \(h'(0)=2^0\,(\ln2)(1)=\ln 2\approx0.693\). At \(x=\pi/2\), \(h'(\pi/2)=0\) because \(\cos(\pi/2)=0\). That matches the fact that \(\sin x\) has a maximum at \(\pi/2\), so the exponent is momentarily constant there.

Worked Example: A Composite Exponent with a Constant Multiple

Differentiate \(k(x)=e^{\cos 3x}\).

The exponent \(g(x)=\cos 3x\) is itself a composite function, so \(g'(x)=-3\sin 3x\) by a second application of the chain rule. Then

$$ k'(x)=e^{\cos 3x}\cdot(-3\sin 3x)=-3\sin(3x)\,e^{\cos 3x}. $$

Check: at \(x=0\), \(\sin 0=0\), so \(k'(0)=0\). That is reasonable, because \(\cos 3x\) has a maximum at \(x=0\), and \(k\) has a relative maximum there with value \(e\).

Worked Example: An Exponential Inside an Exponential

Differentiate \(m(x)=e^{e^x}\).

The exponent is \(g(x)=e^x\), and \(g'(x)=e^x\). Therefore

$$ m'(x)=e^{e^x}\cdot e^x=e^{x+e^x}. $$

The result can be written either way. Because \(m'(x)\) is a product of positive factors, the function \(m\) is increasing for every real \(x\).

Reading the Derivative: What the Extra Factor Means

The factor \(g'(x)\) in \(\dfrac{d}{dx}e^{g(x)}=e^{g(x)}g'(x)\) is not just bookkeeping. It tells you how the exponent is moving. Because \(e^{g(x)}\) is always positive, the sign of the derivative is the sign of \(g'(x)\). Whenever the exponent is increasing, the whole function is increasing, and whenever the exponent is decreasing, so is the function. The exponential only changes how steeply the function responds.

That observation gives a fast way to analyze a function such as \(e^{g(x)}\): study the simpler function \(g\) first. Critical points of \(e^{g(x)}\) occur exactly where \(g'(x)=0\), and a maximum of \(g\) corresponds to a maximum of \(e^{g}\).

Worked Example: Finding a Maximum

Find the relative extremum of \(f(x)=e^{2x-x^2}\).

The exponent is \(g(x)=2x-x^2\), so \(g'(x)=2-2x\) and

$$ f'(x)=(2-2x)\,e^{2x-x^2}. $$

Since the exponential factor is positive, \(f'(x)=0\) only at \(x=1\). For \(x<1\), \(2-2x>0\), so \(f\) is increasing, and for \(x>1\), \(2-2x<0\), so \(f\) is decreasing. The sign change from positive to negative shows a relative maximum at \(x=1\), where \(f(1)=e^{2-1}=e\). The tangent line there is horizontal: \(y=e\).

Worked Example: Growth with a Scaled Exponent

A population is modeled by \(P(t)=500\cdot2^{t/3}\), where \(t\) is measured in years. Find the rate at which the population is changing at \(t=6\).

The base is \(2\) and the exponent is \(g(t)=\tfrac t3\), with \(g'(t)=\tfrac13\). Therefore

$$ P'(t)=500\cdot2^{t/3}\,(\ln2)\cdot\frac13. $$

At \(t=6\), \(P(6)=500\cdot2^2=2000\) and \(P'(6)=2000\cdot\dfrac{\ln2}{3}\approx462.1\). The population is growing at about \(462\) individuals per year. Check the units: the derivative of a population in individuals with respect to time in years is measured in individuals per year. The ratio \(P'/P=\dfrac{\ln2}{3}\approx0.231\) is constant, which is the signature of exponential growth.

Combining Composite Exponents with Other Rules

Composite exponentials often appear inside products and quotients, so the exponential rule is usually one step in a longer calculation. Treat the exponential as a single factor, differentiate it with the rule above, and then continue with the product or quotient rule. The most common source of errors is losing track of which step has been completed, so write the intermediate derivative explicitly.

Worked Example: A Product with an Exponential

Differentiate \(y=x^2e^{3x}\).

Use the product rule with \(u=x^2\) and \(v=e^{3x}\). The derivative of \(v\) needs the composite-exponent rule: \(v'=3e^{3x}\). Then

$$ y'=2x\,e^{3x}+x^2\cdot3e^{3x}=x\,e^{3x}(2+3x). $$

Check at \(x=1\): \(y'(1)=e^3(5)\approx100.4\), while the two pieces \(2e^3\) and \(3e^3\) sum to \(5e^3\), as expected.

Worked Example: A Quotient with an Exponential

Differentiate \(y=\dfrac{e^{2x}}{x}\) for \(x\neq0\).

Use the quotient rule with numerator derivative \(2e^{2x}\) from the composite-exponent rule:

$$ y'=\frac{x\cdot2e^{2x}-e^{2x}\cdot1}{x^2}=\frac{e^{2x}(2x-1)}{x^2}. $$

The sign of \(y'\) is the sign of \(2x-1\), so the function is decreasing for \(0\tfrac12\). On the negative side, \(y'<0\) as well, so \(y\) is decreasing on \((-\infty,0)\).

In both examples, the composite-exponent rule supplies the derivative of one factor, and the usual product or quotient rule does the rest. Practicing the pieces separately makes the combined problems routine.

Common Mistakes

Forgetting the inner derivative. Writing \(\frac{d}{dx}e^{x^2}=e^{x^2}\) drops the factor \(2x\). A reliable test is \(x=1\): the true slope of \(e^{x^2}\) at \(x=1\) is \(2e\approx5.44\), not \(e\approx2.72\).

Forgetting \(\ln a\). For \(2^{\sin x}\), the factor \(\ln 2\) is part of the derivative. Leaving it out is correct only when the base is \(e\).

Using the power rule on an exponential. The expression \(e^{g(x)}\) has a variable exponent, so the power rule \(\frac{d}{dx}x^n=nx^{n-1}\) does not apply. Never write \(\frac{d}{dx}e^{x^2}=x^2e^{x^2-1}\).

Mixing up which function is inside. In \(e^{\cos 3x}\), the cosine is inside the exponential, so the answer contains \(\sin 3x\), not \(\cos\) of anything else. Reading the expression from the outside in prevents this slip.

A Reliable Procedure

1
Identify the base and the exponent.
Write the function as \(a^{g(x)}\) or \(e^{g(x)}\), and name \(g(x)\) explicitly.
2
Differentiate the exponent.
Compute \(g'(x)\), using the chain rule again if the exponent is itself composite.
3
Assemble the derivative.
Keep the exponential, include \(\ln a\) if the base is not \(e\), and multiply by \(g'(x)\).
4
Check one value.
Evaluate the original function and its derivative at a convenient point, such as \(x=0\), and see whether the sign and size are plausible.

This pattern is the basis for later work on logarithms of composite arguments, implicit differentiation with exponentials, and related-rates models with exponential growth and decay, where the exponent is almost always a function of time.

Check Your Understanding

  1. Differentiate \(f(x)=e^{5x-2}\). What is \(f'(0)\)?
  2. Differentiate \(g(x)=3^{x^2}\). Which factor in your answer is easy to forget?
  3. Differentiate \(h(x)=e^{\sin x}\) and find where \(h'(x)=0\) on \([0,2\pi]\).
  4. Find the derivative of \(p(x)=e^{-x^2}\) and explain why \(p\) has a maximum at \(x=0\).
  5. A student writes \(\frac{d}{dx}e^{\sqrt{x}}=e^{\sqrt{x}}\). What is missing, and what is the correct derivative?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: 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
Clinical Biostats