# Solve `int e ^(3x )/(2+e^x )`

*print*Print*list*Cite

### 1 Answer

You should come up with the following substitution, such that:

`2 + e^x = t => e^x dx = dt`

`e^x = t - 2 => (e^x)^2 = (t - 2)^2`

You need to change the variable such that:

`int e^(3x)/(2 + e^x)dx = int (e^x)^2*(e^x dx)/(2 + e^x)`

`int (t - 2)^2*(dt)/t`

You need to expand the square such that:

`int (t^2 - 4t + 4)*(dt)/t`

Using the property of linearity of integral yields:

`int (t^2 - 4t + 4)*(dt)/t = int (t^2)/t dt - int (4t)/t dt + int 4/t dt`

Reducing duplicate factors yields:

`int (t^2 - 4t + 4)*(dt)/t = int t dt - int 4 dt + int 4/t dt`

`int (t^2 - 4t + 4)*(dt)/t = t^2/2 - 4t + 4ln|t| + c`

Replacing back `2 + e^x` for t yields:

`int e^(3x)/(2 + e^x)dx = (2 + e^x)^2/2 - 4(2 + e^x) + 4ln(2 + e^x) + c`

**Hence, evaluating the given indefinite integral, yields `int e^(3x)/(2 + e^x)dx = (2 + e^x)^2/2 - 4(2 + e^x) + 4ln(2 + e^x) + c.` **