Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
subs - 部分式を式に代入する
使い方
subs(x=a,expr)
subs(s1,...,sn,expr)
パラメータ
x, a, expr - 式
s1, ..., sn - 等式か等式の集合またはリスト
説明
subs コマンドの最初の形は式 expr の中の x に a を代入します。このコマンドは eval コマンドと似ていることに注意します。単に式における記号を値で置き換えるには普通 eval コマンドを使うべきです。2つのコマンドの違いは以下の例で強調されます。
subs コマンドの第 2 の一般形は最後の引数 expr に対してその前の引数たちで指定される代入を行います。s1, ..., sn のそれぞれは等式か等式のリストまたは集合でなければいけません。代入は s1 から始まって順番に行われます。集合やリストにおける代入は同じに行われます。同じ名前について重複する代入があると、最初のものが用いられます。
expr の中に代入する等式の左辺が現れるたびに等式の右辺で置き換えられます。Maple オブジェクトの被作用子 (ops) に対応する部分式だけが照合されることに注意して下さい。より強力な代入は algsubs コマンドを用いることにより利用できます。
代入の動作は評価の結果起こるものではありません。完全評価を望む場合は以下の例で見るように eval コマンドを使うべきです。
例
subs( x=2, x^2+x+1 );
subs( x=r^(1/3), 3*x*ln(x^3) );
subs( sin(x)=y, sin(x)/sqrt(1-sin(x)) );
subs( a+b=y, (a+b+c)^2 );
subs( a^2=y, a^3 );
algsubs( a^2=y, a^3 );
subs( x=y, y=x, [x,y] );
subs( {x=y, y=x}, [x,y] );
subs( y=0, sin(y) );
eval( sin(y), y=0 );
Maple はすべてのパラメータに同時に代入を行わないので、次の subs の呼び出しではエラーが返されます (しかし eval は正しく働きます)。
p := piecewise( x=0, 1, sin(x)/x );
subs( x=0, p );
Error, numeric exception: division by zero
eval( p, x=0 );
参照
op, subsop, eval, algsubs, limit
Download Help Document