Friday, September 22, 2017

Proof for the Expected Value Problem III


Let $ABC$ be a triangle with $AB=c$, $BC=a$, and $CA=b$. Let $D$, $E$ and $F$ denote the feet of the altitudes from $A$, $B$ and $C$ receptively such that $AD=h_a$, $BE=h_b$ and $CF=h_c$.

First off, we define some notations. Let $L$ be the length of the line drawn by selecting a random point $P$ in a triangle $ABC$ and let $X$ be the point where the random line intersects the triangle.

Let $\mathbb{E}_{\triangle ABC}(L|S_k)$ be the expected length of the line drawn as described in setup $S_k$ in the triangle $ABC$.

Setup 1 Select a random point in triangle $ABC$ and draw a line (towards $BC$) parallel to the altitude $AD$.

WLOG, we can chose the vertex $B$ to be the origin with the $x$-axis aligned with the side $BC$. Then we have,

$\displaystyle\mathbb{E}_{\triangle ABC}(L|S_1)=\frac{1}{\triangle ABC}\iint\limits_{(x,y)\in\triangle ABC}|PX|\,dy\,dx=\frac{1}{\triangle ABC}\iint\limits_{(x,y)\in\triangle ABC}y\,dy\,dx=\frac{h_a}{3}$

The last equality follows by recognizing the integral as the $y$-coordinate of the centroid of the triangle $ABC$.

Setup 2 Given a point $M$ between $B$ and $D$, select a random point in triangle $ABC$ and draw a line (towards $BC$) parallel to $AM$ until it meets the triangle. Let $t$ be the angle between $AM$ and $AD$ (measured clockwise from $AD$).

Using the same co-ordinate system as above, this time we have,

$
\begin{align}
\displaystyle\mathbb{E}_{\triangle ABC}(L|S_2,M)&=\frac{1}{\triangle ABC}\iint\limits_{(x,y)\in\triangle ABC}|PX|\,dy\,dx\\
&=\frac{1}{\triangle ABC}\iint\limits_{(x,y)\in\triangle ABC}\frac{y}{\cos t}\,dy\,dx=\frac{h_a}{3\cos t}=\frac{|AM|}{3}
\end{align}
$

Setup 3 Given a point $M$ between $B$ and $D$, select a random point in triangle $ABC$ and draw a line (away from $BC$) parallel to $AM$ until it meets the triangle. Let $t$ be the angle between $AM$ and $AD$ (measured clockwise from $AD$).

Now we do a case distinction based on whether the random point is in $\triangle ABM$ or $\triangle AMC$.

$
\begin{align}
\displaystyle\mathbb{E}_{\triangle ABC}(L|S_3,M)&=\frac{\triangle MAB}{\triangle ABC}\mathbb{E}_{\triangle MAB}(L|S_2,A)+\frac{\triangle MCA}{\triangle ABC}\mathbb{E}_{\triangle MCA}(L|S_2,A)\\
&=\frac{\triangle ABM}{\triangle ABC}\frac{|MA|}{3}+\frac{\triangle AMC}{\triangle ABC}\frac{|MA|}{3}\\
&=\frac{|AM|}{3}\\
\end{align}
$

Surprisingly, it doesn't matter whether we draw the line towards or away from the edge $BC$, the expected value remains the same.

Setup 4 Given a point $M$ between $B$ and $D$, select a random point in triangle $ABC$ and draw a line (either towards or away from $BC$) parallel to $AM$ until it meets the triangle. Let $t$ be the angle between $AM$ and $AD$ (measured clockwise from $AD$).

From the previous discussion, we have,

$\displaystyle\mathbb{E}_{\triangle ABC}(L|S_4,M)=\frac{|AM|}{3}$

This can be equivalently written as,

$\displaystyle\mathbb{E}_{\triangle ABC}(L|S_4,t)=\frac{h_a}{3\cos t}$


Setup 5 Select a random point in triangle $ABC$ and draw a line (either towards or away from $BC$) until it meets the triangle, such that the angle $t$ between $PX$ and $AD$ (measured clockwise from $PX$) satisfies $0 \leq t \leq \tan^{-1}\left(\frac{BD}{AD}\right)$.

Using the law of the total probability,

$
\begin{align}
\mathbb{E}_{\triangle ABC}(L|S_5)&=\mathbb{E}(\mathbb{E}_{\triangle ABC}(L|S_4,t))\\
&=\frac{1}{\tan^{-1}\left(\frac{BD}{AD}\right)}\int\limits_0^{\tan^{-1}\left(\frac{BD}{AD}\right)}\frac{h_a}{3\cos t}\,dt\\
\end{align}
$

We can use the fact that $\int\limits_0^{\tan^{-1}m}\sec t\,dt=\text{sinh}^{-1}m$, we have

$\displaystyle\mathbb{E}_{\triangle ABC}(L|S_5)=\frac{h_a}{3\tan^{-1}\left(\frac{BD}{AD}\right)}\text{sinh}^{-1}\left(\frac{BD}{AD}\right)$


Setup 6 Select a random point in triangle $ABC$ and draw a line (either towards or away from $BC$) until it meets the triangle, such that the angle $t$ between $PX$ and the side $AB$ (measured clockwise from $PX$) satisfies $0 \leq t \leq \angle A$.

We again make a case distinction based on where the ray $PX$ intersects the side $BC$ - either in $BD$ or in $DC$. We can separate the angle into two cases based on this. Using the previous result, we have,

$\displaystyle\mathbb{E}_{\triangle ABC}(L|S_6)=\frac{h_a}{3\angle A}\left(\text{sinh}^{-1}\left(\frac{BD}{AD}\right)+\text{sinh}^{-1}\left(\frac{DC}{AD}\right)\right)$

This, after some basic simplifications, results in,

$\displaystyle\mathbb{E}_{\triangle ABC}(L|S_6)=\frac{h_a}{3\angle A}\text{csch}^{-1}\left(\frac{p}{a}\frac{s-a}{p-a}\right)$

where $p$ and $s$ are the perimeter and semi-perimeter of $\triangle ABC$ respectively.

Now we get into the final part of the proof.

Setup 7 Select a random point in triangle $ABC$ and draw a line at a random angle from that point until it meets the triangle.

We now again do a case distinction based on the angle and using the previous result, we finally have,

$
\begin{align}
\displaystyle\mathbb{E}_{\triangle ABC}(L)&=\sum_{x \in \{a,b,c\}}\frac{h_x}{3\pi}\text{csch}^{-1}\left(\frac{p}{x}\frac{s-x}{p-x}\right)\\
&=\frac{h_a}{3\pi}\text{csch}^{-1}\left(\frac{p}{a}\frac{s-a}{p-a}\right)+\frac{h_b}{3\pi}\text{csch}^{-1}\left(\frac{p}{b}\frac{s-b}{p-b}\right)+\frac{h_c}{3\pi}\text{csch}^{-1}\left(\frac{p}{c}\frac{s-c}{p-c}\right)
\end{align}
$

And hence the result. Hope you enjoyed this. I'll come up with something different the next time.

UPDATE (13 / 8 / 2020): Updating the 'boring calculation' used in Setup 6.

By the addition formulae for Inverse Hyperbolic sines,

$\displaystyle \text{sinh}^{-1}\left(\frac{BD}{AD}\right)+\text{sinh}^{-1}\left(\frac{CD}{AD}\right)=\text{sinh}^{-1}\left(\frac{CD}{AD}\frac{AB}{AD}+\frac{BD}{AD}\frac{AC}{AD}\right)$

Using the geometry of the triangle we know that,

$BD=c \cos B$, $CD=b \cos C$ and $AD=b \sin C=c \sin B$

$\displaystyle \text{sinh}^{-1}\left(\frac{BD}{AD}\right)+\text{sinh}^{-1}\left(\frac{CD}{AD}\right)=\text{sinh}^{-1}\left(\frac{\cos B+\cos C}{\sin B \sin C}\right)$

But
$\sin B \sin C=2\sin(B/2)\cos(B/2)\cdot 2\sin(C/2)\cos(C/2)=2\sin(B/2)\sin(C/2)\cdot 2\cos(B/2)\cos(C/2)$

With Sine and Cosine addition formula, this becomes,

$\sin B \sin C=(\cos(B/2+C/2)-\cos(B/2-C/2))(\cos(B/2+C/2)+\cos(B/2-C/2))=\cos^2(B/2+C/2)-\cos^2(B/2-C/2)$

Also, $\displaystyle \cos B+\cos C=2\cos(B/2+C/2)\cos(B/2-C/2)$

Therefore,

$\displaystyle \frac{\sin B \sin C}{\cos B+\cos C}=\frac{1}{2}\left(  \frac{\cos(B/2+C/2)}{\cos(B/2-C/2)}-\frac{\cos(B/2-C/2)}{\cos(B/2+C/2)}  \right)$

The rest follows by Mollweide's formula.

Until then,
Yours Aye
Me

Thursday, September 21, 2017

An Expected Value Problem III


In An Expected Value Problem, we found the expected length of a line segment drawn by picking a random point in a rectangle and choosing a random angle, and extending it until it meets the edge of a rectangle. We ask the same question here for an arbitrary acute angled triangle in this post.

Let $ABC$ be a triangle with $AB=c$, $BC=a$, and $CA=b$. Let $D$, $E$ and $F$ denote the feet of the altitudes from $A$, $B$ and $C$ receptively such that $AD=h_a$, $BE=h_b$ and $CF=h_c$. I considered this question in the same post above, but I was not able to solve it then.

But recently I collaborated with someone who gave me a very valuable hint which reduced the difficulty of the problem drastically. The idea pretty much solved the problem. In summary, if we denote the length of line segment as $L$, we have,

$
\begin{align}
\displaystyle\mathbb{E}(L)&=\sum_{x \in \{a,b,c\}}\frac{h_x}{3\pi}\text{csch}^{-1}\left(\frac{p}{x}\frac{s-x}{p-x}\right)\\
&=\frac{h_a}{3\pi}\text{csch}^{-1}\left(\frac{p}{a}\frac{s-a}{p-a}\right)+\frac{h_b}{3\pi}\text{csch}^{-1}\left(\frac{p}{b}\frac{s-b}{p-b}\right)+\frac{h_c}{3\pi}\text{csch}^{-1}\left(\frac{p}{c}\frac{s-c}{p-c}\right)
\end{align}
$

where $p$ and $s$ denote the perimeter and the semi-perimeter respectively.

Let's calculate the expected values for a few special cases.

$\mathbb{E}(1,1,1)\approx 0.30284835$ and $\mathbb{E}(3,4,5)\approx 1.100147755$

The interest in this question seems very low in the mathematical literature and I was not able to find any material in the internet to verify these values. However, a friend of mine wrote a simulation for the Pythagorean case and the result matched with the value given by the formulae.

Two things are to be mentioned here. First, even though we dealt with the same question for a triangle and a rectangle, note that the formulas are drastically different. Some may find it obvious that they are different but I had an intuition that they'll be pretty 'close' which turned out to be wrong.

Second, the individual terms in the above formulae can themselves are respective expected values for a different question. I'll follow up with the what those questions are and the proof of this formulae in the next few posts.


Until then,
Yours Aye
Me