Maple
✍ dations ◷ 2025-02-28 03:48:21 #数值分析软件,C软件,计算笔记本,Linux计算机代数系统软件,MacOS计算机代数系统软件,Windows计算机代数系统软件,跨平台软件,数据可视化软件,数据
MAPLE是一个符号运算和数值计算软件平台
用户能够直接使用传统数学符号进行输入,也可以定制个性化的界面。对于数值计算有额外的支持,能够扩展到任意精度,同时亦支持符号演算及可视化。符号演算的例子参见下文。Maple内建有一种动态的命令行风格的编程语言,该语言支持具有作用域的变量。同时亦有其他语言的接口(C、FORTRAN、Java、Matlab和Visual Basic)。还具有与Excel进行交互的接口。
Maple由一个很小的由C语言编写的内核提供Maple语言。许多功能由各种来源的函数库提供。许多数值计算由NAG数值计算库, ATLAS库, GNU多精度库提供。大部分库由Maple语言编写,并且可查看源代码。
Maple中不同的功能需要不同格式的数值数据。符号表达式在内存中以有向无环图的形式存储。标准界面和计算界面由Java语言编写。经典界面由C语言编写。
简单命令式程序的构造:
myfac := proc(n::nonnegint) local out, i; out := 1; for i from 2 to n do out := out * i end do; outend proc;
一些简单的函数也可以使用直观的箭头表示法表示
myfac := n -> product( i, i=1..n );
开方
evalf(2^1/12)
1.059463094359295264561825294946341700779204317494185628559208431458761646063255722383768376863945569
f:=x^2-63*x+99=0;
solve(f,x);
, 
f := x^7+3*x = 7;
solve(f,x);
evalf(%);
f := sin(x)^3+5*cosh(x) = 0;

> solve(f, x);
RootOf(
> evalf(%);
根据
,寻找
的所有整数解。
solve({x-y > 6, (x+y)^5 = 9}, );
答案:
计算矩阵的行列式。
M:= Matrix(], , ]); # 矩阵样例

with(LinearAlgebra)
m:=Determinant(M);
答案:
with(VectorCalculus);
w:=Wronskian(,x)
Matrix(3, 3, {(1, 1) = 1, (1, 2) = x, (1, 3) = x^3+x-1, (2, 1) = 0, (2, 2) = 1, (2, 3) = 3*x^2+1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 6*x})
d:=Determinant(w);
J := Jacobian(, );
m:=Matrix(2, 2, {(1, 1) = cos(t), (1, 2) = -r*sin(t), (2, 1) = sinh(t), (2, 2) = r*cosh(t)})
d:=Determinant(m);
sin(t)*r^2*sinh(t)-2r^2cos(t)cosh(t)
f := x^3+y*cos(x)+t*tan(y))
with(VectorCalculus);
h:=hessian(f,);

求
.
int(cos(x/a), x);
答案:
求
.
int(sin(x/a), x);
答案:
注意:Maple在积分时不提供常数项C,必须自行补上。
> int(cos(x/a), x = 1 .. 5);
计算以下线性常微分方程的一个精确解
初始条件为
dsolve( {diff(y(x),x,x) - 3*y(x) = x, y(0)=0, D(y)(0)=2}, y(x) );
答案:
dsolve(diff(y(x), x, x) = x^2*y(x))
解:
+
BesselK(
,
)
series(tanh(x),x=0,15)


f:=int(exp^cosh(x),x)series(f,x=0,15);


拉普拉斯变换
with(inttrans);
> f := (1+A*t+B*t^2)*exp(c*t);
> laplace(f, t, s);

invlaplace(1/(s-a),s,x)

z := y(t);

with(inttrans);

with(inttrans);
fourier(sin(x),x,w)
*(Dirac(w-1)+Dirac(w+1))
绘制函数
,
plot(x*sin(x),x=-10..10);

绘制函数
,
和
的范围为 -1到1
plot3d(x^2+y^2,x=-1..1,y=-1..1);


with(plots);
animate(subs(k = .5, f), x = -30 .. 30, t = -10 .. 10, numpoints = 200, frames = 50, color = red, thickness = 3);
with(plots)
animate3d(cos(t*x)*sin(3*t*y), x = -Pi .. Pi, y = -Pi .. Pi, t = 1 .. 2)
求解偏微分方程组
条件为
.
eqn1:= diff(v(x, t), x) = -u(x,t)*v(x,t):eqn2:= diff(v(x, t), t) = -v(x,t)*(diff(u(x,t), x))+v(x,t)*u(x,t)^2:eqn3:= diff(u(x,t), t)+2*u(x,t)*(diff(u(x,t), x))-(diff(diff(u(x,t), x), x)) = 0:pdsolve({eqn1,eqn2,eqn3,v(x,t)<>0},): op(%);
答案: 
寻找函数
满足积分方程
.
eqn:= f(x)-3*Integrate((x*y+x^2*y^2)*f(y), y=-1..1) = h(x):intsolve(eqn,f(x));
答案: