Mathematics of Series with the Symbolic Computing Package

Youngjoo Chung, GIST

Join the Conversation #WolframTechConf

Overview

Introduction of the Symbolic Computing (SC) Package

Overview
  Brief History

Functions for Series

Kernel and Package Functions

Examples

Evaluation of the Definite Integral (∫_0^1)(x^x)dx
  Evaluation of the Residue (∮_C)z (e^(1/sin z))dz
  Evaluation of the Fourier Series (∑_(n=1)^∞)(((((-1))^n)cos(n π t))/(n^2)) 
  Approximate Solution of the Nonlinear ODE y''=(y^2)+x
  Asymptotic Behavior of Airy Functions Ai(z) and Bi(z)

Symbolic Computing (SC) Package

Keywords

Mathematical Calculation

Computer-Aided Mathematics

Symbolic and Algebraic Computation

Symbolic Computing (SC) Package

Overview

Mathematica add-on package that facilitates symbolic computation with mathematical expressions
Over 800 functions and own programming language
Display and interpretation of various mathematical expressions like derivatives, integrals, sums, vector operators, brakets, etc. using the traditional notation

Author

Youngjoo Chung
Professor
School of Information and Communications
Gwangju Institute of Science and Technology (GIST), Korea
E-mail: ychung@gist.ac.kr

Motivation

To design and implement a symbolic computing system based on Mathematica that can manipulate various mathematical expressions using traditional notation and deferred on-demand evaluation

Objective

To replace hand-written calculation with symbolic computation and software-based automation

Features

Allows traditional notation for various mathematical expressions
Algebraic manipulation of formulas using symbolic computation
Seamless integration with the computing environment of Mathematica
Powerful platform for streamlined manipulation of mathematical expressions

Traditional Notation

Allows manipulation of mathematical expressions involving derivatives, integrals, sums, products, vector operators, and so on. These and other notations can be entered using the Symbolic Computing palette.

SCDerivExpand[(∂/(∂x))((f+Sin[g])/h),{f,g,h}]

SCTransDeriv[(((∂^2)f)/(∂(x^2))),TransVar->{{x,t},{ξ,η}}]//Expand

SCMergeInts[∫f\[DifferentialD]x+∫∫g\[DifferentialD]y\[DifferentialD]x]

SCVecExpand[∇\[Cross]((OverVector[A])∇.(f (OverVector[B]))),{(OverVector[A]),(OverVector[B]),f}]

Sequential Execution of Functions

SCMAF function and navigation using the SCMAF Viewer palette

(∫_(-∞)^∞)(1/((a^2)+(x^2)))\[DifferentialD]x
SCMAF[%,SCTransInt,{All,TransVar->{x,t,x==a Tan[t]}},Apply->{SCFactorInt,PowerExpand,Simplify},
SCEvalInt,All]

Extended Composition of Functions

Seamless integration with the computing environment of Mathematica
Selective targeting of the objects to apply functions

x(x-1)y''+(3x-1)y'+y==0
SCMAF[%,RA,{At[1],y==(∑_(m=0)^∞)(Subscript[a, m])(x^(m+r))},Apply->{SCSumShiftVar,{(∑_(m=0)^∞)(x^(-1+m))f_,{m,1}},SCInSum,SCDivide->(x^r),SCFactorSum,Expand,SCEvalDeriv->Prime->x},
SCSumChangeLimits,{At[1],{m,0,∞}},Apply->{Simplify,SCMergeSums,Expand}]

Advantages

Close emulation of hand-written calculation
Allows focusing on concepts and principles rather than tedious, boring, time-consuming and error-prone hand-written calculation
Good readability, enhanced speed and accuracy, and minimization of human errors during calculation
Expressions that closely resemble the traditional mathematical style, e.g., subscripts, derivatives and vector operators

Brief History

2002. 04: Development started as MiscAlgebra Package (MP)
2007. 11: Presented at the First Korean Mathematica Users Conference
2011. 08: Renamed to Symbolic Computing (SC) Package
2011. 10: Presented at Wolfram Technology Conference 2011
2012. 02: Version 1.0 beta release after the lecture at Mathematics Dept of Korea University
2012. 04: Version 2.0 beta
2014. 12: Version 3.0 beta
2015. 10: Version 3.1 beta
2016. 06: Version 4.0 beta
2017. 11: Version 4.1 commercial release to come

Help for the Symbolic Computing Package

The on-line help for the package is available. It contains documentation of the package functions and examples of the usage of the functions.
The help browser can be opened by clicking Help in the “Symbolic Computing” palette (Palettes menu -> Symbolic Computing). The Help link is also available in the “SCMAF Viewer” palette.

Functions for Series

Kernel and Package Functions

Kernel functions associated with series

?System`Series*

?System`Fourier*Series

Series expands an expression into a power series.

Series[(1/(1+x+y)),{x,0,2},{y,0,2}]
%//Normal//Expand

5th order Fourier trigonometric series of t

FourierTrigSeries[t,t,5]

SC package functions associated with series

?SymbolicComputing`*Series*

List of the package functions associated with Fourier analysis

?SymbolicComputing`*Fourier*

SCTaylorSeries expands an expression into a power series using Taylor expansion up to the specified order for all variables.

SCTaylorSeries[(1/(1+x+y)),{x,y},2]

SCPowerSeries gives an infinite series.

SCAFE[(1/(1+x+y)),SCPowerSeries,{All,n,Assumptions->\[LeftBracketingBar]x+y\[RightBracketingBar]<1}]
SCMAF[%,SCBinomialSeries,{(((x+y))^n),{x,y},k},SCCombSums->At[2],RA->((n!)/(k! (-k+n)!))==(({{n}, {k}}))]

SCPowerSeries supports the following functions:

(e^x), (e^x)(1+x), (a^x), (a^x)(1+x), x/((e^x)-1), x (e^(s x))/((e^x)-1), (Sqrt[1±x]), (Sqrt[-1±x]), 1/(Sqrt[1±x]), 1/(Sqrt[-1±x]), (((1±x))^α) (α non-integer or negative), (((-1±x))^α) (α non-integer or negative), AiryAi, AiryBi, ArcCos, ArcCosh, ArcCosh[1+x], ArcCot, ArcCoth, ArcCoth[1+x], ArcCsc, ArcCsch, ArcSec, ArcSech, ArcSin, ArcSin^2, ArcSinh, ArcTan, ArcTan[1+x], ArcTanh, BesselI, BesselJ, BesselK, BesselY, ChebyshevT, ChebyshevU, Cos, Cos^2, Cos^3, Cosh, CosIntegral, Cot, Coth, Csc, Csch, Erf, Erfc, Erfi, ExpIntegralE[n,x], ExpIntegralEi, Gamma[a,x], HankelH1, HankelH2, HermiteH, Hypergeometric0F1, Hypergeometric1F1, Hypergeometric2F1, HypergeometricPFQ, HypergeometricU, LaguerreL, LegendreP, Log[1+x], Log[(1+x)/(1-x)], ProductLog, Sec, Sech, Sin, Sin^2, Sin^3, Sinh, SinIntegral, SphericalBesselJ, SphericalBesselY, SphericalHankelH1, SphericalHankelH2, Tan, Tanh

Example: The Lagrange’s equations for circular pendulum

– Ref. Greenwood, “Classical Dynamics,” Chapter 2

The Lagrangian L

({{L=T-V}, {=(1/2) m (r^2) ((3+2 cos ϕ) ((OverDot[θ])^2)+2 (1+cos ϕ) (OverDot[θ]) (OverDot[ϕ])+((OverDot[ϕ])^2))+m g r (2 cos θ+cos(θ+ϕ))}})

Lagrange’s equations of motion for θ and ϕ

(d/(dt))((∂L)/(∂(OverDot[θ])))-((∂L)/(∂θ))=0,(d/(dt))((∂L)/(∂(OverDot[ϕ])))-((∂L)/(∂ϕ))=0

{(\[DifferentialD]/(\[DifferentialD]t))((∂L)/(∂(OverDot[θ])))-((∂L)/(∂θ))==0,(\[DifferentialD]/(\[DifferentialD]t))((∂L)/(∂(OverDot[ϕ])))-((∂L)/(∂ϕ))==0}
SCMAF[%,SCDerivExpand,{All,L==(1/2) m (r^2) ((3+2 Cos[ϕ]) ((OverDot[θ])^2)+2 (1+Cos[ϕ]) (OverDot[θ]) (OverDot[ϕ])+((OverDot[ϕ])^2))+m g r (2 Cos[θ]+Cos[θ+ϕ])},
SCDivide,{At[_,1],m r},
Simplify,At[_,1],Apply->Expand,,,
Collect,{{At[_,1],g,Factor},{_. (Overscript[θ, ¨])+_,{(Overscript[θ, ¨]),(Overscript[ϕ, ¨])}}},Comment->"The full nonlinear equations",
SCTaylorSeries,{At[_,1],{θ,(OverDot[θ]),(Overscript[θ, ¨]),ϕ,(OverDot[ϕ]),(Overscript[ϕ, ¨])}},SCSolve->{All,{(Overscript[θ, ¨]),(Overscript[ϕ, ¨])},Apply->Expand},Comment->"For small amplitude oscillation,", 
SCEqsMatForm,{All,{θ,ϕ},Factor->-(g/r)}]

Analytical solution for small amplitude oscillation

Numerical solution with no approximations and varying initial conditions for θ(0) and ϕ(0).

Examples

Evaluation of the Definite Integral (∫_0^1)(x^x)dx

Ref. Quora

Plot of y=(x^x) (0≤x≤1)

Plot[(x^x),{x ,0,1},AxesLabel->{"x","y"},PlotRange->{0,Automatic}]

Direct integration does not work.

SCEvalInt[(∫_0^1)(x^x)\[DifferentialD]x]

Expand into a power series.

SCARA[(∫_0^1)(x^x)\[DifferentialD]x,(x^x)==(E^(x ln[x]))]
SCMAF[%,SCPowerSeries,{(E^(x ln[x])),n},RA->ln->Log,Apply->PowerExpand,
SCIntInSum,At[2],Apply->SCFactorInt,
SCTransInt,{At[2],TransVar->{x,t,t==-Log[x]}},Apply->{SCFactorExp->-t,SCFactorInt,PowerExpand},
SCTransInt,{At[2],TransVar->{t,s,t==(s/(1+n)),Assumptions->n≥0}},Apply->{SCFactorInt,PowerExpand},
RA,{At[2],(∫_0^∞)(E^(-s)) (s^n)\[DifferentialD]s==n!},
SCSumShiftVar,{At[2],{n,-1}},
SCEvalNSum,At[2]]

This series converges rapidly.

N@Table[(((-1))^(-1+n)) (n^(-n)),{n,1,10}]

Check using numerical integration.

SCAFE[(∫_0^1)(x^x)\[DifferentialD]x,SCEvalNInt,All]

Evaluation of the Residue (1/(2π i))(∮_C)z (e^(1/sin z))dz

Ref. Mathews and Walker, “Mathematical Methods of Physics,” Appendix A-2

Definition of the residue (Subscript[b, 1])

(Subscript[b, 1])=(1/(2π i))(∮_C)z (e^(1/sin z))dz

The contour C is a small circle around the origin inside which there are no other singularities.

Essential (isolated) singularies are at z=n π, (n=0,±1,±2,⋯).

Module[{colors=ColorData[97,"ColorList"],f},
f[z_]=z (E^(1/Sin[z]));
Show[ContourPlot[Re[f[x+I y]],{x,-8,8},{y,-8,8},ContourShading->False,ContourStyle->{{Thickness[0.005],colors[[1]]}},Contours->11,FrameTicks->{π Range[-4,4],Automatic},FrameLabel->{x,y,"z (E^(1/Sin[z]))"},PlotLegends->{"Re[z (E^(1/Sin[z]))]"}],
ContourPlot[Im[f[x+I y]],{x,-8,8},{y,-8,8},ContourShading->False,ContourStyle->{{Thickness[0.005],colors[[2]]}},Contours->11,PlotLegends->{"Im[z (E^(1/Sin[z]))]"}],
Graphics[{PointSize[0.02],Point[Table[{n π,0},{n,-2,2}]]}]]]

The Residue function does not give the result.

(Subscript[b, 1])==Residue[z (E^(1/Sin[z])),{z,0}]

Using the definition of the residue (Subscript[b, 1]) and using the variable transformation w=sin z, we obtain

(Subscript[b, 1])==(1/(2π I))(∮_C)z (E^(1/Sin[z]))\[DifferentialD]z
SCMAF[%,SCTransInt,{At[2],TransVar->{z,w,z==ArcSin[w]},ReplVar->{w,C,}},,
SCPowerSeries,{At[2],n,Assumptions->\[LeftBracketingBar]w\[RightBracketingBar]<1},Apply->PowerExpand,
SCCombSums,{At[2],ReplVar->{n,p,q}},Apply->{SCFactorInt,SCIntInSum},,
RA,{At[2],(∮_C)(w^(n_))\[DifferentialD]w==2π I (Subscript[δ, n+1])},
SCEvalSumDelta,{At[2],q},RA->UnitStep[_]==1,Apply->{SCFactorExp->-2,SCInSum}]

The sum on the right side can be evaluated to a closed form by using the transformation n+p->n.

(Subscript[b, 1])==(∑_(n=0)^∞)(∑_(p=0)^∞)(((2^(-2 (n+p))) (2 n)! (2 p)!)/((1+2 n) (((n!))^2) (((p!))^2) (2 (1+n+p))!))
SCMAF[%,SCSumConvertMult,{At[2],n},Apply->{SCInSum,Expand,2 _},,
SCEvalSum,{At[2],p},Apply->Simplify,
SCEvalSum,At[2],
N,At[2]]

Verify using numerical evaluation of the contour integral with a unit circle centered at z=0.

(Subscript[b, 1])==(1/(2π I))(∮_C)z (E^(1/Sin[z]))\[DifferentialD]z
SCMAF[%,SCTransInt,{At[2],TransVar->{z,θ,z==(E^(I θ))},ReplVar->{θ,0,2π}},
SCEvalNInt,At[2],Apply->Chop]

Evaluation of the Fourier Series (∑_(n=1)^∞)(((((-1))^n)cos(n π t))/(n^2))

Let

f(t)=(∑_(n=1)^∞)(( (((-1))^n)cos(n π t))/(n^2))

Plot of f(t) with various number of terms (1≤n≤N)

Manipulate[
Module[{f,t},
f[t_]:=Sum[(( (((-1))^n)Cos[n π t])/(n^2)),{n,1,N1}];
Plot[f[t],{t,-4,4},AxesLabel->{"t","f(t)"},PlotRange->{-1.1,1.8}]],
{{N1,1,"N"},{1,5,10,20}}]

The sum can be evaluated to closed form using Sum directly.

f[t]==(∑_(n=1)^∞)(((((-1))^n)Cos[n π t])/(n^2))
SCMAF[%,SCEvalSum,At[2],
FunctionExpand,At[2],Apply->{Simplify,PowerExpand,SCExpToTrigHalf}]

FunctionExpand was used to convert PolyLog and further manipulation was needed to arrive at the final simple polynomial form.

Alternatively, we will resort to the method of Fourier series to derive the closed-form expression. Since f(t) is even and periodic with the period 2, we need to specify the function in the interval 0<t<1 only. The values of f(0) and f(1) are

f[t]==(∑_(n=1)^∞)(((((-1))^n)Cos[n π t])/(n^2))
SCMAF[%,RA,{All,{{t==0},{t==1}}},RA->Cos[n π]==(((-1))^(-n)),
SCEvalSum,All]

The differential equation satisfied by f(t) is

SCARA[(((\[DifferentialD]^2)f)/(\[DifferentialD](t^2))),f[t]==(∑_(n=1)^∞)(((((-1))^n)Cos[n π t])/(n^2)),Apply->{SCFactorSum,SCEvalDeriv}]
SCMAF[%,SCSumChangeLimits,{At[2],{n,0,∞}},RA->(((-1))^n) Cos[x_]==Cos[x+n π],
SCFourierSeriesToDiracDelta,{At[2],n,k,t,Positive->True}]

where δ is Dirac delta function. This result indicates that (((d^2)f)/(d(t^2)))=((π^2)/2) in the interval 0<t<1 and ((df)/(dt)) is discontinuous at t=2k-1  (k=0,±1,±2,…). Therefore, we have

(((\[DifferentialD]^2)f)/(\[DifferentialD](t^2)))==((π^2)/2)
SCMAF[%,SCDSolve,{All,{f[0]==-((π^2)/12),f[1]==((π^2)/6)},f[t],t,Apply->Simplify}]

0<t<1. For other values of t, we use the periodicity of 2 and even parity of f(t), i.e. f(-t)=f(t).

Plot of f(t) with the closed form expression

Module[{f,g,t},
f[t_?(0<#<1&)]=(1/12) (π^2) (-1+3 (t^2));
f[t_?(#<0&)]:=f[-t];
f[t_?(#>1&)]:=f[Mod[t,2,-1]];
Plot[f[t],{t,-4,4},AxesLabel->{"t","f(t)"}]]

Approximate Solution of the Nonlinear ODE y''=(y^2)+x

Ref. Bender and Orszag, “Advanced Mathematical Methods for Scientists and Engineers,” Chap 4

The leading behavior of the solution is (derivation is skipped)

y(x)~(6/(((x-a))^2))

where a is the location of the movable singularity (2nd order pole).

The Laurent series for x sufficiently close to x=a is then assumed:

y(x)=(6/(((x-a))^2))+(∑_(n=-1)^∞)(Subscript[a, n])(((x-a))^n)

Substitution in the differential equation gives

y''==(y^2)+x
SCMAF[%,RA,{All,y[x]==(6/(((x-a))^2))+(∑_(n=-1)^∞)(Subscript[a, n])(((x-a))^n)},Apply->{Expand,SCEqMerge,SCEvalDeriv->Prime->x},
SCCombSums,{At[1],ReplVar->{n,p}},
SCSumConvertMult,{At[1],n,Shift->-1},Apply->SCInSum,
SCSumShiftVar,{SCSum[(((-a+x))^(n+s_))f_,__],{n,-s}},
SCMoveTerm,{All,x},SCSubtFromEq->a,
SCSumChangeLimits,{At[1],{n,2,∞}},
Expand,At[1],Hold->x-a,
SCCollectPoly,{All,-a+x,Coefficient->True,Apply->Expand},Hold->x-a,Apply->Thread,
SCMergeSums,{All,Apply->{Factor,-10+3 n+(n^2),SCFactor->(((-a+x))^n),SCFactorSum,Simplify}},,
RA,{At[_,1],SCSum[__]->0},
SCSolve,{All,{(Subscript[a, -1]),(Subscript[a, 0]),(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])}}]

and

-(∑_(p=-1)^(1+n))(Subscript[a, n-p]) (Subscript[a, p])+(-2+n) (5+n) (Subscript[a, 2+n])==0

n≥2 or

-(∑_(p=-1)^(1+n))(Subscript[a, n-p]) (Subscript[a, p])+(-2+n) (5+n) (Subscript[a, 2+n])==0;
SCMAF[%,RA,{All,n==n-2},SCEqMove->(-4+n) (3+n) (Subscript[a, n])]

n≥4. For n=4, the equation is always satisfied:

(-4+n) (3+n) (Subscript[a, n])==(∑_(p=-1)^(-1+n))(Subscript[a, -2+n-p]) (Subscript[a, p])
SCMAF[%,RA,{All,n==4},Apply->SCEvalSum,
RA,{All,{(Subscript[a, -1])==0,(Subscript[a, 0])==0,(Subscript[a, 1])==0,(Subscript[a, 2])==-(a/10),(Subscript[a, 3])==-(1/6)}}]

and therefore, c=(Subscript[a, 4]) is arbitrary. The recursion relation for n≥5 is

(-4+n) (3+n) (Subscript[a, n])==(∑_(p=-1)^(-1+n))(Subscript[a, -2+n-p]) (Subscript[a, p])
SCMAF[%,SCSolve,{All,(Subscript[a, n])}]

Generate the coefficients for n≤10.

Module[{avals,nlim=10},
a[-1]=a[0]=a[1]=0;
a[2]=-(a/10);
a[3]=-(1/6);
a[4]=c;
a[n_?(#≥5&)]:=a[n]=(1/((-4+n) (3+n)))Sum[a[-2+n-p] a[p],{p,-1,-1+n}];
avals=Expand[Table[a[n],{n,-1,nlim}]];
Table[(Subscript[a, n]),{n,-1,nlim}]==avals//Thread]

c is an arbitrary constant and a is the location of the movable 2nd order pole. These are the two constants determined by the boundary conditions.

Plot of the series solution with terms n≤100 and a and c as parameters

Manipulate[
Module[{ac,nlim=100,x,y},
ac[-1]=ac[0]=ac[1]=0;
ac[2]=-(a/10);
ac[3]=-(1/6);
ac[4]=c;
ac[n_?(#≥5&)]:=ac[n]=(1/((-4+n) (3+n)))Sum[ac[-2+n-p] ac[p],{p,-1,-1+n}];
y[x_]:=(6/(((x-a))^2))+Sum[ac[n](((x-a))^n),{n,-1,nlim}];
Plot[y[x],{x,-10,10},PlotRange->{-5,10}]],
{{a,4},0,5},
{c,-10,10}]

Plot of the numerical solution with y(0) and y'(0) as parameters

Off[NDSolveValue::ndsz,InterpolatingFunction::dmval]

Manipulate[
Module[{ysol},
ysol=NDSolveValue[{y''[x]==((y[x])^2)+x,y[0]==y0,y'[0]==yp0},y,{x,-10,10}];
Plot[ysol[x],{x,-10,10},PlotRange->{-5,10}]],
{{y0,0,"y(0)"},-10,10},
{{yp0,0,"y'(0)"},-10,10}]

On[NDSolveValue::ndsz]

Asymptotic Behavior of Airy Functions Ai(z) and Bi(z)

The Airy equation

y''-x y=0

Integral representation of the Airy function Ai(z)

Ai(z)=(1/(2π))(∫_(-∞)^∞)(e^(i(((t^3)/3)+t z)))dt

The asymptotic expression for Ai(z) for large |z| can be derived using the above formula. The asymptotic expression for Bi(z) can be obtained in a similar manner.

For z>0, the stationary points are

D[((t^3)/3)+t z,t]==0
SCMAF[%,SCSolve,{All,t}]

The contour of integration along the real axis is deformed to go through t=i (Sqrt[z]) in the horizontal direction. The other stationary point t=-i(Sqrt[z]) cannot be used. The result is

AiryAi[z]==(1/(2π))(∫_(-∞)^∞)(E^(I(((t^3)/3)+t z)))\[DifferentialD]t
SCMAF[%,SCTaylorSeries,{((t^3)/3)+t z,t-I(Sqrt[z]),2,Variables->t},Head->Tilde,
SCExpandExp,At[2],HoldVar->t+_,Apply->SCFactorInt,
SCTransInt,{At[2],TransVar->{t,s,s==(z^(1/4))(t-I(Sqrt[z]))},ReplVar->{s,-∞,∞},Apply->Simplify},Apply->SCFactorInt,
SCEvalInt,All,ConditionalExpression->\[LeftBracketingBar]Arg[z]\[RightBracketingBar]<π]

For z<0, the stationary points are

D[((t^3)/3)+t z,t]==0
SCMAF[%,SCSolve,{All,t},SCChangeArg->{z,π}]

The contour of integration along the real axis picks up contributions from both stationary points t=±(Sqrt[-z]). The result is

AiryAi[z]==(1/(2 π)) (∫_(-∞)^∞)(E^(I (((t^3)/3)+t z)))\[DifferentialD]t
SCMAF[%,SCIntChangeInterval,{At[2],{t,{(Subscript[C, 1]),},{(Subscript[C, 2]),}}},
SCTaylorSeries,{{((t^3)/3)+t z,t+(Sqrt[-z]),2,Variables->t},Target->(∫_(Subscript[C, 1]))(E^(I (((t^3)/3)+t z)))\[DifferentialD]t,{((t^3)/3)+t z,t-(Sqrt[-z]),2,Variables->t},Target->(∫_(Subscript[C, 2]))(E^(I (((t^3)/3)+t z)))\[DifferentialD]t},Head->Tilde,
SCExpandExp,At[2],HoldVar->t+_,Apply->{SCChangeArg->{z,π},SCFactorInt},
SCTransInt,{{(∫_(Subscript[C, 1]))(E^(-I (((t+(Sqrt[-z])))^2) (Sqrt[-z])))\[DifferentialD]t,TransVar->{t,s,s==(E^(π I/4))(((-z))^(1/4))(t+(Sqrt[-z]))},ReplVar->{s,-∞,∞},Apply->Simplify},{(∫_(Subscript[C, 2]))(E^(I (((t-(Sqrt[-z])))^2) (Sqrt[-z])))\[DifferentialD]t,TransVar->{t,s,s==(E^(-π I/4))(((-z))^(1/4))(t-(Sqrt[-z]))},ReplVar->{s,-∞,∞},Apply->Simplify}},Apply->SCFactorInt,
SCEvalInt,At[2],
SCComplexToExp,(1+I|1-I),ExpToTrig->At[2],
RA,{At[2],Cos[z_]:>Sin[(π/2)-z]},SCChangeArg->{z,π},ConditionalExpression->{All,z<0}]

SCAsympSeries returns the same result for a single term.

SCAFE[{AiryAi[z],AiryBi[z]},SCAsympSeries,All]//Thread

The full asymptotic expansions are:

SCAFE[{AiryAi[z],AiryBi[z]},SCAsympSeries,{All,n}]//Thread

SCAsympSeries supports the following functions:

AiryAi, AiryBi, BesselI, BesselJ, BesselK, BesselY, CosIntegral, Erf, Erfc, Erfi, ExpIntegralE, ExpIntegralEi, FresnelC, FresnelS, Gamma[a,x], HankelH1, HankelH2, Hypergeometric1F1, HypergeometricU, ParabolicCylinderD, SinIntegral, SphericalBesselJ, SphericalBesselY, SphericalHankelH1, SphericalHankelH2

Plots of the Airy functions and the asymptotic expansions with various number of terms. Notice that the error for small x increases while the error for large x decreases as more terms are included, which is a typical behavior of asymptotic expansions.

Manipulate[
Module[{Ai,x,z},
Ai[z_]=SCAsympSeries[AiryAi[z],N1];
Grid[{{Plot[{AiryAi[x],Ai[x]},{x,-10,4},AxesLabel->{"x","Ai(x)"},PlotRange->{-0.5,1.5},PlotLegends->Placed[{"Exact","Asymptotic"},{0.4,0.8}],ImageSize->300],
Plot[Ai[x]-AiryAi[x],{x,-10,4},AxesLabel->{"x","Error (Ai)"},PlotRange->{-0.002,0.002},ImageSize->300]}}]],
{{N1,1,"N"},{1,2,3,5}}]

Manipulate[
Module[{Bi,x,z},
Bi[z_]=SCAsympSeries[AiryBi[z],N1];
Grid[{{Plot[{AiryBi[x],Bi[x]},{x,-10,4},AxesLabel->{"x","Bi(x)"},PlotRange->{-1,4},PlotLegends->Placed[{"Exact","Asymptotic"},{0.4,0.8}],ImageSize->300],
Plot[Bi[x]-AiryBi[x],{x,-10,4},AxesLabel->{"x","Error (Bi)"},PlotRange->{-0.002,0.002},ImageSize->300]}}]],
{{N1,1,"N"},{1,2,3,5}}]

Thank You for the Attention.