%	Green's functions for the diffusion equation
%	Green's function is normalized with a^2/4pi
clear all
global TAU N
x=[0: 0.02: 5];
tau=[0.2: 0.2: 2];
%	This is tau divided by a^2
integral=tau;
g=x;
for n=1:3
   clf reset
	for i=1:length(tau)
   	g(:)=(2*sqrt(pi*tau(i)))^(-n).*exp(-(x(:).^2)./(4*tau(i)));
   	plot(x,g,'k')
   	xlabel('x')
   	ylabel('g*a^2/4pi')
   	title(['Greens Function for ',num2str(n),'-D Diffusion Equation, tau/a^2 to ',...
      	num2str(tau(end))])
   	hold on
   	TAU=tau(i);
   	N=n;
     	integral(i)=quadl('greenf',0,10);
   end
   N
   integral
   pause
end
