Welcome to our community

Be a part of something great, join today!

indefinite integral

paulmdrdo

Active member
May 13, 2013
386
how would start solving this

$\displaystyle\int\frac{dy}{1+e^y}$
 

soroban

Well-known member
Feb 2, 2012
409
Hello, paulmdrdo!

[tex]\displaystyle \int\frac{dy}{1+e^y}[/tex]

Divide numerator and denominator by [tex]e^y.[/tex]

We have: .[tex]\displaystyle \int \frac{e^{-y}dy}{e^{-y}+1} [/tex]

Let [tex]u \,=\,e^{-y}+1 \quad\Rightarrow\quad du \,=\,\text{-}e^{-y}dy \quad\Rightarrow\quad e^{-y}dy \,=\,\text{-}du[/tex]

Substitute: .[tex]\displaystyle \int \frac{-du}{u} \:=\:-\int\frac{du}{u} \:=\:-\ln|u|+C [/tex]

Back-substitute: .[tex]-\ln(e^{-y}+1) + C[/tex]
 

paulmdrdo

Active member
May 13, 2013
386
how did you know that you have to divide the numerator and denominator by e^y?

what if we have

$\displaystyle\int\frac{e^2x}{1+e^x}dx$
 
Last edited:

Prove It

Well-known member
MHB Math Helper
Jan 26, 2012
1,404
how would start solving this

$\displaystyle\int\frac{dy}{1+e^y}$
Alternatively, MULTIPLY top and bottom by [tex]\displaystyle \begin{align*} e^y \end{align*}[/tex], giving

[tex]\displaystyle \begin{align*} \int{ \frac{e^y\,dy}{e^y + \left( e^y \right) ^2}} \end{align*}[/tex]

which gives a form that a very simple substitution of [tex]\displaystyle \begin{align*} u = e^y \implies du = e^y\,dy \end{align*}[/tex] should be able to handle.

How did we know to do this? Well, since there's an [tex]\displaystyle \begin{align*}e^y \end{align*}[/tex] function, and we know that it's its own derivative, that means if we were to make any substitution using it, it also needs to appear as a factor, as when we do an integration by substitution, the derivative of the function we are substituting needs to be a factor of the entire function being integrated.

- - - Updated - - -

how did you know that you have to divide the numerator and denominator by e^y?

what if we have

$\displaystyle\int\frac{e^2x}{1+e^x}dx$
Am I correct in assuming that you meant [tex]\displaystyle \begin{align*} \int{ \frac{e^{2x}}{1 + e^x}\,dx} \end{align*}[/tex]?
 

paulmdrdo

Active member
May 13, 2013
386
Alternatively, MULTIPLY top and bottom by [tex]\displaystyle \begin{align*} e^y \end{align*}[/tex], giving

[tex]\displaystyle \begin{align*} \int{ \frac{e^y\,dy}{e^y + \left( e^y \right) ^2}} \end{align*}[/tex]

which gives a form that a very simple substitution of [tex]\displaystyle \begin{align*} u = e^y \implies du = e^y\,dy \end{align*}[/tex] should be able to handle.

How did we know to do this? Well, since there's an [tex]\displaystyle \begin{align*}e^y \end{align*}[/tex] function, and we know that it's its own derivative, that means if we were to make any substitution using it, it also needs to appear as a factor, as when we do an integration by substitution, the derivative of the function we are substituting needs to be a factor of the entire function being integrated.

- - - Updated - - -



Am I correct in assuming that you meant [tex]\displaystyle \begin{align*} \int{ \frac{e^{2x}}{1 + e^x}\,dx} \end{align*}[/tex]?
yes.sorry for typo error!
 

Prove It

Well-known member
MHB Math Helper
Jan 26, 2012
1,404
yes.sorry for typo error!
Here you don't need to do any manipulation to the integral at all, notice that

[tex]\displaystyle \begin{align*} \int{ \frac{e^{2x}}{1 + e^x} \,dx} &= \int{ \frac{ \left( e^x \right) ^2}{1 + e^x} \, dx} \\ &= \int{ \frac{ e^x }{1 + e^x} \cdot e^x\,dx } \end{align*}[/tex]

A substitution [tex]\displaystyle \begin{align*} u = 1 + e^x \end{align*}[/tex] is appropriate because the derivative [tex]\displaystyle \begin{align*} du = e^x\, dx \end{align*}[/tex] is already a factor...
 

paulmdrdo

Active member
May 13, 2013
386

i tried to solve the problem in my 1st op using prove it's method

here is what i do

$\displaystyle\int\frac{dy}{1+e^y}$ i multiplied the integrand by e^y i get $\displaystyle\int\frac{e^y}{e^y+e^{2y}}dy$

now using substitution $ u=e^y;\,du=e^ydy$ i get $\displaystyle\int\frac{du}{u(u+1)}$

doing fraction decomposition i have

$\displaystyle\frac{1}{u(u+1)}=\frac{A}{u}+\frac{B}{u+1}$

multiplying both sides by $u(u+1)$ i get

$\displaystyle 1=A(u+1)+B(u)$

the values of A and B are A= 1 ;B=-1

then i have

$\displaystyle\int\left(\frac{1}{u}-\frac{1}{u+1}\right)du$

integrating the terms of my integrand i get

$\displaystyle ln|u|-ln|u+1|+C$

back substitute $ln|e^y|-ln|e^y+1|+C$

using properties of ln in my answer i get

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

but my answer here iS not the same using soroban's method. can you pin point my mistake here. thanks!

and i noticed that if i rearrange my answer and factor out the negative i would get the right answer like,

$\displaystyle (-ln|e^y+1|+ln|e^y|)=-(ln|e^y+1|-ln|e^y|)=-ln|\frac{e^y+1}{e^y}|=-ln|e^{-y}+1|$

why do you think i got different answers? thanks!
 
Last edited:

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
Using the properties of logs, we may transform the form given by soroban into that which you found:

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

paulmdrdo

Active member
May 13, 2013
386
Using the properties of logs, we may transform the form given by soroban into that which you found:

\(\displaystyle -\ln\left(e^{-y}+1 \right)+C=-\ln\left(\frac{e^y+1}{e^y} \right)+C=-\ln\left(\frac{e^y}{e^y+1} \right)+C\)
mark my answer is positive $\displaystyle ln\left(\frac{e^y}{e^y+1}\right)+C$ not $\displaystyle -ln\left(\frac{e^y}{e^y+1}\right)+C$ why is that?
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
mark my answer is positive $\displaystyle ln\left(\frac{e^y}{e^y+1}\right)+C$ not $\displaystyle -ln\left(\frac{e^y}{e^y+1}\right)+C$ why is that?
I have edited my post above...I should have removed the negative sign when I inverted the argument of the log function...
 

paulmdrdo

Active member
May 13, 2013
386
MANY THANKS TO ALL OF YOU!(Sun)(Clapping):)