# Find a probability density function (pdf) $p(x)$ such that $\langle \log(x+2)\rangle$ does not exist

I would like to find the simplest example of a probability density function (pdf) $p(x)$, defined over a support $\sigma$ included in $\mathbb{R}$ (possibly infinite), such that the average $\langle \log(x+2)\rangle$ does not exist (i.e. the integral $\int_\sigma dx\ p(x)\log(x+2)$) does not converge, but $\int_\sigma dx\ p(x)=1$ and $p(x)\geq 0$ for all $x\in\sigma$). Most of the common examples of pdf's (e.g. those for which the Law of Large Numbers does not hold) I can come up with do not seem to do the job. For example, the Cauchy distribution truncated between $1$ and $+\infty$ [$p(x)=(4/\pi)(1+x^2)^{-1}$] is such that $$\int_1^\infty dx\ p(x)=1$$ $$\int_1^\infty dx\ xp(x)=\infty\ ,$$ but $$\int_1^\infty dx\ \log(x+2)p(x)=1.753...\ .$$ Can you help me find a simple example (nothing too fancy, please)? Many thanks for your help, folks.

The integral $$\int_0^\infty \frac{1}{(x+2)\ln^2(x+2)}\,dx$$ converges, indeed can be evaluated explicitly by letting $u=\ln(x+2)$. So by scaling by a suitable constant we can produce a density function with support $[0,\infty)$. However, $$\int_0^\infty \frac{\ln(x+2)}{(x+2)\ln^2(x+2)}\,dx$$ diverges.