%
%  code04.m -- gamma integrands
%

x = [2 4 10 50];

T = 20;  t = 0:T/400:T;

%  integrand plot

clf;
subplot(2,1,1);
for j = 1:size(x,2)
  integrand = exp(-t).*(t.^(x(j)-1));
  plot(t,integrand/max(integrand),'b');  hold on
end
  plot(t,integrand/max(integrand),'r');  hold on

title(['\bf gamma function integrand (x=' num2str(x) '\bf)'])
ylabel('\bf normalized integrand')
xlabel('\bf u-axis')

%  integrand for laplace method

subplot(2,1,2);  t = t(2:101);
for j = 1:size(x,2)
  integrand = exp(-x(j)*(t - log(t)));
  plot(t,integrand/max(integrand),'b');  hold on
end
  plot(t,integrand/max(integrand),'r');  hold on

title(['\bf transformed integrand (x=' num2str(x) '\bf)'])
ylabel('\bf normalized integrand')
xlabel('\bf v-axis')
text(1,0.5,'\bf maximum is x-independent')


