# Solving integral with substitution

1. Aug 10, 2011

### Shannabel

1. The problem statement, all variables and given/known data
find the integral from 0 to ln2 of (e^x-1)/(e^x+1)

2. Relevant equations

3. The attempt at a solution
I really didn't know what to do, but the book had a hint suggesting i multiply the numerator and denominator by e^-x and then use an appropriate substitution..
[((e^x)-1)*(e^-x)]/[((e^x)+1)*(e^-x)]
= (1-(e^-x))/(1+(e^-x))
= (1-(e^x))/(1+(e^x))
but now i can't think of an appropriate substitution. help?

2. Aug 10, 2011

### c.dube

How did you get from:
$\frac{1-e^{-x}}{1+e^{-x}}$
To:
$\frac{1-e^{x}}{1+e^{x}}$

3. Aug 10, 2011

### Shannabel

apparently i just made up my own rules of calculus.. you're right, i can't do that.
so i'm just at
[1-e^(-x)]/[1+e^(-x)]

4. Aug 10, 2011

### c.dube

Hahah I don't know how your book wants you to do it but try splitting it into two integrals.

5. Aug 10, 2011

### Shannabel

how can i split that?

6. Aug 10, 2011

### c.dube

Into two fractions - you have addition on top - and then attack them both separately.

7. Aug 10, 2011

### HallsofIvy

Staff Emeritus
The first thing I would do is divide:
$$\frac{e^x- 1}{e^x+ 1}= 1- \frac{2}{e^x+ 1}$$

Then, for the second integral, let $u= e^x+ 1$

8. Aug 10, 2011

### Shannabel

lol... what did you divide by to get that?
and also, if i use u=e^x, then i get du=e^xdx, and i don't have anything to cancel the extra e^x with..?

9. Aug 10, 2011

### obafgkmrns

I'm not sure what multiplying top & bottom by e^-x does for you, but if you multiply top & bottom by e^(-x/2), you'll probably recognize it as the hyperbolic tangent of x/2.

10. Aug 10, 2011

### Bohrok

You can use long division to divide them, similar to normal division of numbers. Or you can write it as $$\frac{e^x - 1}{e^x + 1} = \frac{e^x + 1 - 2}{e^x + 1} = \frac{e^x + 1}{e^x + 1} - \frac{2}{e^x + 1} = 1 - \frac{2}{e^x + 1}$$
If you want to follow Hall's suggestion, you should multiply the fraction by e-x/e-x and then use a different substitution.

I would follow c.dube's suggestion by splitting the fraction in two $$\frac{e^x - 1}{e^x + 1} = \frac{e^x}{e^x + 1} - \frac{1}{e^x + 1}$$The first one has an easy substitution, but you'll want to multiply the second by e-x/e-x before using a substitution.

11. Aug 10, 2011

### Shannabel

ookay so i ended up with
ln(e^(x)+1)+ln(e^(-x)+1)... is that right?

12. Aug 10, 2011

### Shannabel

ookay so i ended up with
ln(e^(x)+1)+ln(e^(-x)+1) between 0 and ln2
= ln((e^x+1)/(e^-x)+1)) between 0 and ln2
= ln ((e^ln2+1)/(e^-ln2+1))-ln((e^0+1)/e^0+1))
= ln(3/-1)-ln(1)
= ln(-3)

.. which is very wrong, obviously.
where did i go wrong?

13. Aug 10, 2011

### Bohrok

The two logs are being added, so you need to multiply their arguments and not divide them.

14. Aug 10, 2011

### Shannabel

ahhh! of course!
so now i get

ln((e^x+1)*(e^-x+1))
= [ln((e^ln2+1)*(e^-ln2+1))]-[ln(e^0+1)*(e^0+1)]
= ln(-3)-ln(4)
= ln(-3/4)

closer? but still not right...?

15. Aug 10, 2011

### Bohrok

e^-ln2 ≠ -2
Make sure you use the rules of logs and exponents correctly when you simplify.

16. Aug 10, 2011

### c.dube

Look at the part $e^{-\ln2}$ and how you could re-express that. Then run with it.
EDIT: Haha as Bohrok said.

17. Aug 10, 2011

### Shannabel

e^-ln2= (1/2)??

18. Aug 10, 2011

### Bohrok

Yes!

19. Aug 10, 2011

### Shannabel

got it! :):)

Last edited: Aug 10, 2011
20. Aug 12, 2011

### obafgkmrns

You guys are making this much too difficult! Note that the integrand is tanh(x/2) which is in turn sinh(x/2)/cosh(x/2). Substitute u = sinh(x/2) and recall that the derivative of sinh is cosh. The integrand then becomes 1/u, which integrates to ln(u). Resolve the substitution and voila.