Integral of 2ˣ and aˣ: Formula, Steps and Examples
The integral of 2ˣ is 2ˣ/ln 2 + C, and ∫aˣ dx = aˣ/ln a + C. See the derivation from e^(x ln a), a graph, definite integrals and examples.
Exponential and log integrals Updated 3 min read
At a glance
- Antiderivative
- \dfrac{2^x}{\ln 2} + C
- General base
- \int a^x\,dx = \dfrac{a^x}{\ln a} + C for a > 0, a \ne 1
- Method
- Rewrite a^x = e^{x\ln a}, then divide by \ln a
- From 0 to 1
- \frac{1}{\ln 2} \approx 1.443
- Value of ln 2
- \approx 0.6931
On this page
The integral of 2^x is \dfrac{2^x}{\ln 2} + C. Every exponential a^x integrates the same way: keep the exponential and divide by the natural log of the base.
The general formula holds for any base a > 0 with a \ne 1.
Graph of 2ˣ with the area from 0 to 1
How to integrate 2ˣ step by step
The trick is to turn the base into e, since you already know how to integrate exponentials of e.
- Rewrite with base e. Since 2 = e^{\ln 2}, we have 2^x = \left(e^{\ln 2}\right)^x = e^{x\ln 2}.
- Integrate. \ln 2 is just a constant, about 0.693. Using \int e^{kx}\,dx = \frac{1}{k}e^{kx} + C from the integral of e²ˣ page: \int e^{x\ln 2}\,dx = \frac{1}{\ln 2}e^{x\ln 2} + C
- Go back to base 2. e^{x\ln 2} = 2^x, so the answer is \frac{2^x}{\ln 2} + C.
Replace 2 by a everywhere and you get the general formula. The base must be positive so that \ln a is defined, and a \ne 1 so that \ln a \ne 0. (For a = 1, 1^x = 1 and \int 1\,dx = x + C.)
Check by differentiating
The derivative of 2ˣ is 2^x\ln 2. So
Definite integrals
| Integral | Work | Value |
|---|---|---|
| \int_0^1 2^x\,dx | \frac{2 - 1}{\ln 2} | \approx 1.443 |
| \int_0^3 2^x\,dx | \frac{8 - 1}{\ln 2} | \approx 10.099 |
| \int_0^2 3^x\,dx | \frac{9 - 1}{\ln 3} | \approx 7.282 |
| \int_{-\infty}^{0} 2^x\,dx | \frac{1 - 0}{\ln 2} | \approx 1.443 |
Compare the second row with a sum: 2^0 + 2^1 + 2^2 = 7. The integral \frac{7}{\ln 2} is larger because the area includes the curve rising between the integers. This contrast between sums and integrals shows up again in the integral test.
Worked examples
Example 1: base 10. \displaystyle\int 10^x\,dx = \frac{10^x}{\ln 10} + C \approx 0.434\cdot 10^x + C.
Example 2: a linear exponent. \displaystyle\int 2^{3x}\,dx. Let u = 3x, du = 3\,dx:
You could also write 2^{3x} = 8^x and get \frac{8^x}{\ln 8}. Since \ln 8 = 3\ln 2, the answers match.
Example 3: a fraction as the base. \displaystyle\int\left(\frac{1}{2}\right)^x dx = \frac{(1/2)^x}{\ln(1/2)} + C = -\frac{2^{-x}}{\ln 2} + C.
Example 4: combine bases. \displaystyle\int 2^x 3^x\,dx = \int 6^x\,dx = \frac{6^x}{\ln 6} + C.
Example 5: a substitution. \displaystyle\int x\,2^{x^2}\,dx. With u = x^2, du = 2x\,dx:
Common mistakes
- Using the power rule. \int 2^x\,dx \ne \frac{2^{x+1}}{x+1}. Compare \int x^2\,dx = \frac{x^3}{3}, where the variable is the base; see the integral of x².
- Multiplying by \ln 2 instead of dividing. Multiplying is what differentiation does. Integration divides.
- Using \log_{10}. The formula needs the natural log. \int 10^x\,dx = \frac{10^x}{\ln 10}, not \frac{10^x}{\log 10} = \frac{10^x}{1}.
- Applying it to x^x. When the variable is in both the base and the exponent, neither rule applies, and \int x^x\,dx has no elementary answer.
See the exponential functions page for more on bases, and the integral of eˣ for the special case a = e.
Practice it now
Sine, cosine, eˣ and 1/x
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson