New Numerical Features That Have Been Added to Maple V for Release 4
Special functions:
Differential Equations:
Linear Algebra:
Numerical Approximation of Functions
Statistics:
Financial Calculations
Miscellaneous:
Arbitrary precision evaluation, over the complex plane, of a wider range of special functions, including Elliptic and Inverse Elliptic, family of Bessel functions.
Bessel family: AiryAi, AiryBi, BesselI, BesselJ, BesselK, BesselY, HankelH1, HankelH2, KelvinBer, KelvinBei, KelvinKer, KelvinKei, KelvinHer, KelvinHei, StruveH, StruveL, AngerJ, WeberE:
z:=evalf(1+2/3*I):
AiryAi(z), AiryBi(z);
0.1037571496−0.1044950325⁢I,0.9630190393+0.5220371079⁢I
.1037571496 - .1044950325 I, .9630190393 + .5220371079 I
nu:=evalf(2/3+4/5*I):
BesselI(nu,z), BesselJ(nu,z), BesselK(nu,z), BesselY(nu,z);
0.7244935146−0.06234310868⁢I,0.5109964553−0.1847149940⁢I,0.3598077053−0.2438873156⁢I,−0.5709515960−0.0002188584214⁢I
.7244935146 - .06234310868 I, .5109964553 - .1847149940 I,
.3598077053 - .2438873156 I,
-.5709515960 - .0002188584214 I
HankelH1(nu,z), HankelH2(nu,z);
0.5112153138−0.7556665900⁢I,0.5107775969+0.3862366020⁢I
.5112153138 - .7556665900 I, .5107775969 + .3862366020 I
KelvinBer(nu,z), KelvinBei(nu,z), KelvinKer(nu,z), KelvinKei(nu,z), KelvinHer(nu,z), KelvinHei(nu,z);
−0.8089166307−2.183698556⁢I,2.267853794−0.8137995614⁢I,−1.776971141−0.9961751070⁢I,−1.078568331+1.766448520⁢I,−0.6866379254+1.124556055⁢I,1.131254963+0.6341847698⁢I
-.8089166307 - 2.183698556 I, 2.267853794 - .8137995614 I,
-1.776971141 - .9961751070 I,
-1.078568331 + 1.766448520 I,
-.6866379254 + 1.124556055 I,
1.131254963 + .6341847698 I
StruveH(nu,z), StruveL(nu,z);
0.3106257308+0.01505583261⁢I,0.3511670099+0.07163120875⁢I
.3106257308 + .01505583261 I, .3511670099 + .07163120875 I
AngerJ(nu,z), WeberE(nu,z);
0.8531469480−0.9735866595⁢I,0.9933652429+0.3464383081⁢I
.8531469480 - .9735866595 I, .9933652429 + .3464383081 I
FresnelC, FresnelS:
FresnelC(z),FresnelS(z);
1.682212498+0.4016272750⁢I,0.07110045108+1.175585852⁢I
1.682212498 + .4016272750 I, .07110045109 + 1.175585852 I
dawson:
dawson(z);
0.7494749046−0.1808917014⁢I
.7494749046 - .1808917014 I
Elliptic and Inverse Elliptic: EllipticK, EllipticE, EllipticPi, EllipticF, EllipticE, EllipticPi, EllipticCK, EllipticCE, EllipticCPi, EllipticNome
k:=-0.1+2.3*I:
Complete elliptic integrals of the first, second and third kind:
EllipticK(k),EllipticE(k),EllipticPi(nu,k);
0.9413942917−0.02100700736⁢I,2.883535667+0.08445357415⁢I,0.9032179896+0.4174342314⁢I
.9413942917 - .02100700736 I, 2.883535667 + .08445357415 I,
.9032179896 + .4174342314 I
Incomplete elliptic integrals of the first, second and third kind:
EllipticF(z,k),EllipticE(z,k),EllipticPi(z,nu,k);
0.7242068410+0.3592870858⁢I,0.4926925228+1.780640518⁢I,0.5430830974+0.4039826151⁢I
.7242068410 + .3592870858 I, .4926925228 + 1.780640518 I,
.5430830974 + .4039826151 I
Complementary complete elliptic integrals of the first, second and third kind:
EllipticCK(k),EllipticCE(k),EllipticCPi(nu,k);
0.6737225716+0.9153170422⁢I,0.4248129606−1.954337561⁢I,0.1660202658+0.9486420664⁢I
.6317085569 - .9674715411 I, .2138917976 + 1.929945189 I,
EllipticCPi(.6666666667 + .8000000000 I, -.1 + 2.3 I)
Elliptic Nome:
q:=EllipticNome(k);
q≔−0.1130622230−0.004343557919⁢I
q := -.1130622230 - .004343557919 I
Jacobi Amplitude and Elliptic functions: JacobiAM, JacobiSN, JacobiCN, JacobiDN, JacobiNS, JacobiNC, JacobiND, JacobiSC, JacobiCS, JacobiSD, JacobiDS, JacobiCD, JacobiDC
JacobiAM(z,k);
4.005054544+2.900860234⁢I
-.1157677377 + .03628288589 I
JacobiSN(z,k), JacobiCN(z,k), JacobiDN(z,k);
−6.933891559−5.892090470⁢I,−5.927814364+6.892104554⁢I,−15.37625018−14.22897650⁢I
-.1155853604 + .03604793064 I,
.9939602854 + .004191931060 I,
-.9896343559 + .001229140163 I
JacobiNS(z,k), JacobiNC(z,k), JacobiND(z,k);
−0.08374711996+0.07116430985⁢I,−0.07173049406−0.08339904633⁢I,−0.03503417853+0.03242016078⁢I
-7.884711038 - 2.459026953 I, 1.006058520 - .004242954191 I,
-1.010472657 - .001255021634 I
JacobiSC(z,k), JacobiCS(z,k);
0.005976741231+1.000922504⁢I,0.005965516634−0.9990427250⁢I
-.1161326869 + .03675675114 I, -7.826781562 - 2.477227297 I
JacobiSD(z,k), JacobiDS(z,k);
0.4339457152−0.01837332974⁢I,2.300311961+0.09739556973⁢I
.1168410872 - .03628038614 I, 7.806003418 + 2.423846140 I
JacobiCD(z,k), JacobiDC(z,k);
−0.01576703103−0.4336399162⁢I,−0.08373704817+2.303016116⁢I
-1.004364430 - .005483273379 I,
-.9956248604 + .005435560172 I
Jacobi Theta Functions: JacobiTheta1, JacobiTheta2, JacobiTheta3, JacobiTheta4
JacobiTheta1(z,q), JacobiTheta2(z,q), JacobiTheta3(z,q), JacobiTheta4(z,q);
1.200435806−0.4743634443⁢I,0.01315436257−1.009987991⁢I,1.175151117+0.3717688091⁢I,0.8212434355−0.3687317775⁢I
1.200435806 - .4743634442 I, .01315436282 - 1.009987991 I,
1.175151117 + .3717688097 I,
.8212434354 - .3687317774 I
Weierstrass P, P', zeta and sigma functions: WeierstrassP, WeierstrassPPrime, WeierstrassZeta, WeierstrassSigma
g2:=-0.11-0.7*I: g3:=0.22-0.4*I:
WeierstrassP(z,g2,g3), WeierstrassPPrime(z,g2,g3), WeierstrassZeta(z,g2,g3), WeierstrassSigma(z,g2,g3);
0.3204287896−0.6325222283⁢I,0.3493485146+1.127304155⁢I,0.6741545530−0.4702886987⁢I,0.9993746770+0.6595322141⁢I
.4087407191 + .1175456787 I, .3493485143 + 1.127304153 I,
.6741545534 - .4702886991 I,
.9993746759 + .6595322132 I
General Pochhammer function over the complex plane: pochhammer
pochhammer(1.0+0.2*I,-0.3+0.7*I);
0.5216047723−0.3157393579⁢I
.5216047723 - .3157393579 I
Many extensions to dsolve/numeric extending Maple's power in developing numerical solutions to differential equations.
Classical: dsolve[classical]
restart;
deq1 := diff(y(t),t$3)=y(t)+diff(x(t),t),diff(x(t),t$2)= x(t)*y(t)-diff(y(t), t$2):
init1 := y(0)=1,D(y)(0)=2,(D@@2)(y)(0)=-1,x(0)=4,D(x)(0)=4.3:
ans1 := dsolve({deq1,init1},{x(t),y(t)},numeric,method=classical[abmoulton], corrections=2):
ans1(1.0);
t=1.0,x⁡t=13.1246093792716,ⅆⅆtx⁡t=18.7876915350014,y⁡t=3.76283413230601,ⅆⅆty⁡t=5.31760397608216,ⅆ2ⅆt2y⁡t=10.2504683623596
[t = 1.0, x(t) = 13.1246093794391730,
d
-- x(t) = 18.7876915356564993,
dt
y(t) = 3.76283413231971675,
-- y(t) = 5.31760397612483793,
2
--- y(t) = 10.2504683625320059]
Gear: dsolve[gear] - a C.W.Gear single-step extrapolation method.
Digits := 10:
deq1 := {diff(y(x), x$3) = y(x)*diff(y(x), x)-x}:
init1 := {(D@@2)(y)(1) = 4, D(y)(1) = 3, y(1) = 2.4 }:
ans1 := dsolve(deq1 union init1, y(x), type=numeric, method=gear[polyextr], stepsize=0.015, minstep=Float(1,-11), errorper=Float(1,-5)):
ans1(1.01);
x=1.01,y⁡x=2.43020104070930,ⅆⅆxy⁡x=3.04031295467142,ⅆ2ⅆx2y⁡x=4.06288854913227
[x = 1.01, y(x) = 2.43020104070929621,
-- y(x) = 3.04031295467141982,
dx
--- y(x) = 4.06288854913227304]
Mgear: dsolve[mgear] - a C.W.Gear multiple-step extrapolation method.
Digits := 12:
deq3 := diff(y(t), t$2) = 100*(exp(-10*t)+exp(10*t)):
ans3 := dsolve({deq3}, y(t), numeric, method=mgear[msteppart], initial=array([2,0]), start=0):
Error, (in dsolve/numeric) the 'mgear' method has been removed, please use 'rosenbrock' or 'lsode' instead
ans3(0.7653);
ans3⁡0.7653
[t = .7653, y(t) = 2106.95826948761987,
-- y(t) = 21069.5691650687149]
Lsode: dsolve[lsode] - the "Livermore Stiff ODE Solver"
deq1 := {diff(y(x), x$3) = y(x)*diff(y(x), x) - x }:
init1 := { (D@@2)(y)(1) = 4, D(y)(1) = 3, y(1) = 2.4 }:
ans1 := dsolve(deq1 union init1, y(x), type=numeric, method=lsode[adamsfull]):
ans1(1.5);
x=1.5,y⁡x=4.59316878380163,ⅆⅆxy⁡x=6.33685490613476,ⅆ2ⅆx2y⁡x=11.0436021501495
[x = 1.5, y(x) = 4.59316878380162308,
-- y(x) = 6.33685490613474300,
--- y(x) = 11.0436021501494359]
Numerical computations for matrix-decomposition routines: linalg[cholesky], linalg[QRdecomp], linalg[LUdecomp]
with(linalg):
A := matrix([[1.,2.,3.],[4.,5.,6.]]):
R := QRdecomp(A,Q='q',rank='r');
R≔4.123105625617665.335783750799336.548461875980990.0.7276068751089991.45521375021800
eval(q);
0.2425356250363330.9701425001453320.970142500145332−0.242535625036333
r;
linalg[eigenvals], linalg[inverse]: use hardware floating-point when possible.
numapprox[chebmult]: Tools to manipulate Chebyshev series:
with(numapprox): Digits:=3:
a:=chebyshev(sin(x),x):
b:=chebyshev(exp(x),x):
chebmult(a,b);
0.496⁢T⁡0,x+1.22⁢T⁡1,x+0.494⁢T⁡2,x+0.0718⁢T⁡3,x−0.00212⁢T⁡4,x−0.00227⁢T⁡5,x−0.000344⁢T⁡6,x−0.0000390⁢T⁡7,x+5.×10−7⁢T⁡8,x+1.37×10−6⁢T⁡9,x+1.36×10−7⁢T⁡10,x
.496 T(0, x) + 1.22 T(1, x) + .494 T(2, x) + .0728 T(3, x)
- .00212 T(4, x) - .00227 T(5, x) - .000344 T(6, x)
-6
- .0000390 T(7, x) + .5 10 T(8, x)
-5 -6
+ .137 10 T(9, x) + .136 10 T(10, x)
ANOVA (oneway): stats[anova]
with(stats[anova],oneway):
example with variance ratio of 0.1 with 1 and 4 degrees of freedom. Level of significance is 0.23 < 0.95 (non-signif)
oneway( [ [1.0,2.0,3.0],[1.0,2.0,4.0] ] );
1,0.16,0.16,4,6.67,1.668,5,6.83,1,4,0.09592,0.2278
least median of squares regression: fit[leastmediansquare]
with(stats[fit]):
leastmediansquare[[x,y]]( [[1,2,3,4],[2,3,5,5]] );
y=x+1
The package finance provides functions for calculations related to finance. Some of the functions are: annuity, cashflows, perpetuity.
Amortization table of a loan of 100 at 10% interest, with payments of 50 per period
A:=finance[ amortization ] ( 100, 50, .10 ):
amortization_table[N, Payment, Interest, Principal, Balance]=matrix(A[1]);
Error, (in linalg:-matrix) invalid argument Vector[row](5, {(1) = n, (2) = Payment, (3) = Interest, (4) = Principal, (5) = Balance})
amortization_table[N, Payment, Interest, Principal, Balance
[0 0 0 -100 100 ]
] = [1 50 10.0 40.0 60.0]
[2 50 6.00 44.0 16.0]
[3 17.6 1.60 16.0 0 ]
cost_of_loan:=A[2];
000−100100
The routines factor, convert/parfrac, resultant and content have been extended to handle floating points (for content, it just works for simple cases).
f := (2.3*x)/(5.4*x^3-2.3*x+1):
convert(f,parfrac,x);
0.224⁢x+0.0636x2−0.810⁢x+0.229−0.224x+0.809
.224 .344 + 1.21 x
- -------- + .185 ------------------
x + .809 2
x - .810 x + .229
factor(x^3+5.0);
x+1.71⁢x2−1.71⁢x+2.92
(x + 1.71) (x - 1.71 x + 2.92)
resultant( 1.1*x+1.2, 1.3*x+1.4, x);
−0.02
content( 5.4*x*y, x);
5.4⁢y
The routine Maple_floats computes the values of various parameters and constants associated with the arbitrary precision floating point computation environment.
readlib(Maple_floats):
Maple_floats(MAX_FLOAT);
1.×109223372036854775806
2147483647
.9 10
Maple_floats(sqrt(MAX_FLOAT)/LN_MAX_FLOAT);
4.708630210×104611686018427387883
1073741814
.6067023828 10
Download Help Document
What kind of issue would you like to report? (Optional)