Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

$$ \int e^x \, \left(1 + \frac{e^{-x}}{x} \right) \,dx $$ I got three different integrals from this one, which are integral of $e^x$, integral of $1/x$ and the third one is integral of $e^{-x}/x$ but I'm not sure how to solve the third one? Thanks in advnace.

share|cite|improve this question
How you got the third integral? – Voliar Apr 9 '14 at 18:44
@Voliar well, I made 1 to 1/x and the other part stays as it is, so I just splitted it to two integrals? Is it wrong? – user133022 Apr 9 '14 at 18:46
@user133022: You can't split over multiplication, just over sum (algebraic sum, which include subtraction as well). See my answer for more details. – rubik Apr 9 '14 at 18:56
up vote 7 down vote accepted

Hint: After distributing multiplication, use the fact that: $$\displaystyle\int \left [ kf(x) + hg(x) \right ] dx = k\int f(x) dx + h\int g(x) dx$$

Complete spoiler (mouseover to reveal):

$$\displaystyle\int e^x \left ( 1 + \dfrac{e^{-x}}{x} \right ) dx = \int \left ( e^x + \dfrac{e^x \cdot e^{-x}}{x} \right ) dx = \int e^x dx + \int \dfrac{1}{x} dx = e^x + \ln |x| + C$$

share|cite|improve this answer

It should come out as $ \int (e^x + \frac{1}{x} ) \,dx $ since the powers cancel out.

share|cite|improve this answer
Everybody is writing so beautifully, and my writing is so ugly. I should learn LaTeX or something... I am just viewing the source on different posts and copying it. – The very fluffy Panda Apr 9 '14 at 18:55
As far as I know, it always comes down to adding \displaystyle. It changes everything. Also use \left ( and \right ) for adapting parentheses (they automatically become big). – rubik Apr 9 '14 at 19:00
Thanks, the mouseover thing you did was awesome! – The very fluffy Panda Apr 9 '14 at 19:02
Oh thank you! Of course I learned it from some other guy here on Math.SE! – rubik Apr 9 '14 at 19:05
Use two dollar signs instead of one if you want it to be centered and large. – Mehrdad Apr 10 '14 at 7:41

$$\int e^x \bigg(1+ \frac{e^{-x}}{x} \bigg) dx = \int e^x + \frac{1}{x} dx = \int e^xdx + \int \frac{1}{x} dx $$

Can you take it from here?

share|cite|improve this answer

Simplify first; integrate afterwards: $$ e^x\left( 1+ \frac{e^{-x}}{x} \right) = e^x + \frac 1 x. $$

share|cite|improve this answer

We have$$\int e^x\left(1+\frac{e^{-x}}{x}\right)dx=\int \left(e^x+\frac{e^{x}e^{-x}}{x}\right)dx=\int e^xdx +\int\frac{1}{x}dx$$

I suppose you can do the rest..

share|cite|improve this answer
Why has this answer been downvoted? – rubik Apr 9 '14 at 19:22
@rubik Good question. I'm curious too - perhaps I shouldn't have given the answer straight. By the way, great answer, especially the mouseover. +1 – Alijah Ahmed Apr 9 '14 at 19:25
I downvoted for using $\ln|x|$ without mentioning that $0$ splits it into 2 primitive functions. But it's now removed, so I retract it. – user2345215 Apr 10 '14 at 21:42
@user2345215: Thanks for explaining the reason for your downvote. – Alijah Ahmed Apr 11 '14 at 5:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.