查看“︁Maple”︁的源代码
←
Maple
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{not|楓樹}} {{NoteTA|G1=Math|G2=IT}} {{Infobox Software |name = Maple | logo = Maple 2015 logo.svg | logo_size = 200px |screenshot = |caption = Maple界面 |developer = {{tsl|en|Waterloo Maple|枫软}} |programming language = [[C语言]], [[Java]], Maple language | released = {{start date and age|1982}} | latest release version = {{Latest stable software release/Maple}} |operating_system = [[跨平台]] |genre = [[计算机代数系统]] |license = [[专有软件|私有]] |website = [http://www.maplesoft.com/products/maple/ www.maplesoft.com/products/maple/] }} MAPLE是一個[[计算机代数|符號计算]]和[[數值計算]]軟體平臺 == 總覽 == === 核心功能 === 用戶能够直接使用傳統數學符號进行輸入,也可以定制个性化的界面。对于数值计算有额外的支持,能够扩展到任意精度,同时亦支持符號演算及可视化。符號演算的例子参见下文。Maple内建有一种动态的命令行风格的编程语言,该语言支持具有作用域的变量。同时亦有其他語言的接口(C、FORTRAN、Java、Matlab和Visual Basic)。还具有与Excel进行交互的接口。 ===架构=== Maple由一个很小的由[[C语言]]编写的[[内核]]提供Maple语言。许多功能由各种来源的函数库提供。许多数值计算由[[NAG数值计算库]], [[ATLAS库]], [[GNU多精度库]]提供。大部分库由Maple语言编写,并且可查看源代码。 Maple中不同的功能需要不同格式的数值数据。符号表达式在内存中以[[有向无环图]]的形式存储。标准界面和计算界面由[[Java语言]]编写。经典界面由[[C语言]]编写。 == 版本 == {| class="wikitable" ! 版本 || 年份 |- | Maple 1.0 || 1982年1月 |- | Maple 1.1 || 1982年 |- | Maple 2.0 || 1982年5月 |- | Maple 2.1 || 1982年6月 |- | Maple 2.15 || 1982年8月 |- | Maple 2.2 || 1982年12月 |- | Maple 3.0 || 1983年5月 |- | Maple 3.1 || 1983年10月 |- | Maple 3.2 || 1984年4月 |- | Maple 3.3 || 1985年3月(第一個公開版本) |- | Maple 4.0 || 1986年4月 |- | Maple 4.1 || 1987年5月 |- | Maple 4.2 || 1987年12月 |- | Maple 4.3 || 1989年3月 |- | Maple V || 1990年8月 |- | Maple V R2 || 1992年11月 |- | Maple V R3 || 1994年3月15日 |- | Maple V R4 || 1996年1月 |- | Maple V R5 || 1997年11月1日 |- | Maple 6 || 2000年1月31日 |- | Maple 6.01 || ?年?月 |- | Maple 6.02 || ?年?月 |- | Maple 7.00 || 2001年5月28日 |- | Maple 7.01 || ?年?月 |- | Maple 8.00 || 2002年4月22日 |- | Maple 9.00 || 2003年6月30日 |- | Maple 9.01 || 2003年7月10日 |- | Maple 9.02 || 2003年?月 |- | Maple 9.03 || 2003年11月5日 |- | Maple 9.50 || 2004年4月7日 |- | Maple 9.51 || 2004年8月17日 |- | Maple 9.52 || 2005年1月21日 |- | Maple 10 || 2005年5月13日 |- | Maple 10.01 || 2005年?月 |- | Maple 10.02 || 2005年11月8日 |- | Maple 10.03 || ?年?月 |- | Maple 10.04 || 2006年5月30日 |- | Maple 10.05 || 2006年6月9日 |- | Maple 10.06 || 2006年10月2日 |- | Maple 11.0 || 2007年2月17日 |- | Maple 11.01 || 2007年7月10日 |- | Maple 11.02 || 2007年11月10日 |- | Maple 12.0 || 2008年4月10日 |- | Maple 12.01 || 2008年10月 |- | Maple 12.02 || 2008年12月 |- | Maple 13.0 || 2009年4月13日 |- | Maple 13.01 || 2009年7月8日 |- | Maple 13.02 || 2009年7月8日 |- | Maple 14.00 || 2010年4月5日 |- | Maple 14.01 ||2010年10月28日 |- | Maple 15 ||2011年4月13日 |- | Maple 15.01 ||2011年6月2日 |- | Maple 16 ||2012年3月28日 |- | Maple 16.01 ||2012年5月16日/8月27日 |- | Maple 16.02 ||2012年11月18日 |- | Maple 17.00 ||2013年2月21日/3月13日/4月10日 |- | Maple 18.00 ||2014年3月6日 |- | Maple 18.01 ||2014年5月 |- | Maple 18.01a ||2014年7月 |- | Maple 18.02 ||2014年11月 |- | Maple 2015 ||2015年3月 |- | Maple 2015.1 ||2015年11月 |- | Maple 2016 ||2016年3月2日 |- | Maple 2016.1 ||2016年4月20日 |- | Maple 2016.1.a ||2016年4月27日 |- | Maple 2017 ||2017年5月25日 |- | Maple 2017.1 ||2017年6月28日 |- | Maple 2017.2 ||2017年8月2日 |- | Maple 2017.3 ||2017年10月3日 |- | Maple 2018.0 ||2018年3月21日 |- | Maple 2019.0 ||2019年3月14日 |} == Maple代码示例 == 简单[[指令式编程|指令式程序]]的构造:<!-- <source lang="maple"> not implemented, yet... --> <syntaxhighlight lang="pascal"> myfac := proc(n::nonnegint) local out, i; out := 1; for i from 2 to n do out := out * i end do; out end proc; </syntaxhighlight> 一些简单的函数也可以使用直观的箭头表示法表示 myfac := n -> product( i, i=1..n ); ===开方=== evalf[100](2^1/12) 1.059463094359295264561825294946341700779204317494185628559208431458761646063255722383768376863945569 [[File:12throotof2threethousanddigits.JPG|thumb|right|400px]] === 求根 === f:=x^2-63*x+99=0; solve(f,x); <math>\frac{63}{2}+\frac{3}{2}*\sqrt(397)</math>, <math>\frac{63}{2}-\frac{3}{2}*\sqrt(397)</math> f := x^7+3*x = 7; solve(f,x); : RootOf(<math>Z^7 + 3 Z - 7</math>, index = 1), : RootOf(<math>Z^7 + 3 Z - 7</math>, index = 2), : RootOf(<math>Z^7 + 3 Z - 7</math>, index = 3), : RootOf(<math>Z^7 + 3 Z - 7</math>, index = 4), : RootOf(<math>Z^7 + 3 Z - 7</math>, index = 5), : RootOf(<math>Z^7 + 3 Z - 7</math>, index = 5), : RootOf(<math>Z^7 + 3 Z - 7</math>, index =7), evalf(%); * (1.1922047171828134), * (0.8658388666792263) + (0.9230818802764879) I, * (0.2099602786426775) + (1.3442579297631496) I, * (1.2519809466279554) + (0.6424819505558892) I, * (1.2519809466279554) - (0.6424819505558892) I, * (0.2099602786426775) - (1.3442579297631496) I, * (0.8658388666792263) - (0.9230818802764879) I f := sin(x)^3+5*cosh(x) = 0; <math> sin^3(x) + 5 cosh(x) = 0</math> > solve(f, x); RootOf(<math>sin^3(Z) - arccosh(\frac{-1}{5} sin(Z)))</math> > evalf(%); : 0.2873691672 - 1.111497506 I === 求解方程和不等式 === 根据<math>x-y > 6</math>,寻找<math>(x+y)^5 = 9</math>的所有实数解。<br /> solve({x-y > 6, (x+y)^5 = 9}, [x, y])[]; 答案: <math>[x = 3^{2/5}-y, \quad y < \frac{1}{2}3^{2/5}-3]</math> ===方程组=== ;代数方程组 :> p1 := x*y*z-x*y^2-z-x-y; p2 := x*z-x^2-z-y+x; p3 := z^2-x^2-y^2; :> sys := {p1, p2, p3}; :> var := {x, y, z}; : :> solve(sys, var); :: {x = 0, y = y, z = -y}, {x = 3, y = 4, z = 5}, {x = 1, y = 0, z = -1} ;三角方程组 :> f1 := cos(x)+sin(3*y)+tan(5*z) = 0; : :> f2 := cos(3*z)+tan(3*y^2)-sin(2*z^3) = 33; :> f3 := tan(4*x+y)-sin(5*y-4*z) = 2*x; : :> sys1 := {f1, f2, f3}; : > var1 := {x, y, z}; : {x, y, z} :> fsolve(sys1, var1); : {x = -10.77771790, y = -2.397849343, z = -7.382158103} ===超幾何函數=== === 矩阵与行列式 === 计算[[矩阵]]的[[行列式]]。<br /> M:= Matrix(<nowiki>[[1,2,3]], [a,b,c], [[x,y,z]]</nowiki>); # 矩阵样例 : <math> \begin{bmatrix} 1 & 2 & 3 \\ a & b & c \\ x & y & z \end{bmatrix} </math> with(LinearAlgebra) m:=Determinant(M); 答案:<math>bz-cy+3ay-2az+2xc-3xb</math> ;[[朗斯基行列式]] with(VectorCalculus); w:=Wronskian([1,x,x^3+x-1],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); : 6x ;[[雅可比矩阵]] J := Jacobian([r*sin(t)), r^2*cosh(t)], [r, t]); 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,[x,y,t]); <math> \begin{bmatrix} 6*x-y*cos(x) & -sin(x) & 0 \\ -sin(x) & 2*t*tan(y)*(1+tan(y)^2) & 1+tan(y)^2 \\ 0 & 1+tan(y)^2 & 0 \end{bmatrix} </math> === 积分 === 求<math>\int\cos\left(\frac{x}{a}\right)dx</math>.<br /> int(cos(x/a), x); 答案:<math>a \sin\left(\frac{x}{a}\right)</math> 求<math>\int\sin\left(\frac{x}{a}\right)dx</math>.<br /> int(sin(x/a), x); 答案:<math>-a \cos\left(\frac{x}{a}\right)</math> 注意:Maple在积分时不提供常数项C,必须自行补上。 ;定积分 > int(cos(x/a), x = 1 .. 5); : 16 a sin(1/a)* cos^4(1/a) - 12 a sin^2(1/a) === 求解线性微分方程 === 计算以下线性常微分方程的一个精确解<math>\frac{d^2y}{dx^2}(x) - 3 y(x) = x</math>初始条件为<math>y(0) = 0 ,\quad \left. \frac{dy}{dx} \right|_{x=0} = 2</math><br /> dsolve( {diff(y(x),x,x) - 3*y(x) = x, y(0)=0, D(y)(0)=2}, y(x) ); 答案:<math>y(x)=\frac{7}{18}\sqrt{3}e^{\sqrt{3}x}-\frac{7}{18}\sqrt{3}e^{-\sqrt{3}x}-\frac{1}{3}x</math> ===非线性常微分方程=== dsolve(diff(y(x), x, x) = x^2*y(x)) 解: :<math>y(x)=C_{1}\sqrt(x)</math>BesselI(<math>1 \over 4</math>,<math>1 \over 2</math><math>x^2</math>) +<math>C_{2}\sqrt(x)</math>BesselK(<math>1 \over 4</math>,<math>1 \over 2</math><math>x^2</math>) ===级数展开=== series(tanh(x),x=0,15) :<math>x-\frac{1}{3}\,x^3+\frac{2}{15}\,x^5-\frac{17}{315}\,x^7</math> :<math>+\frac{62}{2835}\,x^9-\frac{1382}{155925}\,x^{11}+\frac{21844}{6081075}\,x^{13}+\mathcal{O}(x^{15})</math> f:=int(exp^cosh(x),x) series(f,x=0,15); :<math>e x+\frac{1}{6}e x^3+\frac{1}{30}e x^5+\frac{31}{5040}e x^7+\frac{379}{362880}e x^9</math> :<math>+\frac{149}{907200}e x^{11}+\frac{150349}{6227020800}e x^{13}+\frac{4373461}{1307674368000} e x^{15}+\mathcal{O}(x^{17})</math> ===拉普拉斯变换=== with(inttrans); ;[[拉普拉斯变换]] > f := (1+A*t+B*t^2)*exp(c*t); <math> (1+A*t+B*t^2)*e^{c*t}</math> > laplace(f, t, s); <math>\frac{1}{s-c}+\frac{A}{(s-c)^2}+\frac{2B}{(s-c)^3}</math> ;反拉普拉斯变换 invlaplace(1/(s-a),s,x) <math>e^{ax}</math> z := y(t); ::: y(t) :f := diff(z, t, t)+a*(diff(z, t)) = b*z; <math>\frac{d^2}{dt^2}y(t)+a\frac{d}{dt}y(t)=by(t)</math> with(inttrans); :g := laplace(f, t, s); : : s^2*laplace(y(t), t, s) - D(y)(0) - s y(0) : : + a s^2 laplace(y(t), t, s) - a y(0) = b laplace(y(t), t, s) : invlaplace(g, s, t); <math>\frac{d^2}{dt^2}y(t)+a\frac{d}{dt}y(t)=by(t)</math> ===傅里叶变换=== with(inttrans); fourier(sin(x),x,w) <math>\Pi</math>*(Dirac(w-1)+Dirac(w+1)) === 绘制单变量函数图形 === 绘制函数<math>y=x \cdot \sin x</math>,<math>x \in(-10,10)</math> plot(x*sin(x),x=-10..10); <center> [[File:Mathematica1DPlot.svg|300px]] </center> === 绘制双变量函数 === 绘制函数<math>x^2+y^2</math>,<math>x</math>和<math>y</math>的范围为 -1到1<br /> plot3d(x^2+y^2,x=-1..1,y=-1..1); <center> [[File:Mapleplot.jpg|300px]] </center> ===绘制函数动画=== {{Wikibooks|Maple/绘制函数动画|绘制函数动画图}} ;二维动画 <math>f:=2*k^2/cosh(k*(x-4*k^2*t))^2</math> with(plots); animate(subs(k = .5, f), x = -30 .. 30, t = -10 .. 10, numpoints = 200, frames = 50, color = red, thickness = 3); {| |- |[[File:Bellsoliton2.gif|300px|thumb|钟形孤立子]] |[[File:3dsincos animation.gif|thumb|300px|三维函数动画]] |} ;三维动画 with(plots) animate3d(cos(t*x)*sin(3*t*y), x = -Pi .. Pi, y = -Pi .. Pi, t = 1 .. 2) === 求解偏微分方程组 === 求解[[偏微分方程]]组 :<math> {\frac {\partial }{\partial x}}v \left( x,t \right) =-u \left( x,t \right) v \left( x,t \right) </math> :<math> {\frac {\partial }{\partial t}}v \left( x,t \right) =-v \left( x,t \right) {\frac {\partial }{\partial x}}u \left( x,t \right) +v \left( x,t \right) \left( u \left( x,t \right) \right) ^{2} </math> :<math> {\frac {\partial }{\partial t}}u \left( x,t \right) +2\,u \left( x,t \right) {\frac {\partial }{ \partial x}}u \left( x,t \right) -{\frac {\partial ^{2}}{\partial {x}^{2}}}u \left( x,t \right) =0 </math> 条件为<math>v(x,t)\neq 0</math>. 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},[u,v]): op(%); 答案: <math>v \left( x,t \right) ={e^{\sqrt {{\it \_c}_{{1}}}x}}{\it \_C3 }\,{e^{{\it \_c}_{{1}}t}}{\it \_C1}+{\frac {{\it \_C3}\,{e^{{\it \_c}_ {{1}}t}}{\it \_C2}}{{e^{\sqrt {{\it \_c}_{{1}}}x}}}}, \ \ u \left( x,t \right) =-{\frac {\sqrt {{\it \_c}_{{1}}} \left( {\it \_C1}\, \left( {e^{\sqrt {{\it \_c}_{{1}}}x}} \right) ^{2}-{\it \_C2} \right) }{{\it \_C1}\, \left( {e^{\sqrt {{\it \_c}_{{1}}}x}} \right) ^{2}+{\it \_C2}} } </math> === 积分方程 === 寻找函数<math>f</math>满足[[积分方程]] <math>f(x)-3\int_{-1}^1(xy+x^2y^2)f(y)dy = h(x)</math>.<br /> eqn:= f(x)-3*Integrate((x*y+x^2*y^2)*f(y), y=-1..1) = h(x): intsolve(eqn,f(x)); 答案:<math>f \left( x \right) =\int _{-1}^{1}\! \left( -15\,{x}^{2}{y}^{2}-3\,xy \right) h \left( y \right) {dy}+h \left( x \right) </math> == 注释 == *现在,MATLAB已改用MuPAD替代了matlab的Maple符号计算内核。 == 参考文献 == *何青 王丽芬编著《Maple教程》 科学出版社 2010 ISBN 9787030177445 *David Betounes, Partial Differential Equations for Computational Science: With Maple and Vector Analysis Springer, 1998 ISBN 9780387983004 *George Articolo Partial Differential Equations & Boundary Value Problems with Maple V Academic Press 1998 ISBN 9780120644759 {{Wikibooks|Maple}} {{Commons category|Maple (software)}} {{Reflist}} == 外部链接 == * [http://www.maplesoft.com/ Maple主页] {{Wayback|url=http://www.maplesoft.com/ |date=20170305022110 }} == 参见 == *[[Maxima]] *[[MATLAB]] *[[GNU Octave]] *[[Scilab]] *[[Mathematica]] {{数值分析软件}} {{计算机代数系统}} {{统计分析软件}} {{分形软件}} [[Category:C軟體]] [[Category:计算笔记本]] [[Category:Linux计算机代数系统软件]] [[Category:MacOS计算机代数系统软件]] [[Category:Windows计算机代数系统软件]] [[Category:跨平台軟體]] [[Category:数据可视化软件]] [[Category:数据导向编程语言]] [[Category:计量经济学软件]] [[Category:函数式编程语言]] [[Category:IRIX软件]] [[Category:線性代數]] [[Category:Maplesoft]] [[Category:數學最佳化軟體]] [[Category:数学软件]] [[Category:Linux數值分析軟件]] [[Category:MacOS數值分析軟件]] [[Category:Windows數值分析軟件]] [[Category:數值分析語言]] [[Category:數值軟體]] [[Category:并行计算]] [[Category:物理学软件]] [[Category:圖表軟件]] [[Category:1982年面世的產品]] [[Category:Linux专有商业软件]] [[Category:专有跨平台软件]] [[Category:回归和曲线拟合软件]] [[Category:软件建模语言]] [[Category:统计编程语言]] [[Category:模拟器编程语言]]
该页面使用的模板:
Template:Commons category
(
查看源代码
)
Template:Infobox Software
(
查看源代码
)
Template:Not
(
查看源代码
)
Template:NoteTA
(
查看源代码
)
Template:Reflist
(
查看源代码
)
Template:Wayback
(
查看源代码
)
Template:Wikibooks
(
查看源代码
)
Template:分形软件
(
查看源代码
)
Template:数值分析软件
(
查看源代码
)
Template:统计分析软件
(
查看源代码
)
Template:计算机代数系统
(
查看源代码
)
返回
Maple
。
导航菜单
个人工具
登录
命名空间
页面
讨论
不转换
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
工具
链入页面
相关更改
页面信息