# How to Integrate (e^x)/x

TR Smith is a product designer and former teacher who uses math in her work every day.

The antiderivative of (e^x)/x cannot be expressed in closed form in terms of elementary functions; in other words, (e^x)/x is a non-integrable function. Nonetheless, you can approximate the integral of (e^x)/x with convergent power series. This will allow you to estimate the area under a curve, or find approximate solutions to certain types of differential equations.

The integral of (1/x)e^x is related to the function called the "exponential integral," written as Ei(t), which is defined to be -1 times the integral of (e^-x)/x from x = -t to x = ∞.

The same technique used to approximately integrate (e^x)/x can also be used to find convergent series antiderivatives of related functions like (e^x)/x^2, (e^x)/x^3, (e^2x)/x, and more generally, any function of the form f(x) = (e^ax)/x^n. This calculus tutorial works through the integral step by step and illustrates some applications with examples.

## Step 1

The first step in integrating (e^x)/x is to convert e^x to its convergent series form. This is

e^x = ∑ (x^k) / k!, from k = 0 to k = ∞

= 1 + x + (x^2)/2 + (x^3)/6 + (x^4)/24 + (x^5)/120 + (x^6)/720 + ...

This series is everywhere-convergent, meaning for all values of x in the interval (-∞, ∞) the series converges to a finite number. To construct a convergent series for (e^x)/x, we simply divide each term in the series by x. This gives us

(e^x)/x = ∑ [x^(k-1)] / k!, from k = 0 to k = ∞

= 1/x + 1 + x/2 + (x^2)/6 + (x^3)/24 + (x^4)/120 + (x^5)/720 + ...

This series is convergent everywhere except at x = 0.

## Step 2

The next step is to integrate the series of (e^x)/x term by term. Since each term is a power function, the antiderivative is easy.

∫ (e^x)/x dx =

∫ [1/x + 1 + x/2 + (x^2)/6 + (x^3)/24 + (x^4)/120 + (x^5)/720 + ...] dx =

Ln|x| + x + (x^2)/4 + (x^3)/18 + (x^4)/96 + (x^5)/600 + (x^6)/4320 + ... =

Ln|x| + ∑ (x^k) / (k*k!), for k = 1 to k = ∞

Truncating this series after a finite number of terms produces an approximate antiderivative. The closer x is to 0, the fewer terms are needed. However, for larger values of x, more terms are needed to produce a good estimate since the series converges slowly.

## Alternative Series Expansion

Another way to generate a series representation of the integral of (e^x)/x is to apply integration by parts repeatedly until a series pattern develops. For the first iteration, let's take du = e^x dx and v = 1/x. This gives us u = e^x and dv = -1/x^2

∫ (e^x)/x dx = (e^x)/x + ∫ (e^x)/x^2 dx

Now let's take du = e^x dx and v = 1/x^2, which gives us u = e^x and -2/(x^3) and

∫ (e^x)/x dx = (e^x)/x + (e^x)/x^2 + 2*∫ (e^x)/x^3 dx

Continuing on this way letting du = e^x dx and v = 1/x^n, we get

∫ (e^x)/x dx = (e^x)[1/x + 1/x^2 + 2/x^3 + 6/x^4 + 24/x^5 + 120/x^6 + 720/x^7 + ...]

This series is more useful for evaluating the antiderivative at larger values of x.

## Example 1

Find the area under the curve y = (e^x)/x from x = 1/e to x = e. This is shown in the graph below.

For this problem, we can estimate the area under the curve by truncating the series expansion of the antiderivative of (e^x)/x, then plugging in the endpoint x = e and x = 1/e, and finally subtracting. Let's truncate the series at eight terms, giving us

∫ (e^x)/x dx ≈

Ln|x| + x + (x^2)/4 + (x^3)/18 + (x^4)/96 + (x^5)/600 + (x^6)/4320 + (x^7)/35280

This gives us an approximate area of

7.622 - (-0.595) = 8.217

Using a numerical integrator, the area under the curve accurate to three decimal places is 8.230. Our estimate would be even closer if we truncated at 10 or 12 terms.

## Example 2

Find an approximate solution to the separable differential equation y' = [e^(x-2y)]/x, with the initial condition y(1) = 2π. Separating variables gives us

dy/dx = (e^x)(e^-2y)/x

e^2y dy = (e^x)/x dx

∫ e^2y dy = ∫ (e^x)/x dx

(1/2)e^2y = Ln|x| + ∑(x^k)/(k*k!) + C

e^2y = 2*Ln|x| + 2*∑(x^k)/(k*k!) + C

2y = Ln[ 2*Ln|x| + 2*∑(x^k)/(k*k!) + C ]

y = (1/2)Ln[ 2*Ln|x| + 2*∑(x^k)/(k*k!) + C ]

Now we need to use the initial condition y(1) = 2π to find the constant C. Plugging x = 1 and y = 2π into the equation above gives us

2π = (1/2)Ln[ 2*∑1/(k*k!) + C

2π ≈ (1/2)Ln[ 2.6358043 + C ]

C ≈ e^(4π) - 2.6358043

C ≈ 286748.677

## Integrals of (e^x)/x^n and (e^ax)/x^n

To integrate e^x divided by any positive power of x, you simply divide each term of the power series for e^x by x^n. For example, let's use this method to find the antiderivative of (e^x)/x^2. The series expansion of (e^x)/x^2 is

1/x^2 + 1/x + 1/2 + x/6 + (x^2)/24 + (x^3)/120 + (x^4)/720 + (x^5)/5040 + ...

Integrating this term by term gives us

∫ (e^x)/x^2 dx =

-1/x + Ln|x| + x/2 + (x^2)/12 + (x^3)/72 + (x^4)/480 + (x^5)/3600 + (x^6)/30240 + ...

= Ln|x| - 1/x + ∑(x^k)/[k*(k+1)!], for k = 1 to k = ∞.

You can also apply the same technique to integrate any function of the form (e^ax)/x^n, for example, the function f(x) = (e^2x)/x^3. The antiderivative of this function is

∫ (e^2x)/x^3 dx =

-1/(2x^2) - 2/x + 2*Ln|x| + (4/3)x + (1/3)x^2 + (4/45)x^3 + (1/45)x^4 + ...

0

0

4

3

4

## Popular

0

30

• ### Names of Geometric Shapes—With Pictures

30

0 of 8192 characters used