next up previous
Next: Problem 2 - Geometry Up: Mathematics Previous: Mathematics

Problem 1 - Probability

1.
What is the expectation of the square of Euclidean distance between two points that are distributed independently and uniformly within the unit square $ [0,1]^2$?
2.
What is the expectation of Euclidean distance between the origin and a point that is distributed uniformly within the unit square $ [0,1]^2$


1.

$ \int_{x_1=0}^1 \int_{x_2=0}^1 \int_{y_1=0}^1 \int_{y_2=0}^1 (x_1-x_2)^2 + (y_1-y_2)^2 dx_1dx_2dy_1dy_2$

$ =\int_{x_1=0}^1 \int_{x_2=0}^1 \int_{y_1=0}^1 \int_{y_2=0}^1 (x_1^2+x_2^2+y_1^2+y_2^2-2x_1x_2-2y_1y_2)dx_1dx_2dy_1dy_2$

$ =\sum_{i=1}^2\int_{x_i=0}^1 x_i^2 dx_i+\sum_{j=1}^2 \int_{y_j=0}^1 y_j^2dy_1
-...
...1 \int_{x_2=0}^1 x_1x_2dx_1dx_2 -2 \int_{y_1=0}^1 \int_{y_2=0}^1 y_1y_2dy_1dy_2$

$ =4 \times \frac{1}{3} -2\Pi_{k=1}^2 \int_{x_k=0}^1 x_kdx_k -2 \Pi_{l=1}^2 \int_{y_l=0}^1 y_ldy_l$

$ =\frac{4}{3}-2\times\frac{1}{2}\times\frac{1}{2}-2\times\frac{1}{2}\times\frac{1}{2}$

$ =\frac{4}{3}-1=\frac{1}{3}$

2.

$ \int_{x=0}^{1} \int_{y=0}^{1}\sqrt{x^2+y^2}dydx$

\includegraphics{change-of-variables.ps}

When $ \theta \in [0,\frac{\pi}{4}]$, the radius $ r$ is given by $ r = \frac{1}{\cos \theta}$. We thus choose the following change of variables:

$\displaystyle \Phi:\mathbb{R}^2\rightarrow\mathbb{R}^2, (r,\theta)\mapsto(r\cos\theta, r\sin\theta)$

$\displaystyle \hbox{Jac}(\Phi)(r,\theta) = \left\vert \begin{tabular}{ll} $\cos...
...& $-r\sin\theta$ \\  $\sin\theta$ & $r\cos\theta$ \end{tabular} \right\vert = r$

We know that, if $ g:[0,1]\times[0,1]\rightarrow
\mathbb{R}$ and $ f:[0,\sqrt{2}]\times[0,\frac{\pi}{2}]\rightarrow
\mathbb{R},t\mapsto [g\;\hbox{o}\;\Phi(t)]\times\vert\hbox{Jac}(\Phi)(t)\vert$, we have:

$\displaystyle \int_{[0,1]^2} g(x,y)dxdy = \int_{[0,\sqrt{2}]\times[0,\frac{\pi}{2}]} f(r,\theta)drd\theta$

Because of the symmetry in $ x$ and $ y$, we just have to integrate on half of the unit square.

$\displaystyle \int_{x=0}^{1} \int_{y=0}^{1} \sqrt{x^2+y^2}dxdy = 2 \int_{\theta=0}^{\frac{\pi}{4}} \int_{r=0}^{\frac{1}{\cos\theta}} r^2drd\theta$

$\displaystyle = 2 \int_{\theta=0}^{\frac{\pi}{4}} \left[ \frac{r^3}{3}\right]_{r=0}^{\frac{1}{\cos\theta}} d\theta$

$\displaystyle = \frac{2}{3} \int_{\theta=0}^{\frac{\pi}{4}} \frac{1}{\cos^3 \theta} d\theta$

We concentrate on $ \int \frac{1}{\cos^3\theta}d\theta$.

$\displaystyle \int \frac{1}{\cos^3\theta} d\theta = \int \frac{\cos \theta}{\cos^4 \theta} d\theta = \int \frac{\cos\theta}{(1-\sin^2\theta)^2}$

We use the following change of variables: $ \phi:u\mapsto\sin\theta$.

$\displaystyle \int \frac{1}{\cos^3\theta} d\theta = \int \frac{1}{(1-u^2)^2}du = \int \frac{1}{(1+u)^2}\frac{1}{(1-u)^2}du$

We decompose $ \frac{1}{(1+u)^2}\frac{1}{(1-u)^2}$ into simpler elements:

$\displaystyle \frac{1}{(1+u)^2}\frac{1}{(1-u)^2} = \frac{\alpha}{(1-u)^2}+\frac{\beta}{1-u}+\frac{\gamma}{1+u}+\frac{\delta}{(1+u)^2}\quad (1)$

If we form $ (1)\times(1-u)^2$ and then take $ u=1$, then $ \frac{1}{4}=\alpha$.

If we form $ (1)\times(1+u)^2$ and then take $ u=-1$, then $ \frac{1}{4}=\gamma$.

If we take $ u=0$ in $ (1)$, then $ 1 = \alpha + \beta + \gamma + \delta = \frac{1}{2} + \beta + \delta$.

If we take $ u=2$ in $ (1)$, then $ \frac{1}{9} = \alpha - \beta + \frac{\gamma}{9} + \frac{\delta}{3}$.

That is:

$\displaystyle \begin{tabular}{l}
$\frac{1}{2} = \beta + \delta$ \\
$-\frac{1}{6} = -\beta + \frac{\delta}{3}$ \\
\end{tabular}$

Thus, $ \alpha=\beta=\gamma=\delta=\frac{1}{4}$.

$\displaystyle \int \frac{1}{\cos^3\theta} d\theta = \frac{1}{4} \int \frac{1}{(1-u)^2}+\frac{1}{1-u}+\frac{1}{1+u}+\frac{1}{(1+u)^2}du$

$\displaystyle = \frac{1}{4} \left( -\frac{1}{1+u} + \frac{1}{1-u} + \ln(1+u) - \ln(1-u) \right)$

$\displaystyle = \frac{1}{4} \left( \frac{1}{1-\sin\theta} - \frac{1}{1+\sin\theta} + \ln(1+\sin\theta) - \ln(1-\sin\theta) \right)$

Therefore:

$\displaystyle \int_{x=0}^{1} \int_{y=0}^{1}\sqrt{x^2+y^2}dydx = \frac{1}{6}
\le...
...c{1}{\sqrt{2}}} + \ln(1+\frac{1}{\sqrt{2}}) - \ln(1-\frac{1}{\sqrt{2}})
\right)$

$\displaystyle =\frac{\sqrt{2}+\hbox{argth}(\sqrt{2})}{3}$


next up previous
Next: Problem 2 - Geometry Up: Mathematics Previous: Mathematics
Reynald AFFELDT
2000-06-08