If $\int\frac{xe^x}{\sqrt{1+e^x}}dx=f(x)\sqrt{1+e^x}-2\log g(x)+C$, then:
Answer & explanation
Correct answer: option 2
Let $I=\int x\frac{e^x}{\sqrt{1+e^x}}dx$
Putting $1+e^x=t^2$ i.e. $x = \log(t^2-1)$, we get:
$I=2\int\log(t^2-1)dt=2[t\log(t^2-1)-2\int\frac{t^2}{t^2-1}dt]=2[t\log(t^2-1)-2\int\{1+(\frac{1}{t^2-1})\}dt]$
$=2[t\log(t^2-1)-2t-\log(\frac{t-1}{t+1})]+C=2x\sqrt{1+e^x}-4\sqrt{1-e^x}-2\log(\frac{\sqrt{1+e^x}-1}{\sqrt{1+e^x}+1})+C$
Hence, $f(x)=2x-4=2(x-2)$ and $g(x)=\frac{\sqrt{1+e^x}-1}{\sqrt{1+e^x}+1}$