How am I computing $\int e^{x}\ln(1+e^{x})\,dx$ incorrect? I am stuck on this problem.
Problem Evaluate $$\int e^{x} \ln (1+e^{x})$$
Attempt
Integration by Parts:
Let $u=\ln(1+e^x), \ dv = \int e^{x} \ dx$ and we have $\ du = \frac{e^x}{1+e^x}$ and $v=e^x$
$$\int u \ dv= uv - \int v \ du$$
Thus $$I=\ln(1+e^x) e^x - \int e^x \frac{e^x}{1+e^x} \ dx$$
On the second integral apply $u=1+e^x$ and $\ du = e^x \ dx$ and 
$$\begin{split}
I&=\ln (1+e^x) e^x - \int \frac{u-1}{u} \ du \\
&= \ln (1+e^x) e^x - \int 1- \frac{1}{u} \ du
\end{split}$$ which simplifies to 
$$I=\ln (1+e^x) e^x - x- \ln(|1+e^x|) +C $$
 A: You should be getting 
$$\int 1 du = u +C$$
instead of 
$$\int 1  = x +C$$
also, you should get 
$$+\int \frac 1u du$$
instead of 
$$-\int \frac 1u du.$$
A: You should just let $u=1+e^x$, $du=e^x\,dx$
Then
\begin{eqnarray} \int e^{x}\ln(1+e^{x})dx&=&\int\ln(u)\,du \\
&=&u\ln(u)-u+c
\end{eqnarray}
and take it from there.

A: For your calculation you made one step (at least) wrong 
$$
\int 1 \to u \neq x
$$
So note to keep the variable you are integrating over. 
To be honest your approach is rather long.
$$
u = 1+\mathrm{e}^x\implies du = \mathrm{e}^xdx
$$
so the integral becomes
$$
\int \ln u \;du = u\ln u - u +c
$$
sub back in for $x$.
A: Assuming we are integrating with respect to $x$, it's nice that $d(1+e^x)=e^xdx$, you can see the integral as 
$$\begin{align}
\int\ln\left(1+e^x\right)e^xdx\; & =\;\int\ln\left(1+e^x\right)\,d\left(1+e^x\right)\\
&\;=\;\left(1+e^x\right)\ln\left(1+e^x\right)-\int\frac{\left(1+e^x\right)}{\left(1+e^x\right)}\,d\left(1+e^x\right)\\
\\
&\;=\;\ln\left(1+e^x\right)+e^x\left(\ln\left(1+e^x\right)-1\right)+C\,.
\end{align}$$
When you see the $\log$ of a function, it's good practice to check if the derivative of that function is laying around somewhere in the integrand, sometimes you can integrate with respect to it. Notice that the second step is just integration by parts on the $\log$ function to get the final result.
