% This is the function from p. 6 of the first infinite square well lecture. % It is a delta function in the limit as N goes to infinity. % Increase N and see what happens. % The integral of this function is one, but numerically the area over the % the range of the plot is slightly larger than one. N = 1; dx = 0.001; x = (-10+dx/2):dx:(10-dx/2); delta = sin(pi*(N + 0.5)*x)./(pi*x); plot(x,delta) area = trapz(x,delta)