# How to Integrate e^(1/x)

The function y = e^(1/x) is a solution to the differential equation (x^2)y' = -y. It has a horizontal asymptote at y = 1, meaning as x goes to infinity or negative infinity, the function e^(1/x) tends toward the value of 1. However, at x = 0, the behavior of e^(1/x) is a little strange. On the positive side of the x-axis, e^(1/x) goes to infinity as x goes to 0. But on the negative side, e^(1/x) goes to 0 as x goes to 0. See graph below.

A function of the form h(x) = e^(x^n) can be integrated only if the exponent n is equal to 1, 1/2, 1/3, 1/4, 1/5, etc. That means f(x) = e^(x^-1) = e^(1/x) is non-integrable; in other words, you can't calculate the integral of e^(1/x) in terms of elementary functions. It is possible, however, to approximate the antiderivative of e^(1/x) with an infinite series, and use that series to estimate definite integrals. You can also use Riemann sums to estimate definite integrals.

## An Infinite Series for the Integral of e^(1/x)

The Taylor series expansion of e^{w} is

e^{w} = 1 + w + w^{2}/2 + w^{3}/6 + w^{4}/24 + w^{5}/120 + ... + w^{n}/n! + ...

If we replace w with 1/x, we get a series for e^{1/x}:

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

Now if we integrate this series term by term we can obtain an infinite series for the integral of e^(1/x):

∫ e^{1/x} dx = x + Ln|x| - 1/(2x) - 1/(12x^{2}) - 1/(72x^{3}) - 1/(480x^{4}) - ...

This series is convergent for all values of x except for 0, so you can truncate it somewhere and use it to estimate the definite integral of e^{1/x} from x = -2 to x = -0.5, or from x = 3 to x = 7, for example. But you can't use it to evaluate the integral from -2 to 3, since that interval includes the discontinuity at 0, and so does not converge. The more terms you include in the truncation, the more accurate the estimate.

## An Asymptotic Series for the Integral of e^(1/x)

We can use the technique of integration by parts to find an asymptotic series (non-convergent series) for the integral of e^{1/x} that provides a good estimate for values of x that are near zero. First we rewrite the integral in an equivalent form.

∫ e^{1/x} dx = ∫ [-e^{1/x} / x^{2}] * [-x^{2}] dx

If we let v' = -e^{1/x}/x^{2} and u = -x^{2}, then we get u' = -2x and v = e^{1/x}. This gives us the new integral equation

∫ e^{1/x} dx = -x^{2}e^{1/x} + 2∫ xe^{1/x} dx

Now we replace the integrand x*e^(1/x) with the equivalent [-e^{1/x}/x^{2}]*[-x^{3}] and apply integration by parts again using the same assignment with v' = -e^{1/x}/x^{2}. This gives us

∫ e^{1/x} dx = -x^{2}e^{1/x} - 2x^{3}e^{1/x} - 6∫ x^{2}e^{1/x} dx

Repeating this process over and over gives us the infinite series

∫ e^{1/x} dx = -[e^{1/x}]*[x^{2} + 2x^{3} + 6x^{4} + 24x^{5} + ... + n!x^{n+1} + ...]

## More Integration Tutorials

**How to Integrate sin(x)/x and cos(x)/x****How to Integrate sin(x^2) and cos(x^2)****How to Integrate e^(x^(1/2)) = e^sqrt(x)**

For general help with integration techniques and finding antiderivatives, see also the Table of Integrals and Four Common Mistakes Students Make with u-Substitution.

This series doesn't converge for any value of x, however, if you truncate it after a finite number of terms and plug in a values of x that are near zero and on the same side of the x-axis, then it provides a good estimate of the definite integral. For example, you can use it to evaluate the integral of e^{1/x} from x = 0.1 to x = 0.2 using four terms.

How many terms you should use depends on the limits of the integral. If the limits are x = p to x = q, with p and q positive and q greater than p, then you should use (1/q - 1) terms, where (1/q - 1) is rounded up to a whole number. For example, if q = 0.15, you would use 6 terms, since (1/0.15 - 1) = 5.67.

If p and q are negative with q less than p, use (1/|q| - 1) terms, with (1/|q| - 1) rounded up to a whole number.

One way in which asymptotic series are different from convergent series is that if you include more terms in the truncation, you actually get a worse estimate.

## Example 1

We can use the first series to estimate the definite integral of e^{1/x} from x = -3 to x = -1. This region is shaded in green in the figure below.

Using the truncated series

∫ e^{1/x} dx ≈ x + Ln|x| - 1/(2x) - 1/(12x^{2}) - 1/(72x^{3}) - 1/(480x^{4})

we plug in x = -1 and x = -3 and subtract. This gives us

[-823/1440] - [Ln(3) - 110501/38880] ≈ 1.171964

With a numerical integrator, we find the area under the curve from x = -3 to x = -1 is closer to 1.172211, so the truncated series with six terms underestimates the area by about 0.000247. With more terms we would get an even more accurate approximation.

## Example 2

Let's use the asymptotic series to estimate the area under the curve y = e^{1/x} from x = 0.12 to x = 0.18. This area is shaded in green in the graph below.

Since the upper endpoint is 0.18, we compute 1/0.18 - 1 = 4.56 and round this up to 5. This means we take 5 terms of the asymptotic series. Our integral approximation formula is then

∫ e^{1/x} dx ≈ [-e^{1/x}]*[x^{2} + 2x^{3} + 6x^{4} + 24x^{5} + 120x^{6}]

Plugging in the endpoints 0.18 and 0.12 and subtracting gives us

-15.256133 - (-83.436862) = 68.180729

Using a numerical integrator gives us an answer closer to 70.9762, so our estimate is off by about 4% from the true answer. We could get a more accurate estimate using the convergent series in the first example, but we would need many more terms.

## Is the Improper Integral of e^(1/x) - 1 Convergent?

The area under curve f(x) = e^(1/x) - 1 gets smaller and smaller as x approaches infinity. Since the similar integral of e^(-x) from x = a to x = ∞ converges, it is natural to wonder if the integral of e^(1/x) - 1 from x = a to x = ∞ also converges. It turns out that the answer is no.

Since e^(1/x) - 1 is always greater than 1/x for values of x larger than 1, and the infinite integral of 1/x is divergent, then e^(1/x) - 1 is also divergent.

## Comments

Thanks

Can the integral of 1/((x^3) (e^(1/x)-1)) be found? Using Mcclurins, e^x = 1 +x, so e^(1/x)= 1 +1/x... Substituting, at large x, this should go to 1/x^2=0, and for small x...e^(1/x) should grow faster than 1/x^3....so the integral should go to 0 at x=0. Am i right? Thanks, ed wilke

If the intergral of f(x) is divergent, then is the integral of 1/f(x) convergent? always?