What is the expected area of a triangle in which each side is a random real number between $0$ and $1$?

704 Views Asked by At

Let $a,b,c$ be three independent uniformly random real numbers between $0$ and $1$. Given that there exists a triangle with side lengths $a,b,c$, what is the expected area of the triangle?

Using Heron's formula, the area is $\frac14\sqrt{(a+b+c)(-a+b+c)(a-b+c)(a+b-c)}$. The expected area should be a triple integral with respect to $a,b,c$, but I don't know how to set up the limits of integration.

Previously I was able to set up an integral to answer a related question: "What is the expected area of a random triangle with perimeter $1$?" I tried to utilize my approach there, by asking "What is the expected area of a random triangle with perimeter $p$?" and then integrating from $p=0$ to $p=3$. But each value of $p$ has a different "weight", so I think I should somehow take into account the distribution of $p$, but I'm not sure how. Then, for the anti-derivative, I'm not sure what substitution would disengage $a,b,c$ to allow for indefinite integration.

A simulation with $10^7$ trials yields an average area of $0.11600$.

2

There are 2 best solutions below

9
On BEST ANSWER

This is a partial answer. I only get an integral representation for the expected area.

We will use the fact:

Given $3$ positive numbers $a,b,c$, they are the sides of a non-degenerate triangle if and only if we can find $3$ positive numbers $u,v,w$ such that $$a = v + w,\;b = u + w,\;c = u + v$$

Notice $da \wedge db \wedge dc = 2 du \wedge dv \wedge dw$, the Jacobian is a constant. Uniform distribution for $a,b,c$ over unit-cube is equivalent to uniform distribution for $u,v,w$ over corresponding polyhedron in $(u,v,w)$-space: $$\Omega = \left\{ (u,v,w) \in \mathbb{R}^3 : 0 \le v + w, u + w, u + v \le 1 \right\}$$

Let $\Omega_{+} = \Omega \cap [0,\infty)^3$ and $\Delta = \left\{ (u,v,w) \in \Omega_{+}, u \ge v \ge w \right\}$. In terms of $u,v,w$, the probability of forming a triangle is

$$P_\triangle = 2 \int_{\Omega_{+}} du dv dw = 12\int_{\Delta} du dv dw$$ Change variable to $(u,v,w) = (u,us,ust)$, the condition $u \ge v \ge w$ is equivalent to $s,t \in [0,1]$ and

$$P_\triangle = 12 \int_0^1\int_0^1\left(\int_0^{\frac{1}{1+s}} u^2 du\right) sds dt = 4 \int_0^1 \frac{sds}{(1+s)^3} = \frac12 $$ In terms of $u,v,w$, the area of triangle $A = \sqrt{uvw(u+v+w)}$. Its expected area is given by the formula

$$\begin{align} \verb/E/[A] &= \frac{12}{P_\triangle}\int_\Delta \sqrt{uvw(u+v+w)} du dv dw\\ &=24 \int_0^1\int_0^1 \left(\int_0^{\frac{1}{1+s}} u^4 du\right)\sqrt{t(1+s+st)} s^2ds dt\\ &= \frac{24}{5}\int_0^1\int_0^1 \frac{s^2\sqrt{t(1+s+st)}}{(1+s)^5} ds dt \end{align} $$

I don't know how to evaluate the last integral. However, wolfram alpha and maxima 5.17.1 evaluate the integral in last line numerically as $0.0241652$ and $0.0241651708563157 \pm 2.68\times 10^{-16}$ respectively.

This leads to $\verb/E/[A] \sim 0.11599282\ldots$ matching what you get from simulation.

Update

According to @Max0815 in comment, Mathematica do know how to evaluate the integral in close form. The result is:

$$\verb/E/[A] = \frac1{1920}\left( \small \begin{align} & 1632 - 720\sqrt3 - 576 C \\& + 5\sqrt3\left(\psi^{(1)}\!\!\left(\frac16\right) + \psi^{(1)}\!\!\left(\frac13\right) - \psi^{(1)}\!\!\left(\frac23\right) - \psi^{(1)}\!\!\left(\frac56\right)\right) \end{align} \right)\\ =\frac{1}{80}\left(68 - 30\sqrt3 - 24 C + 15\operatorname{Cl}_2\left(\frac\pi3\right)\right) \phantom{======...} $$ where $C$ is the Catalan's constant and $\psi^{(1)}$ is the $1^{st}$ derivative of digamma function.

I have no idea how to get this analytically. However, WA evaluates this numerically to $$0.1159928201103153651023020463820551827782699626985368352024021543\ldots$$ which does look right.

4
On

Here's a way to finish the integral from achille hui's answer. Computing the $t$ integral yields:

$$\verb/E/[A]=\frac{24}{5}\int_0^1 \frac{s^2}{(1+s)^5}\int_0^1 \sqrt t\sqrt{1+s+st}\, dt ds$$

$$=\frac{6}{5}\int_0^1\frac{s^2}{(1+s)^5}\sqrt{1+2s}\left(3+\frac{1}{s}\right)ds-\frac65\int_0^1 \frac{\sqrt s}{(1+s)^3}\operatorname{arcsinh}\sqrt{\frac{s}{1+s}}ds$$

We already know from the announced closed form that the answer should produce a cluster term of $\frac{17}{20}-\frac{9}{8\sqrt 3}$, so to split it from the other terms we should remove the powers from the $(1+s)^3$ term. For this we can use:

$$\left(\frac{(1-s)\sqrt s}{4(1+s)^2}\right)'= -\frac{\sqrt s}{(1+s)^3}+\frac{1}{8\sqrt s (1+s)}$$

$$\small \verb/E/[A]=\frac{6}{5}\int_0^1\frac{s^2}{(1+s)^5}\sqrt{1+2s}\left(3+\frac{1}{s}\right)ds+\frac65\int_0^1 \left(\frac{(1-s)\sqrt s}{4(1+s)^2}\right)'\operatorname{arcsinh}\sqrt{\frac{s}{1+s}}ds$$

$$-\frac{3}{20}\underbrace{\int_0^1 \frac{\operatorname{arcsinh}\sqrt{\frac{s}{1+s}}}{\sqrt s(1+s)}ds}_{=\mathcal J}=\boxed{\frac{17}{20}-\frac{9}{8\sqrt 3}-\frac{3}{20}\mathcal J}$$


$$\mathcal J=\int_0^1 \frac{\operatorname{arcsinh}\sqrt{\frac{s}{1+s}}}{\sqrt s(1+s)}ds\overset{\sqrt{\frac{s}{1+s}}=x}=2\int_0^\frac{1}{\sqrt 2} \frac{\operatorname{arcsinh} x}{\sqrt{1-x^2}}dx$$

$$=2\int_0^1\int_0^\frac{1}{\sqrt 2}\frac{x}{\sqrt{1+t^2x^2}\sqrt{1-x^2}}dxdt$$

$$=2\underbrace{\int_0^1 \frac{\arctan t}{t}dt}_{=C}-2\underbrace{\int_0^1 \frac{\arctan\frac{t}{\sqrt{2+t^2}}}{t}dt}_{= \large \frac58\operatorname{Cl}_2\left(\frac{\pi}{3}\right)}=\boxed{2C-\frac{5}{4}G}$$

Above follows using $2$ Clausen function identities from here, after rewriting the second integral as:

$$\int_0^1 \frac{\arctan\frac{t}{\sqrt{2+t^2}}}{t}dt\overset{\frac{t}{\sqrt{2+t^2}}=x}=\int_0^\frac{1}{\sqrt 3} \frac{\arctan x}{x(1-x^2)}dx$$ $$\overset{IBP}=\frac12\int_0^\frac{1}{\sqrt 3}\frac{\ln\left(\frac{1-x^2}{2x^2}\right)}{1+x^2}dx\overset{x\to \tan \frac{x}{2}}=\frac14\int_0^\frac{\pi}{3}\ln\left(\frac{\cos x}{1-\cos x}\right)dx=\frac{5}{8}\operatorname{Cl}_2\left(\frac{\pi}{3}\right)$$

$$\Rightarrow \boxed{\verb/E/[A]=\frac{17}{20}-\frac{9}{8\sqrt 3}-\frac{3}{10}C+\frac{3}{16}G}$$

Where $C$ is Catalan's constant and $G$ is Gieseking's constant.