# Integrating e^x

#### Nas

I am unsure on how to calculate the following 2 integrals

a) [1/(x^2)]*[e^(2/x)], with respect to xand
b) 1/(e^x + 1), with respect to x

Help with this will be greatly appreciated.

#### Prove It

MHF Helper
I am unsure on how to calculate the following 2 integrals

a) [1/(x^2)]*[e^(2/x)], with respect to xand
b) 1/(e^x + 1), with respect to x

Help with this will be greatly appreciated.
Here you have

a) $$\displaystyle \int{\left(\frac{1}{x^2}\right)e^{\frac{2}{x}}\,dx} = \int{e^{2x^{-1}}\,x^{-2}\,dx}$$

$$\displaystyle = -\frac{1}{2}\int{e^{2x^{-1}}(-2x^{-2})\,dx}$$.

Now make the substitution $$\displaystyle u = 2x^{-1}$$ so that $$\displaystyle du = -2x^{-2}\,dx$$ and the integral becomes

$$\displaystyle -\frac{1}{2}\int{e^u\,du}$$

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

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

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

#### Prove It

MHF Helper
I am unsure on how to calculate the following 2 integrals

a) [1/(x^2)]*[e^(2/x)], with respect to xand
b) 1/(e^x + 1), with respect to x

Help with this will be greatly appreciated.
b) $$\displaystyle \int{\frac{1}{e^x + 1}\,dx} = \int{\frac{e^x}{e^x(e^x + 1)}\,dx}$$

$$\displaystyle = \int{\left[\frac{1}{e^x(e^x + 1)}\right]e^x\,dx}$$.

Now make the substitution $$\displaystyle u = e^x + 1$$ so that $$\displaystyle e^x = u - 1$$ and $$\displaystyle du = e^x\,dx$$.

The integral becomes

$$\displaystyle \int{\frac{1}{(u - 1)u}\,du}$$.

Now solve this using partial fractions.

#### Nas

would the answer for part b be x-log(e^x+1)?

#### TheCoffeeMachine

1. Let $$\displaystyle u = \dfrac{2}{x}$$, then $$\displaystyle \dfrac{du}{dx} = \dfrac{-2}{x^2} \Rightarrow {dx} = -\dfrac{x^2{du}}{2}$$. Therefore $$\displaystyle \int\dfrac{1}{x^2}e^{\frac{2}{x}}\;{dx} = -\int\left(\dfrac{e^u}{x^2}\right)\left(\dfrac{x^2}{2}\right)\;{du} = ...$$
2. Let $$\displaystyle u = e^x+1$$, then $$\displaystyle \dfrac{du}{dx} = e^x \Rightarrow {dx} = \dfrac{du}{e^x}.[/Math] Therefore \(\displaystyle \int\dfrac{1}{e^x+1}\;{dx} = \int\dfrac{1}{u(u-1)}\;{du} = ...$$\)$$\displaystyle$$

#### General

Another solution for 2:

$$\displaystyle \int \frac{dx}{e^x+1} = \int \frac{1}{e^x+1} \, \frac{e^{-x}}{e^{-x}} \, dx$$

$$\displaystyle =\int \frac{e^{-x}}{e^{-x}+1} \, dx$$

Let $$\displaystyle u=e^{-x}+1$$, to get :

$$\displaystyle - \int \frac{du}{u} = -ln|u|+C = -ln(e^{-x}+1) + C$$

$$\displaystyle =ln \left( \frac{1}{e^{-x}+1} \right) + C$$

#### Soroban

MHF Hall of Honor
Hello, Nas!

The General beat me to the solution . . . *sigh*

$$\displaystyle (b)\;\;\int\frac{dx}{e^x+1}$$

I have an equivalent answer: .$$\displaystyle -\ln\left(1 + e^{-x}\right) + C$$

And this answer can be simplified beyond all recognition . . .

$$\displaystyle -\ln\left(1 + \frac{1}{e^x}\right) + C\;=\;-\ln\left(\frac{e^x+1}{e^x}\right) + C$$

. . . . . . . . . . . . $$\displaystyle =\;-\ln(e^x+1) + \ln(e^x) + C$$

. . . . . . . . . . . . $$\displaystyle =\;-\ln(e^x+1) + x\underbrace{\ln(e)}_{\text{This is 1}} + C$$

. . . . . . . . . . . . $$\displaystyle =\;x - \ln(e^x+1) + C$$

Tweety

#### Nas

Thanks for all the help.