# Integral kicking my butt

1. Oct 3, 2011

### QuarkCharmer

1. The problem statement, all variables and given/known data
$$\int \frac{e^{2x}}{e^{2x}+3e^{x}+2}dx$$

I don't understand what I am doing wrong here. I missed this one question on a quiz but it looks right to me, I have went over it a dozen times.

2. Relevant equations

3. The attempt at a solution

$$\int \frac{e^{2x}}{e^{2x}+3e^{x}+2}dx$$

Fraction part:
$$\frac{e^{2x}}{(e^{x}+1)(e^{x}+2)} = \frac{Ae^{x}}{e^{x}+1} + \frac{Be^{x}}{e^{x}+2}$$

$$e^{2x} = e^{2x}(A+B)+e^{x}(2A+B)$$

$A + B = 1$
$2A + B = 0$
$A=-1$ and $B=2$

Integral stuff:
$$\int -\frac{e^{x}}{e^{x}+1} + \frac{2e^{x}}{e^{x}+2}dx$$

My solution:
$$-ln(|e^{x}+1|) + 2ln(|e^{x}+2|) + C$$

??

If one of the factors were (e^(2x)+1), does that count as a non-reducible polynomial and get A(e^x)+B as it's numerator instead of just plain A?

Last edited: Oct 3, 2011
2. Oct 3, 2011

### SammyS

Staff Emeritus
It's as if the numerator of the integrand is of the same degree as the denominator. Use long division, or the following trick to reduce the "improper fraction", to a "mixed fraction".

$\displaystyle \frac{e^{2x}}{e^{2x}+3e^{x}+2}=\frac{e^{2x}+3e^{x}+2}{e^{2x}+3e^{x}+2}-\frac{3e^{x}+2}{e^{2x}+3e^{x}+2}$
$\displaystyle =1-\frac{3e^{x}+2}{e^{2x}+3e^{x}+2}$​
Now use partial fractions.

3. Oct 3, 2011

### Dick

I think you already have a correct solution there. It's a little unconventional, I think most people would substitute u=e^x first and then work with the polynomials in u. But I think you pulled it off.

4. Oct 3, 2011

### QuarkCharmer

Oh yeah, a sub would have made that a bit less annoying. Is it still correct though that I did the partial fraction decomposition when the degree of the num/den were equal?

For reference, the "correct" solution was:
$ln(\frac{(e^{x}+2)^{2}}{(e^{x}+1)})+C$

But I am not seeing how you can use the properties of log to equate that to my solution?

5. Oct 3, 2011

### SammyS

Staff Emeritus
QC,

I didn't look at your complete solution. I looked at your title & just suggested the usual first step to take before doing partial fractions.

Your solution is very interesting. I like it !!!

6. Oct 3, 2011

### Dick

You did a correct decomposition of the integral into two things you can integrate. I wouldn't exactly call it 'partial fractions' but it works. The only rules of log you need to show they are equal are things like log(a^b)=b*log(a) and log(a/b)=log(a)-log(b). You know those, right?

7. Oct 3, 2011

### QuarkCharmer

Yeah I know those, but I don't have a condition like that (at least it's not apparent to me).
I have:
$ln(a) - 2ln(b) = ...$

I couldn't figure out how to get rid of that 2.

Edit: Oh wait, you used that property to stick it back up into the exponent... That's where they got that squared term from. I never would have considered that lol. I just use that one to pull things down.

8. Oct 3, 2011

### Dick

Right, use it to put the exponent back up.

9. Oct 3, 2011

-ln(a) + 2ln(b) = ln(a$^{-1}$) + ln(b$^{2}$)
= ln((a$^{-1}$)(b$^{2}$)) = ln ($^{b^{2}}_{a}$)