What is the expected length of the implied side and area formed by bending a unit length at a random point and angle?

96 Views Asked by At

What is the length of the length of the implied side and area of a triangle created by bending a unit length at a uniformly distributed point and angle? By simulation it seems that the expected length of the implied side is somewhere around .785 and I think is determined exactly by the law of cosines and the following integral. But if this special case was beyond my integration skills, this integral definitely is...

$$\int_{\theta=0}^\pi \int_{x=0}^1 \sqrt{x^2+(1-x)^2+2 x(1-x) cos\theta} dx d\theta$$

Again bonus points for determining the expected area of the implied triangle!

1

There are 1 best solutions below

4
On BEST ANSWER

The expected area is not too messy to compute. Let $x \in [0,1]$ and $\theta \in [0,\pi]$ be chosen uniformly at random. The "infinitesimal probability" of any particular scenario is $dx \cdot d\theta/\pi$. We then construct a triangle with sides $x$, $1-x$ and angle $\theta$ between them; the area of the triangle in this scenario is $$\frac{1}{2} x(1-x) \sin(\theta)$$ and hence the average area is $$\int_{0}^{\pi} \int_{0}^{1} \frac{1}{2} x(1-x) \sin(\theta) \, dx \, \frac{d\theta}{\pi} = \frac{1}{6\pi}$$

The integral computing the expected length of the third side is rather messy. We will need to write things in terms of the complete elliptic integral of the second kind, which for our purposes I'll define as $$E(m) := \int_{0}^{\pi/2} \sqrt{1-m\sin^2 (\theta)} \, d\theta$$ For any $a>b$, we then have (using the half-angle formula $\cos(\theta) = 1 - 2\sin^2 (\theta/2)$) that $$\int_{0}^{\pi} \sqrt{a-b\cos(\theta)} \, d\theta = \int_{0}^{\pi} \sqrt{a-b + 2b \sin^2 (\theta/2)} \, d\theta $$ $$= 2\int_{0}^{\pi/2} \sqrt{a-b + 2b \sin^2 (\theta)} \, d\theta = 2\sqrt{a-b} E\left(\frac{2b}{b-a} \right)$$ Using this calculation, we now have that our expected length equals $$\int_{0}^{1} \int_{0}^{\pi} \sqrt{x^2 + (1-x)^2 - 2x(1-x) \cos(\theta)} \, \frac{d\theta}{\pi} \, dx $$ $$= \frac{2}{\pi} \int_{0}^{1} |1-2x|E\left(\frac{-4x(1-x)}{(1-2x)^2} \right) \, dx $$ Now, apparently the function $E(m)$ satisfies what is called the imaginary modulus identity $$E(-m) = \sqrt{1+m}\cdot E\left(\frac{m}{1+m} \right)$$ (see here for a reference). Using this identity, we compute that for $x\in [0,1]$, we have $$|1-2x|E\left(\frac{-4x(1-x)}{(1-2x)^2} \right) = E(4x(1-x))$$ so our integral nicely simplifies to $$\frac{2}{\pi} \int_{0}^{1} E(4x(1-x)) \, dx$$ Now, citing this link, we have the following series expansion: $$E(m) = \frac{\pi}{2} \sum_{n=0}^{\infty} \left(\frac{1}{2^{2n}} \binom{2n}{n}\right)^2 \frac{m^n}{1-2n}$$ Thus, integrating through the summation, we find $$\frac{2}{\pi}\int_{0}^{1} E(4x(1-x))\, dx $$ $$= \sum_{n=0}^{\infty} \left(\frac{1}{2^{2n}} \binom{2n}{n}\right)^2 \frac{4^n}{1-2n} \int_{0}^{1} x^n (1-x)^n \, dx$$ Using properties of the Beta function, we know that $$\int_{0}^{1} x^n (1-x)^n \, dx = \frac{1}{(2n+1)\binom{2n}{n} }$$ and thus the sum simplifies to $$\sum_{n=0}^{\infty} \frac{1}{2^{2n}} \binom{2n}{n} \frac{1}{(1-2n)(2n+1)} $$ $$= 1- \sum_{n=1}^{\infty} \frac{1}{2^{2n}} \binom{2n}{n} \frac{1}{(2n-1)(2n+1)} =: 1-S$$ We now wish to compute $S$, which we will do by first writing $$S = \sum_{n=1}^{\infty} \frac{1}{2^{2n}} \binom{2n}{n} \frac{1}{(2n-1)(2n+1)} $$ $$= \frac{1}{2} \sum_{n=1}^{\infty} \frac{1}{2^{2n}} \binom{2n}{n} \left(\frac{1}{2n-1} - \frac{1}{2n+1} \right) = \frac{1}{2} \left(\sum_{n=1}^{\infty} \frac{1}{2^{2n} (2n-1)} \binom{2n}{n} - \sum_{n=1}^{\infty} \frac{1}{2^{2n} (2n+1)} \binom{2n}{n}\right)$$ where we can split the sums like this since they each converge absolutely. It is well known that $$f(x) = \sum_{n=0}^{\infty} \binom{2n}{n} x^n = \frac{1}{\sqrt{1-4x}}$$ and hence we have $$\frac{f(x^2) - 1}{x^2} = \sum_{n=1}^{\infty} \binom{2n}{n} x^{2n-2} $$ $$\implies \frac{1}{2} \int_{0}^{1/2} \frac{f(x^2) - 1}{x^2} \, dx = \sum_{n=1}^{\infty} \binom{2n}{n} \frac{1}{2^{2n} (2n-1)}$$ and similarly $$f(x^2) - 1 = \sum_{n=1}^{\infty} \binom{2n}{n} x^{2n} $$ $$\implies 2\int_{0}^{1/2} f(x^2) - 1 \, dx = \sum_{n=1}^{\infty} \binom{2n}{n} \frac{1}{2^{2n} (2n+1)}$$ It follows that $S$ equals the integral $$\frac{1}{2} \left( \frac{1}{2} \int_{0}^{1/2} \frac{f(x^2) - 1}{x^2} \, dx - 2\int_{0}^{1/2} f(x^2) - 1 \, dx \right) = \int_{0}^{1/2} \frac{(1-4x^2)^{1/2} - (1-4x^2)}{4x^2} \, dx$$ It is reasonably straightforward to calculate this integral explicitly using "calculus 2" techniques (the integrand has an elementary antiderivative) and one finds $S = 1- \pi/4$ so that, at last, the answer is the remarkable closed form expression $1-S = \boxed{\pi/4}$.