AP Calculus AB and BC

Derivative of a^x: Answer, Proof, and Mistakes

The derivative of a^x is a^x times ln a, for any positive constant base a. So d/dx of 2^x is 2^x ln 2. It comes from rewriting a^x as e^(x ln a) and differentiating with the chain rule; when a = e the factor is ln e = 1, so the extra factor disappears, which is why e^x is its own derivative.

ddx[ax]=axlna\frac{d}{dx}\left[a^x\right] = a^x \ln a

The proof: rewrite the base as a power of e

The axa^x rule is not a separate fact to memorize. Every positive number is a power of ee, since a=elnaa = e^{\ln a}. Raise both sides to the xx and the exponents multiply, which turns any exponential into a base-ee exponential with a linear inner function.

ax=(elna)x=exlnaa^x = \left(e^{\ln a}\right)^x = e^{x \ln a}

Now differentiate exlnae^{x \ln a} with the chain rule. The outside is eue^u, whose derivative is eue^u; the inside is u=xlnau = x \ln a, and because lna\ln a is a constant, dudx=lna\frac{du}{dx} = \ln a.

ddxexlna=exlnalna=axlna\frac{d}{dx}\, e^{x \ln a} = e^{x \ln a} \cdot \ln a = a^x \ln a

The base comes back down unchanged and a constant factor of lna\ln a drops out front. That factor is the whole story: it is why every exponential except one carries an extra number when you differentiate it. The lone exception is base ee. Set a=ea = e and the factor becomes lne=1\ln e = 1, so axlnaa^x \ln a collapses to ex1=exe^x \cdot 1 = e^x. That is the real reason exe^x is its own derivative, and the reason ee is the natural base to build on.

The one line to remember

ddxax=axlna\frac{d}{dx}\, a^x = a^x \ln a, valid for any constant base a>0a > 0. The base rides along unchanged and lna\ln a appears as a constant factor. Only base ee escapes the extra factor, because lne=1\ln e = 1.

a^x is not x^a: the base-versus-exponent trap

The most common wrong turn is reaching for the power rule. The power rule ddxxn=nxn1\frac{d}{dx}\, x^n = n x^{n-1} applies when the variable is the base and the exponent is a constant. In axa^x the roles are swapped: the base is constant and the variable is the exponent, so the power rule does not apply at all. Read the position of xx before you pick a rule.

FunctionWhere the variable sitsRuleDerivative
xax^ain the basepower ruleaxa1a x^{a-1}
axa^xin the exponentexponential ruleaxlnaa^x \ln a
xxx^xin bothlogarithmic differentiationxx(lnx+1)x^x(\ln x + 1)

The xxx^x row is a reminder that when the variable appears in both places, neither rule alone works and you take ln\ln of both sides first. That case is past what axa^x needs, but it shows why naming the base and the exponent out loud, before writing anything, is worth the two seconds it costs.

Where a^x shows up on the AP exam

The CED lists the derivatives you are expected to know cold in Topic 2.7, "Derivatives of cos x, sin x, e^x, and ln x." Notice axa^x is not on that list. The exam expects you to build it from two things that are: the exe^x rule in Topic 2.7 and the chain rule in Topic 3.1. Rewriting axa^x as exlnae^{x \ln a} is the bridge between them.

Unit 2 is 10-15% of the AB exam and 5-10% of BC; Unit 3, which owns the chain rule, is 5-10% of both. Topic 3.5, "Selecting Procedures for Calculating Derivatives," is where the exam checks that you recognize an exponential base and reach for axlnaa^x \ln a rather than the power rule.

In practice axa^x arrives most often inside a composite such as ag(x)a^{g(x)}, or in a table-of-values problem that hands you values of a function ff and asks for the derivative of 2f(x)2^{f(x)} at a point. Both reduce to the same rule plus one chain-rule factor.

Common mistakes

  • Using the power rule: writing ddxax=xax1\frac{d}{dx}\, a^x = x\, a^{x-1}. This misapplies the power rule. The power rule is for xax^a, where the variable sits in the base, and gives axa1a x^{a-1}; here the variable is in the exponent, so the exponential rule applies instead.
  • Dropping the lna\ln a factor: writing ddxax=ax\frac{d}{dx}\, a^x = a^x. That is true only for a=ea = e. Every other base leaves a constant factor of lna\ln a out front.
  • Forgetting the inner derivative on a composite: ddx3x2\frac{d}{dx}\, 3^{x^2} is not 3x2ln33^{x^2} \ln 3. The chain rule multiplies by ddxx2=2x\frac{d}{dx}\, x^2 = 2x.
  • Confusing lna\ln a with lnx\ln x: the factor is ln\ln of the constant base, a fixed number, not a function of xx. For 2x2^x it is the constant ln20.693\ln 2 \approx 0.693.

Two worked composites with the chain rule

Both use the same composite form. Writing F(x)=ag(x)F(x) = a^{g(x)} gives F(x)=ag(x)lnag(x)F'(x) = a^{g(x)} \ln a \cdot g'(x): the base rule times the derivative of the exponent.

Example 1. Differentiate 3x23^{x^2}. Here F(x)=3x2F(x) = 3^{x^2}, the base is 33, the inner function is g(x)=x2g(x) = x^2, and g(x)=2xg'(x) = 2x.

F(x)=3x2ln32x=2xln33x2F'(x) = 3^{x^2} \ln 3 \cdot 2x = 2x \ln 3 \cdot 3^{x^2}

Example 2. Differentiate 5sinx5^{\sin x}. Here F(x)=5sinxF(x) = 5^{\sin x}, the base is 55, the inner function is g(x)=sinxg(x) = \sin x, and g(x)=cosxg'(x) = \cos x.

F(x)=5sinxln5cosxF'(x) = 5^{\sin x} \ln 5 \cdot \cos x

In each case the base stays put, ln\ln of the base rides in front as a constant, and the chain rule tacks on the derivative of the exponent. If you can reproduce those three moves in order, the general exponential is no harder than exe^x.

Check yourself, not just the answer

Type derivatives and get graded on mathematical equivalence, with rule-level hints when you miss, in the Derivative Practice Checker.

Frequently asked questions

What is the derivative of 2^x?

ddx2x=2xln2\frac{d}{dx}\, 2^x = 2^x \ln 2, which is the general rule ddxax=axlna\frac{d}{dx}\, a^x = a^x \ln a with a=2a = 2. Numerically ln20.693\ln 2 \approx 0.693. Writing x2x1x\, 2^{x-1} is the power rule and does not apply, because the variable is in the exponent.

Why does a^x keep a factor of ln a but e^x does not?

Both follow the same rule, axlnaa^x \ln a. For base ee that factor is lne\ln e, which equals 11, so it disappears and exe^x differentiates to itself. Base ee is simply the base whose natural log is 11.

How is the derivative of a^x different from x^a?

xax^a has the variable in the base, so it uses the power rule: ddxxa=axa1\frac{d}{dx}\, x^a = a x^{a-1}. axa^x has the variable in the exponent, so it uses the exponential rule: ddxax=axlna\frac{d}{dx}\, a^x = a^x \ln a. Same symbols, opposite rules.

How do I differentiate a^x with a chain rule, like 4^(3x)?

Multiply by the derivative of the exponent: ddx43x=43xln43=3ln443x\frac{d}{dx}\, 4^{3x} = 4^{3x} \ln 4 \cdot 3 = 3 \ln 4 \cdot 4^{3x}. In general, for F(x)=ag(x)F(x) = a^{g(x)}, F(x)=ag(x)lnag(x)F'(x) = a^{g(x)} \ln a \cdot g'(x).