Calculus · real student question

Find the indefinite integral of e^x/x with respect to x.

Question

Find

exxdx\int\frac{e^x}{x}\,dx

Step-by-step solution

  1. Try the usual techniques and watch them fail. Substitution needs the derivative of the inner function to appear as a factor, and neither u=xu=x nor u=exu=e^x produces the 1x\tfrac1x. Integration by parts only shuffles the difficulty: taking u=exu=e^x, dv=dxxdv=\tfrac{dx}{x} gives exlnxexlnxdxe^x\ln x-\int e^x\ln x\,dx, which is worse. This is a signal, not bad luck.

  2. State the actual result. By Liouville's theorem on elementary integration, exx\dfrac{e^x}{x} has no elementary antiderivative — no finite combination of polynomials, exponentials, logarithms, trigonometric functions and radicals differentiates to it. The antiderivative is instead named:

    exxdx=Ei(x)+C\int\frac{e^x}{x}\,dx=\operatorname{Ei}(x)+C

  3. Define the exponential integral. One standard definition is

    Ei(x)=xettdt\operatorname{Ei}(x)=\int_{-\infty}^{x}\frac{e^t}{t}\,dt

    taken as a Cauchy principal value because the integrand blows up at t=0t=0. By the Fundamental Theorem of Calculus, differentiating this definition returns the integrand:

    ddxEi(x)=exx\frac{d}{dx}\operatorname{Ei}(x)=\frac{e^x}{x}

    which is exactly the property required of an antiderivative.

  4. Note that a series is available if a formula is wanted. Expanding ex=n0xnn!e^x=\sum_{n\ge0}\tfrac{x^n}{n!} and dividing by xx:

    exx=1x+n1xn1n!\frac{e^x}{x}=\frac1x+\sum_{n\ge1}\frac{x^{n-1}}{n!}

    Integrating term by term gives

    exxdx=lnx+n1xnnn!+C\int\frac{e^x}{x}\,dx=\ln|x|+\sum_{n\ge1}\frac{x^{n}}{n\cdot n!}+C

    which equals Ei(x)γ\operatorname{Ei}(x)-\gamma for x>0x>0, with γ0.5772\gamma\approx0.5772 the Euler-Mascheroni constant. This is the practical way to compute values.

  5. Contrast with the integrals that do work. exdx=ex+C\int e^x\,dx=e^x+C and 1xdx=lnx+C\int\tfrac1x\,dx=\ln|x|+C are both elementary; it is only their quotient that escapes. Similarly ex2dx\int e^{-x^2}dx and sinxxdx\int\tfrac{\sin x}{x}dx are non-elementary, while xexdx\int xe^{x}dx is fine — there is no simple rule of thumb, which is why the theorem matters.

  6. Sanity-check the series numerically. At x=1x=1 the truncated series ln1+n=1201nn!=1.31790\ln1+\sum_{n=1}^{20}\tfrac{1}{n\cdot n!}=1.31790, and Ei(1)γ=1.895120.57722=1.31790\operatorname{Ei}(1)-\gamma=1.89512-0.57722=1.31790 ✓ — the two agree, confirming the term-by-term integration.

Answer

exxdx=Ei(x)+C=lnx+n=1xnnn!+C+γ\int\frac{e^x}{x}\,dx=\operatorname{Ei}(x)+C=\ln|x|+\sum_{n=1}^{\infty}\frac{x^{n}}{n\cdot n!}+C+\gamma

Need to solve a different problem like this? Open the solver →