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
D - 微分演算子
使い方
D(f)
D[i](f)
パラメータ
f - 関数として適用できる式
i - 正整数、またはその式あるいはそのようなものの式列
説明
1 引数の関数 f が与えられたとき、呼び出し D(f) は関数 f の導関数を計算します。たとえば、D(sin) は cos を返します。導関数は D(f)(x) = diff(f(x), x) のような1引数の関数です。つまり D(f) = unapply(diff(f(x), x), x) です。したがって、D は 1 項関数から 1 項関数への写像です。
n 引数の関数 f が与えられたとき、呼び出し D[i](f) は第 i 変数に関する f の偏導関数を返します。より一般的に、D[i,j](f) は D[i](D[j](f)) に等価で、また D[](f) = f です。したがって、D[i] は n 項関数から n 項関数への写像です。
引数 f は関数として扱える代数式でなければなりません。それは、定数、既知の関数名(exp や sin など)、未知の関数名( f や g など)、矢印演算子( x -> x^2 など)、それに算術および関数演算子を含んでも構いません。たとえば、(f+g)(x) = f(x)+g(x), (f*g)(x) = f(x)*g(x), (f@g)(x) = f(g(x)) であるので、f+g, f*g, および f@g は有効です。ただし、f@g は関数の合成を表します。
通常の微分規則は成立します。加えて、偏微分は可換であることを仮定します。したがって、D(f+g) = D(f) + D(g), D(f*g) = D(g*f) = D(f)*g + D(g)*f, D(f@g) = D(f)@g * D(g), D[i,j](f) = D[j,i](f) などが成り立ちます。
重要: 関数 f と g の合成は f@g と記されます。f(g) ではありません。D(sin(y)) は間違いです。したがって、D(sin@y) を使って下さい。
変数の個数が k 個より少ない関数に、k 番目の変数に関する偏微分する命令を指定し、適用すると、エラーとなります。たとえば、D[2](f)(x) はエラーを生じさせます。
記号 a が定数で関数でないことを指定するには、assume(a,constant) を使って下さい。こうすれば D は、D(a) は 0 で、D(sin(a)*f) は sin(a)*D(f) であると理解するでしょう。
D と diff の比較については operators[D] を参照して下さい。
D 演算子は、手続きとして定義された関数の偏微分も計算できます。これは自動微分として知られています。関数 f は、局所変数への割り当て、 if 文、for 文、および while 文などを持つ Maple 手続きであることも可能です。例を参照して下さい。
例
D(sin);
D(exp+cos^2+Pi+tan);
D(ln);
D(ln)(x) = diff(ln(x),x);
D(f);
D(f)(0); # the first derivative of f evaluated at 0
D(D(f));
(D@@2)(f);
(D@@n)(f);
D(f@g); # the derivative of the composition of two functions
D(sin(y)); # this does not mean sin composed with y
D(sin@y);
D(2*sin(a)*f);
assume(a,constant); D(2*sin(a)*f);
D[](f);
D[i](f);
D[i$n](f);
D[i,j](f);
D[i,j](f)-D[j,i](f);
D[1](D[2,1](f));
D[i](D[j,i](f));
D[1](f)(x);
D[1](f)(x,y);
D[2](f)(x);
Error, (in `evalapply/D`[2]) too few variables for the derivative with respect to the 2nd variable
D[a,5,b](f)(x,y,z);
Error, (in `evalapply/D`[5,b,a]) too few variables for the derivative with respect to the 5th variable
f := x -> x^2;
f := (x,y) -> exp(x*y);
D[1](f);
D[2](f);
f := x -> g(x,y(x));
f := proc(x) local t1,t2; t1 := x^2; t2 := sin(x); 3*t1*t2+2*x*t1-x*t2 end proc:
f の 1 番目の引数について f の導関数を計算
この手続きが導関数を正しく計算していることを確認
D(f)(x) - diff(f(x),x);
f := proc(x,b,n) local i,s; s := 0; for i from n by -1 to 0 do s := s*x+b[i] end do; s end proc:
上の手続き f は、ホーナーの規則を用いて x における多項式 b を評価します。多項式 b は係数の配列 array(0..n) として入力されます。
参照
diff, @, @@, unapply, operators, taylor, operators[D]
Download Help Document