Nice proof that an expectation vanishes

complex-analysisnormal distribution

Let $X$ and $Y$ be independent standard normal random variables. I have an ugly(ish) proof that for any $\epsilon>0$,
$
\mathbb E\log\|e_1+\epsilon(X,Y)\|=0
$
,
where $e_1$ is the unit vector in the first coordinate direction (or more generally
$\mathbb E\log\|v+\epsilon N\|=\log\|v\|$ for any non-zero vector (where $N=(X,Y)$)). My proof is based on using polar coordinates to describe the distribution of $(X,Y)$ and then complex analysis for a fixed $r$, taking care to deal with the branch cut of the logarithm in the case when $\epsilon r>1$.

It feels that the result should be well known and/or there should be a cleaner approach.

Does anyone have either a reference for this fact or a nice proof?

EDIT: In the light of the answer by angryavian below, it seems that my "proof" was over-optimistic. In the case when $\epsilon r>1$, there is cancellation of one of the real and imaginary coordinates along the branch cut, but not the other one. I now think the expectation is not zero, but rather
$\int_{1/\epsilon}^\infty 2\pi\log(r\epsilon)re^{-r^2/2}$. This agrees nicely with angryavian's simulations in the case $\epsilon=1$.

Best Answer

In light of Robert Israel's answer, I would appreciate if someone can point out the flaw in my code.

My simulations suggest the expectation is not zero. With $n=10^5$ samples and $\epsilon=1$, the histogram of $\log \|e_1 + \epsilon (X, Y)\|$ is

enter image description here

The mean gets closer to zero as $\epsilon \to 0$ though, which matches intuition. But the claim does not seem to exactly hold for $\epsilon > 0$.

import numpy as np
import pandas as pd
import plotnine as gg

n = 100000
np.random.seed(0)
mu = (1, 0)
sigma = 1
z = np.random.normal(loc=mu, scale=sigma, size=(n, 2))

norm_z = np.apply_along_axis(np.linalg.norm, 1, z)
lognorm_z = np.log(norm_z)

z_df = pd.DataFrame(z, columns=['x1', 'x2'])
z_df['norm'] = norm_z
z_df['lognorm'] = lognorm_z

norm_mean = np.mean(norm_z)
lognorm_mean = np.mean(lognorm_z)

print(
    gg.ggplot(z_df, gg.aes(x='lognorm'))
    + gg.geom_histogram(bins=100)
    + gg.geom_vline(xintercept=lognorm_mean)
    + gg.ggtitle(f'Distribution of log norm\nMean = {lognorm_mean:.3f}')
)
Related Question