How is natural log integration broken up into this range? (equation is contained the script)

45 Views Asked by At

When I was reading a paper, I found an strange derivation like $$\int^{+\infty}_{-\infty}\mathrm{ln}(1+e^w)f(w)dw\\=\int^0_{-\infty}\ln(1+e^w)f(w)+\int^\infty_0[\ln(1+e^{-w})+w]f(w)dw$$ when $w$ is the normal random variable and $f(w)$ is the normal density.

Why is that natural log integration broken up into that?

I think it just need a simple principle.

Thank you.

2

There are 2 best solutions below

1
On BEST ANSWER

Note that $1+e^{-w}=1+\frac{1}{e^{w}}=\frac{1+e^{w}}{e^{w}}$.

Taking the ln, we obtain $\ln(1+e^{-w})=\ln(\frac{1+e^{w}}{e^{w}})=\ln(1+e^{w})-\ln(e^{w})=\ln(1+e^{w})-w$

Therefore $\ln(1+e^{w})=\ln(1+e^{-w})+w$.

It follows that $\int_0^\infty \ln(1+e^{w}) f(w) dw =\int_0^\infty (\ln(1+e^{-w})+w) f(w) dw$.

1
On

$$\ln(1+e^w)=\ln\left(e^w\left(e^{-w}+1\right)\right)=\ln\left(e^w\right)+\ln\left(1+e^{-w}\right) = \ln\left(1+e^{-w}\right) +w $$