事先声明,本手册既不完整,又不准确。本手册是从Mathematica帮助文档中的MATHEMATICS AND ALGORITHMS和VISUALIZATION AND GRAPHICS中节选,再加上了我的一些翻译而完成。
Shift+Enter用于输入表达式
Crtl+K用于打开输入提示
用于展开代数式
Expand[poly,patt] 用变量patt展开多项式poly
ExpandAll[expr] 彻底展开表达式
对代数式因式分解
N用于将符号转为数值
将表达式expr的x用value替换
perform several replacements
定义变量x并赋值value
将变量x清除
Simplify[expr]用于化简表达式
Simplify[expr,assum] simplify expr with assumptions
FullSimplify用于更大范围的化简
Together[expr] 通分
Apart[expr] 部分分式展开
Apart[expr,var] 以变量var对表达式expr进行部分分式展开
Cancel[expr] 分式约分
Collect[expr,x] 将表达式按x合并同类项
Collect[poly,{x,y,…}] arrange a polynomial as a sum of powers of x, y, …
Collect[poly,patt,h] apply h to each final coefficientobtained
FactorTerms[expr,x] pull out factors that do not depend on x
FactorTerms[poly] 提取公因式
FactorTerms[poly,{x,y,…}] pull out any overall factorthat does not depend on x, y, …
TrigExpand[expr] 三角函数表达式的展开
TrigFactor[expr] 三角函数表达式的因式分解
TrigReduce[expr] 三角函数化简
TrigToExp[expr] 将三角函数转化为指数形式
ExpToTrig[expr] 将指数形式转换为三角函数形式
FunctionExpand[expr] expand out special and other functions
ComplexExpand[expr] 将表达式按复数展开
PowerExpand[expr] 将(x y)p 转换为xp yp
PowerExpand[expr,Assumptions->assum] expand out expr assuming assum
Element[x,dom] 声明x属于dom域
Element[{x1,x2,…},dom] state that all the xi are elements of the domain dom
Reals 实数
Integers 整数
Primes 素数
Coefficient[expr,form] 求表达式中变量的系数
Exponent[expr,form] 求表达式expr中变量form的最大指数
Part[expr,n]或expr[[n]] 求表达式expr的第n项
Numerator[expr] 求表达式expr的分子
Denominator[expr] 求表达式expr的分母
Postfix[f[expr]]
prints with f[expr] given in default postfixform: expr//f
执行command并且不输出
expr//Short 显示表达式输出的一行
Short[expr,n] 显示表达式输出的n行
读入文件包
HornerForm[expr,x] 使表达式expr以x的嵌套形式展现
PolynomialQ[expr,x] 查询expr是否是x的多项式
PolynomialQ[expr,{x1,x2,…}] test whether expr is a polynomial in the xi
Variables[poly] 取得多项式poly的变量
Coefficient[poly,expr] 求多项式poly中表达式expr的系数
MonomialList[poly] 获取多项式poly的单项式
CoefficientRules[poly] 获取多项式poly的单项式的指数向量和系数
ExpandNumerator[expr] 只展开分子
ExpandDenominator[expr] 只展开分母
PolynomialQuotient[ ,q(x),x] 对于 ,求得
PolynomialRemainder[ ,q(x),x] 对于 ,求得b(x)
PolynomialGCD[poly1,poly2] 求最大公约数
PolynomialMod[poly,m] 化简poly,通过用m减去某多项式的m倍
Factor[poly,Extension->{a1,a2,…}] 因式分解是允许引入a1,a2,…
Factor[poly,Extension->Automatic]
因式分解允许引入代数数
LogicalExpand[expr] 将逻辑函数展开
PiecewiseExpand[expr] 分段函数展开
PiecewiseExpand[expr,assum] expand out with the specifiedassumptions
赋值
判断x和y是否相等
Solve[lhs==rhs,x] 解方程
use the list of rules to get values for x
usethe list of rules to get values for an expression
Solve[{lhs1==rhs1,lhs2==rhs2,…},{x,y,…}] 解方程组
Solve[eqns,vars,elims] find solutions for vars, eliminating the variables elims
SolveAlways[eqns,vars] 求使方程恒成立的系数值
Eliminate[{lhs1==rhs1,lhs2==rhs2,…},{x,…}] 消元
Eliminate[eqns,elims] rearrange equations toeliminate the variables elims
Reduce[{lhs1==rhs1,lhs2==rhs2,…},{x,y,…}] 化简方程(有时比Solve更强大)
Root[f,k] 代表方程f[x]==0的第k个根
FindRoot[lhs==rhs,{x,x0}] 寻找方程的根,从x=x0开始找
InverseFunction[f] 求反函数
InverseFunction[f,k,n] the inverse function of the n-argument function f with respect to its k_th argument
CountRoots[poly,x] 得到多项式的实根数
关系运算符
等式
unequal(also input as x ¹ y)
大于
大于等于
小于
小于等于
all equal
all unequal (distinct)
x>y>z,etc. strictly decreasing, etc.
逻辑运算符
非
与
或
Xor[p,q,…] 异或
Nand[p,q,…] 与非
Nor[p,q,…] 或非
If[p,then,else] 如果p成立,则执行then,否则执行else
Reduce[{ineq1,ineq2,…},x] 化简不等式
Reduce[{ineq1,ineq2,…},{x1, x2
,…}] reduce a collectionof inequalities in several variables
Reduce[{expr1,…,x1Îdom1,…},vars] explicitly specify individual domains for variables
Reduce[expr,vars,dom] reduce eqns over the domain dom
FindInstance[ineqs,{x1,x2,…}] 找到满足不等式的一个值
FindInstance[ineqs,vars,n] try to find n instances
Minimize[expr,{x1,x2,…}] 求最小值
Minimize[{expr,cons},{x1,x2,…}] minimize expr subject to the constraints cons
Maximize[expr,{x1,x2,…}] 求最大值
Maximize[{expr,cons},{x1,x2,…}] maximize expr subject to the constraints cons
Sum[f,{i,imin,imax}] 求累和 the sum
Sum[f,{i,imin,imax,di}] the sum with i increasing in steps of di
Sum[f,{i,imin,imax},{j,jmin,jmax}] the nested sum
Product[f,{i,imin,imax}] 求累积
表示无穷
Series[expr,{x,x0,n}] 级数展开 find the power seriesexpansion of expr about the point x=x0 to at most n_th order
Series[expr,{x,x0,nx},{y,y0,ny}] find series expansions with respect to y, then x
Normal[series] truncate a power series to give an ordinary expression
RSolve[eqn,a[n],n] 解递归方程
RSolve[{eqn1,eqn2,…},{a1[n],a2[n],…},n] solve a coupled system ofrecurrence equations
RSolve[eqns,a[n1,n2,…],{n1,n2,…}] solve partial recurrenceequations
Limit[expr,x->x0] 求极限 find the limit of expr when x approaches x0
Limit[expr,x->x0,Direction->1] 求左极限
Limit[expr,x->x0,Direction->-1] 求右极限
Residue[expr,{x,x0}] 求留数 the residue of expr when x equals x0
D[f,x] 求偏导数 partial derivative
D[f,x,y,…] multiple derivative
D[f,{x,n}] 求n阶偏导数 derivative
Dt[f] 求全微分df
Dt[f,x] 求全微分
Dt[f,x,y,…] multiple total derivative
Dt[f,x,Constants->{c1,c2,…}] total derivative with ci constant
(i.e., d ci=0)
y/:Dt[y,x]=0 set
SetAttributes[c,Constant] define c to be a constant in all cases
Integrate[f,x] 求f的不定积分
Integrate[f,x,y] the multiple integral
Integrate[f,{x,xmin,xmax}] 求定积分
Integrate[f,{x,xmin,xmax},{y,ymin,ymax}] the multiple integral
Integrate[f
Boole[cond],{x,xmin,xmax},{y,ymin,ymax}] integrate f over the region where cond is True
DSolve[eqn,y[x],x] 解微分方程 solve a differential equationfor y[x]
DSolve[eqn,y,x] solve a differential equationfor the function y
DSolve[{eqn1,eqn2,…},{y1,y2,…},x] solve a list of differentialequations
DSolve[eqn,y[x1,x2,…],{x1,x2,…}] solve a partial differentialequation for y[x1,x2,…]
DSolve[eqn,y,{x1,x2,…}] solve a partial differentialequation for the function y
LaplaceTransform[expr,t,s] 求拉普拉斯变换
InverseLaplaceTransform[expr,s,t] 求拉普拉斯反变换
LaplaceTransform[expr,{t1,t2,…},{s1,s2,…}] the multidimensional Laplacetransform of expr
InverseLaplaceTransform[expr,{s1,s2,…},{t1,t2,…}] the multidimensional inverseLaplace transform of expr
FourierTransform[expr,t,w] 傅里叶变换
InverseFourierTransform[expr,w,t] 傅里叶反变换
通过设置FourierParameters,可设置傅里叶变换的算法
FourierSinTransform[expr,t,w] Fourier sine transform
FourierCosTransform[expr,t,w] Fourier cosine transform
InverseFourierSinTransform[expr,w,t] inverse Fourier sine transform
InverseFourierCosTransform[expr,w,t] inverse Fourier cosinetransform
ZTransform[expr,n,z] Z变换
InverseZTransform[expr,z,n] Z反变换
DiracDelta[x] 冲激函数 Dirac delta function d(x)
HeavisideTheta[x] 类似阶跃函数 Heaviside theta function q(x), equal to 0 for x<0 and 1 for x>0
DiracDelta[x1,x2,…] multidimensional Dirac deltafunction
HeavisideTheta[x1,x2,…] multidimensional Heavisidetheta function
DiscreteDelta[n1,n2,…] discrete delta d(n1,n2,…)
KroneckerDelta[n1,n2,…] Kronecker delta
Mean[ ] 求平均值
Mean[{{x1,y1,…},{x2,y2,…},…}] a list of the means of the xi,yi,…
Median[list] 求中间值
Max[list] 求最大值
Variance[list] 求方差
StandardDeviation[list] 求标准差
Quantile[data,q] 求分位数 gives the location before which(100q) percent of the data lie
Commonest[data] list of the elements withhighest frequency
MeanDeviation[data] 求绝对平均差
MedianDeviation[data] 中间数平均差 median absolute deviation,median of Èxi-medianÈ values
Covariance[v1,v2] 求协方差
Correlation[v1,v2] 求相关系数
Expectation[f[x],xélist] 求期望 (可以通过Esc
dist Esc来打出é)
BinomialDistribution[n,p] 产生试验次数为n,每次实验成功的概率为p的二项分布
BernoulliDistribution[p] 产生成功概率为p的两点分布
NormalDistribution[m,s] 产生正态分布
PDF[dist,x] 求概率密度函数
FindClusters[data] partition data into lists of similarelements
FindClusters[data,n] partition data into exactly n lists of similar elements
Nearest[{elem1,elem2,…},x] 求最接近值 give the list of elemi to which x is nearest
Fit[{y1,y2,…},{f1,f2,…},x] fit the values yn to a linear combination offunctions fi
Fit[{{x1,y1},{x2,y2},…},{f1, f2,…},x] fit the points (xn,yn) to a linear combination
ofthe fi
FindFit[data,form,{p1,p2,…},x] find a fit to form with parameters pi
Fourier[data] 数值的傅里叶变换
InverseFourier[data] 数值的傅里叶反变换
Fit[{f1,f2,…},{fun1,fun2,…},x] 曲线拟合 find a linear combination ofthe funi that best fits the values fi
Fit[data,{fun1,fun2,…},{x,y,…}] fit to a function of severalvariables
FindFit[data,form,{par1,par2,…},x] search for values of the pari that make
form best fit data
FindFit[data,form,pars,{x,y,…}] fit multivariate data
finds a best fit subject tothe parameter constraints
cons
Interpolation[{f1,f2,…}] construct an approximatefunction with values fi at
successive integers
Interpolation[{{x1,f1},{x2,f2},…}] 求近似函数construct an approximatefunction with values fi at points xi
Fourier[{u1,u2,…,un}] 离散傅里叶变换
InverseFourier[{v1,v2,…,vn}] 离散傅里叶反变换
Fourier[{{u11,u12,…},{u21,u22,…},…}] two-dimensional discreteFourier transform
FourierDCT[list] Fourier discrete cosinetransform of a list of real numbers
FourierDST[list] Fourier discrete sinetransform of a list of real numbers
FourierDCT[list,m] Fourier discrete cosinetransform of type m
FourierDST[list,m] Fourier discrete sinetransform of type m
绘图部分
Plot[f,{x,xmin,xmax}] 绘图 plot f as a function of x from xmin to xmax
Plot[f,{x,x0,x1,…,xk}] plot f over a series of segments,potentially breaking the curve at each of the xi
Show[plot,option->value] 重画 redraw a plot with optionschanged
Show[plot1,plot2,…] 联合绘图 combine several plots
GraphicsGrid[{{plot1,plot2,…},…}] draw an array of plots
InputForm[plot] show the underlying textualdescription of the plot
Plot3D[f,{x,xmin,xmax},{y,ymin,ymax}] 画三维图 make a three-dimensional plotof f as a function of thevariables x and y
ListPlot[{y1,y2,…}] 画点图 plot y1,y2,… at x values 1,2,…
ListPlot[{{x1,y1},{x2,y2},…}] plot points (x1,y1),…
ListLinePlot[list] join the points with lines
ListPlot3D[{{z11,z12,…},{z21,z22,…},…}] make a three-dimensional plotof the array of heights zyx
ListPlot3D[{{x1,y1,z1},{x2,y2,z2},…}] make a three-dimensional plotwith heights zi at
positions {xi,yi}
ListContourPlot[array] make a contour plot
ListDensityPlot[array] make a density plot
ParametricPlot[{fx,fy},{t,tmin,tmax}] 参数绘图
ParametricPlot[{{fx,fy},{gx,gy},…},{t,tmin,tmax}] plot several parametric curvestogether
ParametricPlot3D[{fx,fy,fz},{t,tmin,tmax}] make a parametric plot of athree-dimensional curve
ParametricPlot3D[{fx,fy,fz},{t,tmin,tmax},{u,umin,umax}] make a parametric plot of
athree-dimensional surface
ParametricPlot3D[{{fx,fy,fz},{gx,gy,gz},…},…] plot several objects together
Play[f,{t,0,tmax}] 播放函数的声音 play a sound with amplitude f as a function of time t in seconds
Play[f,{t,0,tmax},SampleRate->r] play a sound, sampling it r times a second