-- Draw probability density for Rutherford scattering -- eigenmath.org/rutherford-scattering-3.txt pi = float(pi) -- use numerical value of pi N = 4 -- number of bins a = pi / N -- minimum support angle I(xi) = 1 / (cos(xi) - 1) - 1 / (cos(a) - 1) C = I(pi) -- normalization constant F(theta) = I(theta) / C "Probability density" f = d(F,theta) f xrange = (a,pi) yrange = (0,4) draw(f,theta) "Probability distribution" P = zero(N) for(k,2,N, theta2 = k a, theta1 = theta2 - a, P[k] = F(theta2) - F(theta1) ) P
Run