AP Calculus AB and BC

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

The integral of a^x is a^x divided by ln a, plus C, for any base a > 0 with a not equal to 1. So the integral of 2^x dx is 2^x/ln 2 + C. The rule reverses the derivative d/dx of a^x = a^x ln a: dividing by the constant ln a cancels the extra factor. When a = e, ln e = 1, so e^x integrates to itself.

axdx=axlna+C\int a^x\,dx = \frac{a^x}{\ln a} + C

How to prove the integral of a^x

Antidifferentiation is the reverse of differentiation, so the fastest route is to start from the derivative of axa^x and undo it. Rewriting ax=exlnaa^x = e^{x \ln a} and applying the chain rule, where lna\ln a is a constant multiplier on the inside, gives the derivative rule.

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

Differentiating axa^x therefore returns the original function times an unwanted constant factor of lna\ln a. Dividing by that constant before differentiating cancels it, since constant multiples pass straight through the derivative.

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

The derivative of axlna\frac{a^x}{\ln a} is exactly the integrand, so it is an antiderivative of axa^x. Every other antiderivative differs from it by a constant, which is what +C+\,C records.

axdx=axlna+C\int a^x\,dx = \frac{a^x}{\ln a} + C

Why the base must be positive and not 1

The restriction a>0a > 0 keeps axa^x defined for every real xx, and a1a \neq 1 keeps lna0\ln a \neq 0 so the division is legal. If a=1a = 1 the integrand is just the constant function 1, and 1dx=x+C\int 1\,dx = x + C.

Where the integral of a^x shows up on the AP exam

Basic antiderivative rules like this one sit in Unit 6, Topic 6.8 (Finding Antiderivatives and Indefinite Integrals: Basic Rules and Notation). Unit 6 carries a weighting of 15 to 20 percent on both AB and BC, so it is one of the two most heavily weighted units on each exam.

The base ee is the case the College Board leans on hardest, because lne=1\ln e = 1 makes the denominator disappear. Reading the general rule with a=ea = e recovers the familiar result.

exdx=exlne=ex+C\int e^x\,dx = \frac{e^x}{\ln e} = e^x + C

When the exponent is a linear function rather than bare xx, the integral needs substitution (Topic 6.9), and you divide by the inside coefficient as well as by lna\ln a.

akxdx=akxklna+C\int a^{kx}\,dx = \frac{a^{kx}}{k \ln a} + C

On the multiple-choice section this usually appears as a one-step recall question or as one term inside a longer sum. On free response it turns up inside accumulation and area setups, where an exponential model with a base other than ee has to be antidifferentiated before the Fundamental Theorem is applied.

Common mistakes with the integral of a^x

Almost every error on this rule is a sign error in the sense of doing the derivative operation instead of the integral one, or reaching for the power rule when the variable is upstairs.

  • Multiplying by lna\ln a instead of dividing. Multiplication is the derivative, axlnaa^x \ln a; division is the integral, axlna\frac{a^x}{\ln a}. Sanity check with a=ea = e: only division gives back exe^x.
  • Applying the power rule to get ax+1x+1\frac{a^{x+1}}{x+1}. The power rule needs a constant exponent and a variable base. Here the base is constant and the exponent is the variable, which is the exponential rule instead.
  • Forgetting the inside coefficient on akxa^{kx}. Writing 52xdx=52xln5\int 5^{2x}\,dx = \frac{5^{2x}}{\ln 5} misses the factor of 2 from the substitution; the answer is 52x2ln5+C\frac{5^{2x}}{2 \ln 5} + C.
  • Writing lnax\ln a^x or ln(a)x\ln(a)^x in the denominator. The denominator is the constant lna\ln a, evaluated once, and it does not carry the variable exponent.
  • Dropping the constant of integration. An indefinite integral is a whole family of functions, and the missing +C+\,C is a routine point loss on free response.

Worked examples

Example 1. A plain base swap. Apply the rule with a=3a = 3.

3xdx=3xln3+C\int 3^x\,dx = \frac{3^x}{\ln 3} + C

Example 2. A linear exponent. Let u=2xu = 2x, so du=2dxdu = 2\,dx and dx=du2dx = \frac{du}{2}.

52xdx=125udu=52x2ln5+C\int 5^{2x}\,dx = \frac{1}{2}\int 5^{u}\,du = \frac{5^{2x}}{2 \ln 5} + C

Example 3. A sum with the natural base alongside another base. Integrate term by term, and note that only the 2x2^x term picks up a logarithm in the denominator.

(42xex)dx=42xln2ex+C\int \left(4 \cdot 2^x - e^x\right)dx = \frac{4 \cdot 2^x}{\ln 2} - e^x + C

Example 4. A substitution with a nonlinear exponent. Let u=x2u = x^2, so du=2xdxdu = 2x\,dx and the stray xx out front is exactly what the substitution needs.

x3x2dx=123udu=3x22ln3+C\int x \cdot 3^{x^2}\,dx = \frac{1}{2}\int 3^{u}\,du = \frac{3^{x^2}}{2 \ln 3} + C

Example 5. A definite integral. Evaluate the antiderivative at the endpoints, and watch the ln2\ln 2 survive as a constant in the exact answer.

012xdx=[2xln2]01=21ln2=1ln21.443\int_0^1 2^x\,dx = \left[\frac{2^x}{\ln 2}\right]_0^1 = \frac{2 - 1}{\ln 2} = \frac{1}{\ln 2} \approx 1.443

Every answer on this page is machine checked

An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you. The base is a parameter, so the numeric check fixes a = 2: the integrand 2^x is cross-checked against the antiderivative 2^x/ln(2) at the sample points. The general result a^x/ln(a) + C is derived the same way for every a > 0 with a not equal to 1.

Frequently asked questions

What is the integral of a^x?

axdx=axlna+C\int a^x\,dx = \frac{a^x}{\ln a} + C, for any constant base with a>0a > 0 and a1a \neq 1. The base stays the same and picks up a denominator of lna\ln a.

Why does the integral of a^x divide by ln a instead of multiplying?

Because the derivative multiplies. Since ddx[ax]=axlna\frac{d}{dx}[a^x] = a^x \ln a, differentiating leaves an extra factor of lna\ln a, and the antiderivative has to divide it out so that the derivative of axlna\frac{a^x}{\ln a} comes back to axa^x. Checking with a=ea = e settles it: only the dividing version returns exe^x.

What is the integral of 2^x?

2xdx=2xln2+C\int 2^x\,dx = \frac{2^x}{\ln 2} + C. Numerically 1ln21.4427\frac{1}{\ln 2} \approx 1.4427, so the antiderivative is roughly 1.44272x1.4427 \cdot 2^x.

What is the integral of a^(kx)?

akxdx=akxklna+C\int a^{kx}\,dx = \frac{a^{kx}}{k \ln a} + C. The substitution u=kxu = kx contributes the extra 1k\frac{1}{k}, so you divide by the inside coefficient as well as by lna\ln a. For example, 73xdx=73x3ln7+C\int 7^{3x}\,dx = \frac{7^{3x}}{3 \ln 7} + C.

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

They use opposite rules. In axa^x the exponent is the variable, so the exponential rule applies and the answer is axlna+C\frac{a^x}{\ln a} + C. In xax^a the base is the variable, so the power rule applies and the answer is xa+1a+1+C\frac{x^{a+1}}{a+1} + C for a1a \neq -1. Deciding which one you are looking at is the whole battle.