Two Thetas Make a Triangle

Calculus Level 5

Consider three points on the unit circle in the x y x y plane:

P 1 = ( 0 , 1 ) P 2 = ( cos θ 1 , sin θ 1 ) P 3 = ( cos θ 2 , sin θ 2 ) \begin{aligned} \vec{P_1} & = (0,1) \\ \vec{P_2} & = ( \cos \theta_1, \sin \theta_1) \\ \vec{P_3} & = ( \cos \theta_2, \sin \theta_2) \end{aligned}

Angles θ 1 \theta_1 and θ 2 \theta_2 are randomly and uniformly distributed between 0 0 and 2 π 2 \pi . If these three points are the vertices of a triangle, what is the triangle's expected area?


The answer is 0.477.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

As usual, I approached the problem numerically. I placed it on the plane as in the figure so that:

P 1 = ( cos ( α ) , 1 + sin ( α ) ) {\bf P_1} = (~\cos(\alpha),~1+\sin(\alpha)~)

P 2 = ( cos ( β ) , 1 + sin ( β ) ) {\bf P_2} = (~\cos(\beta),~1+\sin(\beta)~)

for the randomly and uniformly distributed angles α , β [ 0 , 2 π ] \alpha,\beta\in[0,2\pi] . With this conventions, the area of the triangle is given by

A = 1 2 det ( P 1 , P 2 ) = 1 2 cos ( α ) + sin ( β α ) cos ( β ) A=\frac1{2}|\mbox{det}({\bf P_1},{\bf P_2})| = \frac1{2}|\cos(\alpha) + \sin(\beta - \alpha) - \cos(\beta)|

from here I write some code and estimated the expected area throughout the mean A 0.477 \overline{A}\approx\boxed{0.477}

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
import math
from random import uniform as rand
from statistics import mean as mean

N = 10**7
area = []
for i in range(0,N):
    a = rand(0,2*math.pi)
    b = rand(0,2*math.pi)
    area.append( abs(math.cos(a) + math.sin(b - a) - math.cos(b)) / 2 )
print(mean(area))

But is there no other way of doing it? The topic of the question is calculus

Jaya Krishna - 2 years, 12 months ago

Continuing without code we would have to calculate an integral.

Let x = ( α , β ) [ 0 , 2 π ] × [ 0 , 2 π ] = D {\bf x}=(\alpha,\beta)\in[0,2\pi]\times[0,2\pi]=D then E [ A ] = D A ( x ) f ( x ) d x E[A]=\int_DA({\bf x})f({\bf x})d{\bf x} sice we are choosing a point uniformly at random from a square of side 2 π 2\pi the probability dencity function is just f ( x ) = 1 4 π 2 f({\bf x})=\frac1{4\pi^2} hence our integral is E [ A ] = 0 2 π 0 2 π cos ( α ) + sin ( β α ) cos ( β ) 8 π 2 d α d β = 3 2 π 0.477 E[A]=\int_0^{2\pi}\int_0^{2\pi}\frac{|\cos(\alpha) + \sin(\beta - \alpha) - \cos(\beta)|}{8\pi^2}d\alpha d\beta=\frac{3}{2\pi}\approx\boxed{0.477}

The code above is actually solving this integral numerically in a pretty weird way :)

Jose Fernandez Goycoolea - 2 years, 12 months ago

Log in to reply

Is there some way to remove mod from this integral? I tried integrating α \alpha from 0 β 0 \to \beta and switching one factor of 2 π β 2\pi \to \beta but that gave 0.306 as answer

Manoj 420 - 2 years, 12 months ago

Log in to reply

Yes, there is. The sign of det ( P 1 , P 2 ) \mbox{det}({\bf P_1},{\bf P_2}) depends on the orientation of the vectors P 1 {\bf P_1} and P 2 {\bf P_2} the problem is that I made a poor choice on the parametrization if one want to solve by hand. My angles α \alpha and beta β \beta are measured from the point ( 0 , 1 ) (0,1) and not from the origin. It would be better to use:

P 1 = ( sin ( α ) , 1 cos ( α ) ) {\bf P_1} = (~\sin(\alpha),~1-\cos(\alpha)~)

P 2 = ( sin ( β ) , 1 cos ( β ) ) {\bf P_2} = (~\sin(\beta),~1-\cos(\beta)~)

In this way det ( P 1 , P 2 ) = sin ( α ) sin ( α β ) sin ( β ) > 0 \mbox{det}({\bf P_1},{\bf P_2})=\sin(\alpha)-\sin(\alpha - \beta) -\sin(\beta)>0 exactly when α > β \alpha>\beta since the angles coincide with the directions of the vectors. Finally since the integral is simmetrical on both triangles (of the α β \alpha\beta -square) it reduces to

E [ A ] = 0 2 π 0 2 π sin ( α ) sin ( α β ) sin ( β ) 8 π 2 d β d α = 2 0 2 π α 2 π sin ( α ) sin ( α β ) sin ( β ) 8 π 2 d β d α = 3 2 π 0.477 E[A]=\int_0^{2\pi}\int_0^{2\pi}\frac{|\sin(\alpha)-\sin(\alpha - \beta) -\sin(\beta)|}{8\pi^2}d\beta d\alpha = 2\int_0^{2\pi}\int_{\alpha}^{2\pi}\frac{\sin(\alpha)-\sin(\alpha - \beta) -\sin(\beta)}{8\pi^2} d\beta d\alpha =\frac{3}{2\pi}\approx\boxed{0.477}

Jose Fernandez Goycoolea - 2 years, 12 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...