1. ## Indefinite integral error

So I did this indifinite integral one way and got the wrong answer. Then I did it another way (right side), and got the correct answer. Still, I can't figure out why the first approach didn't work. Would appreciate any explanation!

2. ## Re: Indefinite integral error

Both methods are correct. Your mistake is in the third line, you just made a mistake in your integration.

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

With this correction, your other 2x vanishes and you are left with a similar expression.

3. ## Re: Indefinite integral error

If you write:
2x+2ln(1+e^(-x))+C
as
2(x+ln(1+e^(-x))+C
=2(ln(e^x)+ln(1+e^(-x)))+C
=2(ln((e^x).(1+e^(-x)))+C
=2 ln(e^x+1)+C

4. ## Re: Indefinite integral error

$\displaystyle \frac{2}{e^{-x} + 1} = \frac{2e^x}{1+e^x}$

That help?

5. ## Re: Indefinite integral error

@ Gralla55:
There's nothing wrong with your solutions.
Also it's not necessary to use 'absolute value signs' because e^(-x)+1>0 for each x.

@DivisionByZero:
That's not a mistake because:
2ln(e^x+1)-2x=2ln(e^x+1)-2ln(e^x)=2ln((e^x+1)/(e^x))=2ln(e^(-x)+1)
So just the same as Gralla55 said.