Question: $$\int \frac{xe^x}{\sqrt{1+e^x}} dx$$
If my answer given below is correct, is there an easier way of computing this integral? I feel like this took too long to solve.
Question: $$\int \frac{xe^x}{\sqrt{1+e^x}} dx$$
If my answer given below is correct, is there an easier way of computing this integral? I feel like this took too long to solve.
Copyright © 2021 JogjaFile Inc.

Let $t=e^x$ to rewrite the integral,
$$I=\int \frac{xe^x}{\sqrt{1+e^x}}dx=\int \frac{\ln t}{\sqrt{1+t}}dt$$ Integrate by parts,
$$I = 2\sqrt{1+t}\ln t - 2\int \frac{\sqrt{1+t}}{t}dt\tag 1$$
Then, with $u=\sqrt{1+t}>1$,
$$\int \frac{\sqrt{1+t}}{t}dt=\int \frac{2u^2}{u^2-1}du=2u +\int \frac2{u^2-1}du =2u+\ln\frac{u-1}{u+1}$$
Plug into (1) to obtain
$$I = 2\sqrt{1+t}\ln t - 4u + 2\ln\frac{u-1}{u+1} + C$$ $$ = 2x\sqrt{1+e^x}- 4\sqrt{1+e^x} + 2\ln\frac{\sqrt{1+e^x} +1}{\sqrt{1+e^x} -1} + C$$