# Looking for someone to help me along with integrating $\frac{e^x}{(e^x -1)(e^x + 2)}$

I'm working with

$$\int \frac{e^x}{(e^x - 1)(e^x + 2)}dx$$

So, I know I'll be doing a u-sub and a partial fraction decomposition.

I'll let
$$u = e^x$$

Making my equation $$\int \frac{u}{(u - 1)(u + 2)}$$

Then I do my partial fraction decomposition.

$$u = A(u + 2) + B(u - 1)$$

Let u = -2, $$B(-2 - 1) = -2$$ therefore $$B = \frac{2}{3}$$

Let u = 1, $$A(1 + 2) = 1$$ therefore $$A = \frac{1}{3}$$

This leaves me with

$$\int \frac{u}{3(u - 1)} + \frac{2u}{3(u + 2)}$$

Where do I go from here? Do I plug $e^x$ back in for u and cancel out like terms? If I do that, won't I have to worry about the bottom of the fraction possibly being 0?

Edit: Reworking without dropping the du.

Let $u = e^x$ and $du = e^x dx$

Giving me $$\int \frac{du}{(u-1)(u+2)}$$

So, if I split these, I have

$$\int \frac{du}{3(u-1)} + \int \frac{2du}{3(u+2)}$$

This gives me

$$\int \frac{1}{3(u-1)} + \int \frac{2}{3(u+2)}$$

So for the first part, I'll let $w = u - 1$ and bring the $\frac{1}{3}$ out front

$$\frac{1}{3} \int \frac{dw}{w}$$

This gives me

$$\frac{1}{3} ln | w |$$

which ultimately gives me

$$\frac{1}{3} ln | e^x - 1 |$$

Do the same for the other side, let $w = u + 2$ and bring the fraction out front

$$\frac{2}{3} \int \frac{dw}{w}$$

which gives me

$$\frac{2}{3} ln | e^x + 2 |$$

put them together and my final answer is

$$\frac{1}{3} ln | e^x - 1 | - \frac{1}{3} ln | e^x + 2 | + c$$

Does that seem correct? - Revised & correct now :)

• Check your substitution again. – Potato Sep 25 '13 at 3:10
• Just to be picky, what happened to $du$? – DJohnM Sep 25 '13 at 3:11
• And what happened to the "2" in the value of B?? – DJohnM Sep 25 '13 at 3:16

When you take $u=e^x$, then $du=e^x\ dx$.

• I ended up falling asleep last night before I was able to finish it. I put my edited work up on the main post if you'd like to check it out, I would appreciate it :) – ConfusingCalc Sep 25 '13 at 17:41
• Indeed, since it is an indefinite integral :) thanks Danny! Hmm wolfram doesn't have a $\frac{2}{3}$ but rather a $\frac{1}{3}$ I can't quite seem to see how my B is suppose to be $\frac{1}{3}$ though – ConfusingCalc Sep 25 '13 at 17:58
• I'm not quite sure I understand how it should be -1 instead of -2 though. I thought I had to plug in -2 into u to zero A out? – ConfusingCalc Sep 25 '13 at 18:15
• So wolfram is wrong? Hehe I trust you & wolfram more than myself, it says the answer is: $$\frac{1}{3}(log(1-e^x) - log(e^x +2)) + c$$ – ConfusingCalc Sep 25 '13 at 18:42
• Note that you let $u=e^x$ so $du=e^x dx$, therefore there shouldn't be an $u$ on the top! You should get $\frac1{(u-1)(u+2)}$ instead of $\frac u{(u-1)(u+2)}$ – user67258 Sep 25 '13 at 18:45

HINT 1: When you set $u=e^x$ then $du=e^xdx$. Meaning that what you have to integrate is:

$$\int \frac{du}{(u-1)(u+2)}$$

HINT 2: Use partial fractions to show that:

$$\frac{1}{(u-1)(u+2)} = \frac{1}{3(u-1)} - \frac{1}{3(u+2)}$$

so you can independetly integrate each term and then subtract.

• So instead of setting my partial fractions equal to 1, they should be equal to du? – ConfusingCalc Sep 25 '13 at 3:37
• Instead of setting your partial fractions equal to $u$ it should be equal to $1$. The $du$ is in some sense like a $1$. It means only your integrating with respect to $u$. Every integral must have a $d$ something. Here, every integral after separating in partial fractions will have its own $du$. – Mauricio G Tec Sep 25 '13 at 4:44
• So, if I evaluate the first integral, $\int \frac{1}{3(u-1)}$ I'll let $w = u-1$ so I have $\frac{1}{3} \int \frac{dw}{w}$ giving me $\frac{1}{3} ln | w |$ which is $\frac{1}{3} ln | u-1 |$ ultimately giving me $\frac{1}{3} ln |e^x -1 |$ for the first one. Assuming this is correct, I do the second one the same way. I'll post my revised answer in the main post, if you could check it, that'd be great. – ConfusingCalc Sep 25 '13 at 17:33

I think we have to go back to the basics.

Remember int(x+2)DX the DX multiplies through the individual terms!

So when u decomposed a product into sums. The DX passes through each term! A subtle observation which is assumed by calc teachers!