A photon starts in a random direction (uniformly distributed) from the center of a square (all of whose sides are mirrors) and hits a side (and reflects off of it). What is the expected value of the distance it travels before hitting the same side again?
As an extension, if it starts from a side instead of the center, what is it's expected distance traveled before hitting the same side again?
The initial angle of projection is given to be uniform in $[0, 2\pi]$, so I have to start off by defining the mass function of the angle as $f(\theta)=\frac{d\theta}{2\pi}$ and find the distance traveled in terms of $\theta$ and then use $$E[dist(\theta)] = \int_0^{2\pi} f(\theta)dist(\theta)d\theta$$ but I need help in calculating $dist(\theta)$ in terms of $\theta$. If someone could provide a detailed solution, that would be great.
Consider the first side struck to be the "top" of the box. The question is, how far will the light travel before it hits the top again. For this question, the sides don't matter at all. Reflections off the sides don't change the slope of the light's trajectory between the top and bottom in magnitude, only in sign.
The upshot of this is that you can reframe the question as follows: The lines $y=1$ and $y=-1$ in the $xy$-plane are the only mirrors, and they extend infinitely in the positive and negative $x$ directions. A photon leaves the origin, and strikes the line $y=1$ at some point between $(0,1)$ and $(1,1)$. (By symmetry, we only need consider the right side.) It bounces off, travels down to the line $y=-1$ and then back to $y=1$. What is the expected value of the distance traveled between hitting $y=1$ and hitting it again?
Does this make the problem easier?