# How to Integrate e^(e^x)

The single-variable function f(x) = e^(e^x) is one of the simplest examples of a non-integrable function. In fact, any double-exponential function of the form f(x) = A^(B^x) is also non-integrable. A non-integrable function is one whose antiderivative does not have a closed-form expression, in other words, you cannot write the integral of e^(e^x) in terms of elementary functions such as logarithms, exponentials, polynomials, trig functions, inverse trig functions, etc.

However, in calculus there are ways to approximate antiderivatives using infinite series. As it turns out, there are two ways you can write the antiderivative of e^(e^x) using either a power series or exponential series. These series allow you to estimate the values of definite integrals to solve problems in applied calculus.

## Graph of y = e^(e^x)

## One Series Expansion of e^(e^x) and Its Antiderivative

Since one way to define e^z is by the infinite series

e^z = 1 + z + (z^2)/2 + (z^3)/6 + (z^4)/24 + ...

= ∑ (z^n)/n!, [n = 0 to n = ∞]

then we can represent e^(e^x) with a similar series by replacing "z" with "e^x" all over. This gives us

e^(e^x) = 1 + e^x + e^(2x)/2 + e^(3x)/6 + e^(4x)/24 + ...

= ∑ e^(nz)/n!, {n = 0 to n = ∞}

Integrating this infinite exponential series term by term gives us

∫ e^(e^x) dx = x + e^x + e(2x)/4 + e^(3x)/18 + e^(4x)/96 + ...

= x + ∑ e^(nx)/[n*n!], {n = 1 to n = ∞}

Though this series converges for all values of x, the only problem is that it converges very slowly for positive values of x. It does converge quickly for negative values of x, however. This makes it impractical for estimating certain definite integrals of e^(e^x) when the limits are positive,but very efficient for estimating integrals when the limits are negative. Luckily, it is possible to construct another series for e^(e^x) and the integral of e^(e^x), with faster convergence for positive values of x.

## Another Series Expansion of e^(e^x) and Its Antiderivative

A Taylor series polynomial centered at x = 0 for a function f(x) is defined by the equation

f(x) = ∑ f^{(n)}(0)x^n / n!, {n = 0 to n = ∞}

where f^{(n)}(0) is the nth derivative of f(x) evaluated at x = 0. If we take f(x) = e^(e^x) and f(0) = e, the first several derivatives and derivatives at x = 0 are

f'(x) = e^(e^x + x), f'(0) = **e**

f''(x) = e^(e^x + 2x) + e^(e^x + x), f''(0) = **2e**

f'''(x) = e^(e^x + 3x) + 3e^(e^x + 2x) + e^(e^x + x), f'''(0) = **5e**

As n increases, the nth derivative becomes more and more complicated. The next several derivatives evaluated at x = 0 are

f^{(4)}(0) = **15e**, f^{(5)}(0) = **52e**, f^{(6)}(0) = **203e**, f^{(7)}(0) = **877e**

f^{(8)}(0) = **4140e**, f^{(9)}(0) = **21147e**, f^{(10)}(0) = **115975e**

In general, f^{(n)}(0) = B_{n}*e, where {B_{n}} is an integer series called the Bell numbers. The nth Bell number is the number of ways to partition a set of n distinct items into non-empty subsets. For example, the set of three elements {a, b, c} can be partitioned as {(a, b, c)}, {(a, b), (c)}, {(a, c), (b)}, {(b, c),(a)}, and {(a),(b),(c)}, for a total of 5 different non-empty partitions, thus the third Bell number B_{3} is equal to 5. Here we define B_{0} as 1.

The derivatives above give us the Taylor polynomial series for e^(e^x):

e^(e^x) =

e + ex + (2ex^2)/2 + (5ex^3)/6 + (15ex^4)/24 + (52ex^5)/120 + (203x^6)/720 + ...

= ∑ (e* Bn * x^n) / n!, {n = 0 to n = ∞}

The series for the antiderivative is

∫ e^(e^x) dx =

e*[x + (x^2)/2 + (2x^3)/6 + (5x^4)/24 + (15x^5)/120 + (52x^6)/720 + (203x^7)/5040 + ...]

= ∑ (e * Bn * x^(n+1)) / (n+1)!, {n = 0 to n = ∞}

This series converges more quickly than the previous series for positive values of x, though it is still very slow for values of x greater than 1. For negative values of x less than -1, it converges slower than the first series. For values of x between -1 and 1 it converges very quickly. Which series you use depends on the definite integral you need to evaluate.

## Related Integration Tutorials for Non-Integrable Functions

## Integration Example 1

Let's find the area under the curve y = e^(e^x) from between x = -2 and x = -1. See graph below with area shaded in pink. Since the limits are negative, the first series will work better to estimate the value of the definite integral.

Using the first series, the approximate antiderivative of e^(e^x) is

∫ e^(e^x) dx =

x + e^x + e(2x)/4 + e^(3x)/18 + e^(4x)/96 + e(5x)/600

Evaluating this expression at the interval endpoints x = -1 and x = -2 and subtracting gives us

[-1 + e^-1 + e^(-2)/4 + e^(-3)/18) + e^(-4)/96 + e^(-5)/600] -

[-2 + e^-2 + e^(-4)/4 + e^(-6)/18) + e^(-8)/96 + e^(-10)/600]

≈ 1.2646258

Using a numerical integrator, the area under the curve y = e^(e^x) on the interval [-2, 1] is approximately 1.2646264, which is very close to our series approximation.

## Integration Example 2

Let's find the area under the curve y = e^(e^x) from between x = -0.5 and x = 0.75. See graph below with area shaded in pink. Since the limits of integration are between -1 and 1, the second series will provide a much better approximation of the definite integral.

Using the second infinite series, the approximate antiderivative of e^(e^x) is

∫ e^(e^x) dx =

e[x + (x^2)/2 + (2x^3)/6 + (5x^4)/24 + (15x^5)/120 + (52x^6)/720]

Evaluating it at x = 0.75 and x = -0.5 and subtracting gives us

e[0.75 + (0.75^2)/2 + (2*0.75^3)/6 + (5*0.75^4)/24

+ (15*0.75^5)/120 + (52*0.75^6)/720] -

e[-0.5 + (0.5^2)/2 - (2*0.5^3)/6 + (5*0.5^4)/24

- (15*0.5^5)/120 + (52*0.5^6)/720]

≈ 4.5850175

A numerical integrator gives the value of the definite integral as approximately 4.60997. The series estimation is good, but not as good as the previous example.

## Comments

can you solve by finding integral of inverse function y = ln(ln(x))?

Hi,

What could be the best way to integrate x.e^x type integrals, kind of those encountered when solving complex Fourier series ...... Using by parts here gets really complicated ...... is their any shorter way in your knowledge?

Now suppose you want to integrate

( x ) . e^( i * pi * n * x )

Their could be any function in place of x

n = constant

These type of integrals I am struggling with nowadays...

5