Stuck on this? Solve it with AI
Calculus · real student question

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

Question

Find

∫exx dx\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 exln⁡x−∫exln⁡x dxe^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:

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

  3. Define the exponential integral. One standard definition is

    Ei⁡(x)=∫−∞xett dt\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=∑n≥0xnn!e^x=\sum_{n\ge0}\tfrac{x^n}{n!} and dividing by xx:

    exx=1x+∑n≥1xn−1n!\frac{e^x}{x}=\frac1x+\sum_{n\ge1}\frac{x^{n-1}}{n!}

    Integrating term by term gives

    ∫exx dx=ln⁡∣x∣+∑n≥1xnn⋅n!+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. ∫ex dx=ex+C\int e^x\,dx=e^x+C and ∫1x dx=ln⁡∣x∣+C\int\tfrac1x\,dx=\ln|x|+C are both elementary; it is only their quotient that escapes. Similarly ∫e−x2dx\int e^{-x^2}dx and ∫sin⁡xxdx\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 ln⁡1+∑n=1201n⋅n!=1.31790\ln1+\sum_{n=1}^{20}\tfrac{1}{n\cdot n!}=1.31790, and Ei⁡(1)−γ=1.89512−0.57722=1.31790\operatorname{Ei}(1)-\gamma=1.89512-0.57722=1.31790 ✓ — the two agree, confirming the term-by-term integration.

Answer

∫exx dx=Ei⁡(x)+C=ln⁡∣x∣+∑n=1∞xnn⋅n!+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 →