Problem 10:

A particle at the center of a 10 x 1 rectangle undergoes Brownian motion (i.e. 2D random walk with infinitesimal step lengths) till it hits the boundary.  What is the probability that it hits at one of the ends rather than at one of the sides?

Solution:

This is another standard heat equation problem, this time just for the steady state.  The probability is the temperature at the centre in the steady-state solution of the heat equation on the rectangle, where the temperature is fixed at 1 on the ends ( x = 0  and x = 10 ) and 0 on the sides ( y = 0  and y = 1 ).  The solution with temperature 1 at x = 10  and 0 on the rest of the boundary is u[1](x,y) = sum(a[j]*sinh(j*Pi*x)*sin(j*Pi*y),j = 1 .. infinity)  where a[j]*sinh(10*j*Pi) = 2*int(sin(j*Pi*y),y = 0 .. 1) :

>    restart;
aj:= 2/sinh(10*Pi*j)*int(sin(j*Pi*y),y=0..1) assuming j::integer;

aj := -2/sinh(10*Pi*j)*((-1)^j-1)/Pi/j

>    u1:= Sum(aj*sinh(j*Pi*x)*sin(j*Pi*y),j=1..infinity);

u1 := Sum(-2/sinh(10*Pi*j)*((-1)^j-1)/Pi/j*sinh(j*Pi*x)*sin(j*Pi*y),j = 1 .. infinity)

By symmetry, the solution with temperature 1 at x = 0  and 0 on the rest of the boundary is u[2](x,y) = u[1](10-x,y) .  By superposition, the solution with temperature 1 at both ends is u[1](x,y)+u[2](x,y) .  At the centre, we have u[1](5,1/2)+u[2](5,1/2) = 2*u[1](5,1/2) .  The series converges rapidly.  Here it is calculated with Digits = 40.

>    Digits:= 40; ans:= 2*evalf(eval(u1,{x=5,y=1/2}));

Digits := 40

ans := .3837587979251226103407133186204839100794e-6

This has 39 correct digits.