Post Reply 
Beta and Airy Functions
06-28-2015, 12:47 AM
Post: #10
RE: Beta and Airy Functions
(06-27-2015 12:41 PM)parisse Wrote:  For |z| large, you can use asymptotic series expansion near infinity.
http://people.math.sfu.ca/~cbm/aands/page_448.htm

That's much better.

   

Now it matches this web site: http://keisan.casio.com/exec/system/1180573401 pretty close. I only checked out to +/-100.

Code:

export c(k)
begin
 if k == 0 then return 1; end;
 return Gamma(3*k+1/2)/54^k/k!/Gamma(k+1/2);
end;

export d(k)
begin
 return c(k)*(6*k+1)/(1-6*k); 
end;

local f(z)
begin
 local t,t2,k,p,p2;
 t:=1;
 t2:=0;
 p2:=1;
 for k from 1 to 80 do
  p:=3*k;
  p2:=p2*(3*k-2);
  t:=t+p2*z^(p)/(p)!;
  if t == t2 then return t; end;
  t2:=t;
 end;
 return t;
end;

local g(z)
begin
 local t,t2,k,p,p2;
 t:=z;
 t2:=0;
 p2:=1;
 for k from 1 to 80 do
  p:=3*k+1;
  p2:=p2*(3*k-1);
  t:=t+p2*z^(p)/(p)!;
  if t == t2 then return t; end;
  t2:=t;
 end;
 return t;
end;

local aismallz(z)
begin
 return
 0.355028053887817*f(z)-
 0.258819403792807*g(z);
end;

local aibigz(z)
begin
 local s;
 if z ≥ 0 then
  s:=2/3*z^(3/2);
  return π^(−1/2)/2*z^(−1/4)*e^(−s)*
  sum((−1)^K*c(K)*s^(−K),K,0,20);
 end;
 z:=ABS(z);
 s:=2/3*z^(3/2);
 return π^(−1/2)*z^(−1/4)*(SIN(s+π/4)*
  sum((−1)^K*c(2*K)*s^(−2*K),K,0,20)-
  COS(s+π/4)*
  sum((−1)^K*c(2*K+1)*s^(−2*K-1),K,0,20));
end;

local bismallz(z)
begin
  return (0.355028053887817*f(z)+
  0.258819403792807*g(z))*√3;
end;

local bibigz(z)
begin
 local s;
 if z ≥ 0 then
  s:=2/3*z^(3/2);
  return π^(−1/2)*z^(−1/4)*e^(s)*
   sum(c(K)*s^(−K),K,0,20);
 end;
 z:=ABS(z);
 s:=2/3*z^(3/2);
 return π^(−1/2)*z^(−1/4)*(COS(s+π/4)*
  sum((−1)^K*c(2*K)*s^(−2*K),K,0,20)+
  SIN(s+π/4)*
  sum((−1)^K*c(2*K+1)*s^(−2*K-1),K,0,20));
end;

export ai(z)
begin
 HAngle:=0;
 if ABS(z) < 10 then
  return aismallz(z);
 end;
 return aibigz(z);
end;

export bi(z)
begin
 HAngle:=0;
 if ABS(z) < 10 then
  return bismallz(z);
 end;
 return bibigz(z);
end;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Beta and Airy Functions - douganc - 06-24-2015, 11:20 AM
RE: Beta and Airy Functions - Tim Wessman - 06-24-2015, 02:39 PM
RE: Beta and Airy Functions - Gerald H - 06-24-2015, 03:27 PM
RE: Beta and Airy Functions - DrD - 06-24-2015, 03:33 PM
RE: Beta and Airy Functions - parisse - 06-24-2015, 06:48 PM
RE: Beta and Airy Functions - roadrunner - 06-27-2015, 11:19 AM
RE: Beta and Airy Functions - Gerald H - 06-27-2015, 12:15 PM
RE: Beta and Airy Functions - parisse - 06-27-2015, 12:41 PM
RE: Beta and Airy Functions - roadrunner - 06-28-2015 12:47 AM
RE: Beta and Airy Functions - Gerald H - 06-27-2015, 05:25 PM
RE: Beta and Airy Functions - douganc - 07-20-2015, 08:10 PM
RE: Beta and Airy Functions - roadrunner - 07-20-2015, 08:55 PM



User(s) browsing this thread: 2 Guest(s)