MAXIMA
mathematicaは高いのでMAXIMA
Maxima のMEMO
インストール
http://maxima.sourceforge.net/
=============================
代入
a:2;
b:3;
a+b;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
表示:
a: sqrt(2);
a;
a,numer;
掛け算の*を表示
stardisp:true;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
非表示
a:2$
b:3$
a+b;
f(x):=x+2 後でf(3)みたいな代入が出来る。
f(x,y):=x^2+y^3;
ex:x^2+y^3;
=============================
微分
diff(x^2+1,x);
diff(f(x),x);
diff(ex,x);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
積分
integrate(sin(x),x);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
定積分
integrate(sin(x),x,0,%pi);
romberg(sin(x),x,0,%pi);
=============================
例
example(solve)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
さっきの式 %
=============================
方程式
solve(x^2+1=0,x);
簡略式
solve(x^2+1,x);
solve(x^2+1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
連立方程式
solve([x+y=1 , x^2+y^2=1],[x,y]);
=============================
ラプラス変換
laplace(exp(a*t),t,s);
=============================
行列:
MA:matrix([1,2],[3,4]);
row(MA,1);
col(MA,1);
MB:invert(MA);
掛け算
MA . MB ;
逆行列
MA^^-1;
固有値:
eigenvalues(MX);
=============================
展開
expand()
因数分解
factor()
=============================
極限
(C1) limit( (2*x)/(x) , x , inf);
(C2) limit( (2*x)/(x) , x , 0);
=============================
微分方程式
deq1:'diff(y,x) = y;
ode2(deq1,y,x);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
初期値問題
1階
deq1: 'diff(y,x) = x;
adeq1: ode2(deq1 , y , x );
aq: ic1(adeq1 , x=0 , y=0);
at(aq , x=0);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
2階
deq3: 'diff(y,x,2)=6*x ;
adeq3: ode2(deq3 , y , x);
ic2( adeq3 , x=0 , y=1 , 'diff(y,x) = 0 );
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
境界値問題と、グラフ化
deq3: 'diff(y,x,2)=6*x ;
adeq3: ode2(deq3 , y , x);
a3: bc2( adeq3 , x=0 , y=1 , x=1 , y=2 );
plot2d(rhs(a3) , [x,0,3]);
=============================
データ出力
p:?draw2d(1/x,[x,0.05,10]);
gnuplot に出力する場合。(display2d:false をやらないと、- 0.02 みたいな表示になってマズイ)
display2d:false;
p:?draw2d(1/x,[x,0.05,10])$
with_stdout("c:\\0\\t.dat" , for i:1 step 2 thru length(p) do(print(p[i] , p[i+1])));
system(" echo plot 'c:\\0\\t.dat' w l; pause -1 | C:\\ntools\\gnuplot\\bin\\pgnuplot.exe");