aez-notes

Buffon's Needle with Horizontal and Vertical Rulings

Suppose we toss a needle of length \(2l\) (less than 1\) on a grid with both horizontal and vertical rulings spaced one unit apart. What is the mean number of lines the needle crosses? (I have dropped the \(2a\) for the spacing because we might as well thing of the length of the needle as measured in units of spacing.)

This is very similar to the previous problem, but now we must consider the horizontal and vertical position of the pin's midpoint. There is also the possibility of zero, one or two crossings were previously it was only binary.

t1 : integrate(integrate(integrate(2, y, a - l * cos(th), a), x, a-l*sin(th), a), th, 0, %pi/2);

t2 : integrate(integrate(integrate(1, y, a - l * cos(th), a), x, 0, a-l*sin(th)), th, 0, %pi/2);

t3 : integrate(integrate(integrate(1, y, 0, a - l * cos(th)), x, a-l*sin(th), a), th, 0, %pi/2);

t4 : integrate(integrate(integrate(0, y, 0, a - l * cos(th)), x, 0, a-l*sin(th)), th, 0, %pi/2);

sol : expand((t1 + t2 + t3 + t4) / (a^2 * %pi / 2));

print(sol);
/*
 4 l
-----
%pi a
*/

print(subst(1/2, a, sol));
/*
8 l
---
%pi
*/

Author: Alex Zarebski

Created: 2022-04-15 Fri 12:29

Validate