from 2015-6-7

自分用の備忘録としてネット上にも残しておこうと思い書いています

tex_tex live guide 2016に書いてあること

/usr/local/texlive/2016/texmf-dist/doc/texlive/texlive-en/texlive-en.pdfに書いてあること

 


tex Live Manager program, named tlmgr

はじめに
http://tug.org/begin.html
a brief introduction to the system.
を読むべき


FAQ texmf-dist/doc/generic/FAQ-en/
   か
  http://www.tex.ac.uk/faq

カタログ http://mirror.ctan.org/help/Catalogue/

ウェブリゾース http://tug.org/interest.html

サポートは
he Usenet newsgroupnewsの
comp.text.tex

texhax@tug.org

http://tex.stackexchange.com

アーカイブ
http://groups.google.com/group/comp.text.tex/topics
http://tug.org/mail-archives/texhax

質問は
comp.text.tex
through Google
あるいはメールでtexhax@tug.org
でもポストする前に
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=askquestion
またLaTeXコミュニティサイトの
http://www.latex-community.org/
とフォーラムの
http://www.latex-community.org/forum/

TEX StackExchange at
http://tex.stackexchange.com/
を見るべき。
comp.text.tex and texhax
メーリングリスト。他人の質問に答えて助けられる。

<トップレベルtexliveディレクトリの構成>
binがプログラムを置いているところ
readme-*.dirがtexliveのquick overviewとuseful link
sourceは含まれているプログラムのソース
texmf-dist
tlpkg ウィンドウズ関連のファイルがある
installation scripts and READMEfilesもトップレベルにある。
トップレベルの,
the comprehensive linksや
doc.htmlも役にたつだろう
ほとんどすべてのもの(packages, formats, fonts, program manuals, man
 pages, Info files)のドキュメンテーションはtexmf-dist/docにある。

[texmfの名前がついたディレクトリについて。]
texmfdist per-platform executables(binの中に入っている)のファイルを除き入っている。
texmflocal  can use for system-wide installation of additional or up-
dated macros, fonts, etc.

texmfhome
texmfconfig used by the utilities texconfig,updmap, and fmtutil to store modified
     configuration data.
TEXMFVAR The (personal) tree used by texconfig, updmap and fmtutil to store (cached) runtime data such as format files and generated map files.


/usr/local/texlive/2016
にインストールされる(unixでは(mac含む))

3.4.6 Integrating local and personal macros
3.4.7 Integrating third-party fonts

3.5 Testing the installation
latex sample2e.tex
xdvi sample2e.dvi# UnixなんだけどEl Capitanでなぜか動かない
dviout sample2e.dvi# Windows
dvips sample2e.dvi -o sample2e.ps
Skim sample2e.dvi#パスはbash_profileに書いた
Skim sample2e.ps#Skimはdviもpsもpdfに変換できる

5.1 tlmgr GUI mode
tlmgr -gui
tlmgr update -all

7.1 Kpathsea path searching

 

 

maple_mapleで計算をしながら文章を書くやり方

Workbook Attachmentsをヘルプで検索して出てくるもののなかに

Setting a Worksheet to Open Automatically
You can set one or more worksheets to open automatically when you open your workbook.
To set a worksheet to open automatically:
1. In the Navigator palette, right-click on the worksheet, and then select Open Automatically.
2. Save your workbook.
ということを書いています。

そこで、ワークブックのファイルに、別のワークシート(mwのもの)をattach
して、workbook paneに表示されているそのワークシートを右クリックして
上に書いてあるように、Open Automaticallyを選び、ワークブックを保存して、!!!
を押します。attachしたワークシートにはa:=sin(v)とだけ書いていて、
ワークブックの方にはdiff(a,v);とだけ書くとします。

変数はworkbook のworkbook paneにも、attachしたmwファイルのworkbook paneにも
出てきていないのでsaveしていません。(変数がworkbook paneに出ないことは頻繁にあります)
「saveしなくても、Open Automaticallyでmwファイルを自動で開いたのだから、
必要ないはずだ」という考えがあることと、
上で書いたように、workbook paneには出てきていないのでどう変数をsave できるものかということから、変数はsaveしていません。そしてworkbookのほうで!!!を押したのですが、diff(a,v)は0となり、a:=sin(v)とattachしたことはmapleにより無視されています。

なにが悪いのでしょうね。

Maple URIは普通のURIと同じだけど、workbookにattachしたとき、そのある場所がthisが入るなど変わったURIです。readを使って、普通のmplファイルはworksheetに
読み込むことができるのですが、mplファイルをattachした場合には、readの引数にそのmaple URIを入れて、読み込むことができます。

mwファイルの場合はreadを使うとエラーが出ます。

「workbookだとattachしたファイルは読み込んでいる」という前提があるからだということになっているから必要ないということになるのかもしれませんが、saveで変数を

(workbook paneに現れないから)saveできない場合は、mwファイルを読み込んでも
使えないということになりそうです。

今のところだと、計算をやって出てきた結果を使って計算をやって、長い計算の結果を出す、ということをやろうとするときにどうやればコンパクトにできるか?変数を探し回ることなくできるかということについては、次のようにすればいいのではないかと

思っています(まだ実施してないから問題があるかもしれませんが)

ワークシートを開いて計算し、小さな計算をするごとにその小さな計算をmplファイルにして保存する。元のparentのワークシートの方にはread(そのmplファイル)というのを書いておく。そういう行がparentのワークシートにはたくさんある。

計算するときにはmplファイルを読み込んだ全部のワークシートを立ち上げる。(あるいは「mplファイルにせずにmwファイルにしておく」)Math Engineは共通のものを使うと、一つのワークシートで読み込んだ変数は別のワークシートで使える。

論文の計算を最後までしたあと、workbookか、一枚のワークシートにまとめる。

保存された変数がどのファイルにあるかということは、たぶんthisなんとかというmapleURIとattachしたもともとのファイルのURIは違うので、元々のファイルのあり場所を知っても意味がないと思うようになりました。workbookのworkbook paneで開いて加工しようが、それはもともとのファイルではないんじゃないかと思います。(確かめてない)たぶん、元々のファイルをthisなんとかという場所にコピーしたものをworkbookは参照しているのではないかと思います。だから、元々のファイルに変更を加えても、それが直接workbookに反映されるわけではない
と思います。

いずれにせよ、論文の計算をしていてごちゃごちゃしそうな状況をなくすためには部分部分の計算を別ファイルにすること、そしてそれを読み込むparentファイルを作っておくことかなあと今のところは思っています。

attachしたmwファイルを読み込んで変数をworkbook paneに表示させることができないないが、どうすればいいのかという疑問をもっています

それと、command + tで書いたファイルをmplで保存すると、保存されたmplを読み込んだ時には入力の2Dは2Dじゃなく1Dになったり、見慣れないコマンド(&int;)が入り、mplファイル自体は読みにくくなります

maple_僕のmapletips1.txt

パレットの表示の変更
方程式のラベル 必要な式だけが可能か?
またあとから前に書いた式にラベルをつけることが
可能か?そのときにそれまでにつけたラベルは順送り
されるか?Yes.フォーマット->方程式のラベル->選択部分のチェックボックスを入れたり
消したりする
方程式のラベル参照はcommand + h
実行グループをカーソルの前に挿入 command+k
カーソルの後に挿入 command+j
文書作成領域の挿入 command +t
補完 esc
右クリック ctr + クリック


**************************
2枚のA4をA4にまとめてpdfにする方法
mapleでpdfにする。
印刷->プレビュー でプレビューで開くことになる。
command+P プレビュー->レイアウト2
****************************
{x = x, y = -3*x+6}


実行グループの分割f3
実行グループの結合f4
sift command h クイックヘルプ
太字 command+b
イタリック command+i
アンダーライン command+u

数式を移動するのは選んでドラッグ
別の場所にコピーするのはoption+ドラッグ

documentブロックを折り畳む(数学的)
とdocumentブロックを展開する(メープル的)
を使って表示を切り替えれる

ドキュメントブロックの中の実行グループを展開
はview->expand execution block
たたむときはview->collapse execution block



ドキュメントブロックを消去してパラグラフを書いたり、
>でコマンドを書いて実行させて、そのあとまとめてドキュメントブロック
を作成する。さらに表示させたくないoutcomeがあれば左のルーラーの
ところを右クリックし、ドキュメントブロックを展開し、コマンドの
最後にコロン:を付ける。さらにドキュメントブロックを折り畳めば
きれいに見える。
(コードを隠すのにはドキュメントブロックを使う
結果を隠すのは:)
http://www.maplesoft.com/support/training/videos/maple12/04-Doc_Creation.aspx



表示ー>マーカー
フォーマットー>ドキュメントブロックを消去、作成
で数学ふうに表示したり、コマンド風に表示したりできる
その際に、表示->マーカーをしておくと便利

実行カーソル>を選んで挿入->文章作成領域 あるいはcommand + T
2dmath領域はcommand + R


view->show/hide contentsで表示されるものを決めれる。
(たとえばtableの区切り線を表示させるか否か)


数式の表示
sqrt(x) の部分を反転させた後、右クリックをします。
すると、コンテキストメニューが現れます。その中の「変換」から、
「2-D Math」を選んでいただければ、テキストの中に数式を入れられます。

注釈の付け方 format->注釈(annotations)
注釈を削除・編集 edit->注釈の削除・編集

キャンバスの入れ方
挿入->キャンバス

assumeコマンドを私用して名前に適用した前提条件はadditionally オプションを
指定した場合を除き、assumingコマンドでは無視される

assume(x < 1);
is(-x^2+1 > 0) assuming x > -1;
                             false
is(-x^2+1 > 0) assuming additionally, x > -1
                              trues

クイックヘルプはF1で呼び出す

****************************ここからノートに書き写す********
solve(2=x^2,x,useassumptions) assuming x>0;
というふうにuseassumptionsが必要

plots[display]の使い方
plot1 := plot(ln(x), x = 0 .. 25);
plot2 := plot(ln(x-5), x = 0 .. 25);
print(`output redirected...`); # input placeholder
plots[display]([plot1, plot2]);

ヘルプからプロットガイドでいろいろな図の書き方を知れる

図の大きさを変える(maple18から)
サイズを指定した場合:
plot(sin(x), size = [200,300]);
plot(sin(x), size = [default, golden]);
プロット全体に指定サイズを適応させる方法
plots[setoptions](size = [300, 100]);
plot(sin(x));


option+*1;

#上で得た式をyに代入します。
eval(y, d_a);

まとめると
eval(y,isolate(x,D(a)));


<<複数をisolateする方法: x^2+z^2=-t^2+y^2とする方法>>
t^2+x^2+y^2+z^2 = 0;
select(has, lhs(t^2+x^2+y^2+z^2 = 0), {x, z}) = R;
algsubs(x^2+z^2 = R, t^2+x^2+y^2+z^2 = 0);
isolate(t^2+y^2+R = 0, R);
algsubs(R = -t^2-y^2, x^2+z^2 = R);

**********ここから


<<第一項の分母のみのfactor>>
Expr:=-tau*alpha*sigma*omega*(tau-omega^(-sigma))/(s*L*(1-gamma-tau^2+tau^2*gamma))

-(sigma*alpha)/s*(1-tau*omega^sigma)/(omega^(sigma-1)*(1-gamma)*L*(1/tau-tau));

答え
A:=factor(denom(op(1, Expr)));

subs(op(1,Expr)=numer(op(1,Expr))*1/A, Expr);

別解
subsop(1= factor(op(1, Expr)), Expr);

別解2
subs(op(3,denom(op(ex)[1]))=factor(op(3,denom(op(ex)[1]))),ex);

係数をfactorする
a:=sigma*omega*alpha = mu(H, H)*s*omega*gamma1*L+mu(F, H)*s*L-mu(F, H)*s*L*gamma1;
collect(a, {mu(F,H),s,L}, factor);
sigma*omega*alpha = s*L*(1-gamma1)*mu(F, H)+mu(H, H)*s*omega*gamma1*L
とmu(F,H)の係数でまとめて、その係数をfactorすることができる。

別のやりかたとしてはappyruleを使う方法がある(がcollect({a,b,c},factor)のほうがいい)
algsubsではa*c/(a+b)のa/(a+b)をxと置き換えることができない。
このときにはstudent[powsubs](a=b,f)
を使うか、applyruleを使う

algsubsの使い方
f:=x*y+x^2*y+x/y^2+1
algsubs(x*y=0,f)は0+x*(x*y)+x/y^2+1となりx/y^2+1
algsubs(x/y=0,f)はx*y+x^2*y+1 {x/y^2=x*y^(-2)}だが

「uのmonomialがvのmonomialを割れるためには。
i) 0=<degree(u,x)=<degree(v,x)か ii) degree(v,x)=<degree(u,x)<0
のいずれかでなければならないということから(ヘルプ参照)」

今の場合は割られるもの(v)x/y^2、割るもの (u) x/yがmonomial(単項)について
degree(v,y)=-2<-1=degree(u,y)となるので ii)の基準からyで割れる。
xについては
degree(u,x)=1=degree(v,x)なので i)の基準からxで割れる
これからx/y=0をfにalgsubsできることになる。

f := 2*a+b;なら
algsubs( a+b=c, f, [a,b] );はaを先に考えて
2c-b=2(a+b)-bとなるから2c-bを返す。
algsubs( a+b=c, f, [b,a] );はbを先に考えて
a+b=c->b=c-aなので
2a+b=b+2a=(c-a)+2a=c+a=a+cと計算

またexactのoptionを付けて
algsubs(a+b = p, 2*a+b, exact)とすると、
aの係数がa+bの1と2*a+bの2というふうになり、2/1がaについての係数の比だけど
bの係数がa+bの1と2*a+bの1というふうになり、1/1がbについての係数の比
となり、その二つの係数の比はことなるので返ってくる値は
2*a+bという元のままのものである。

subsと同じで代入前に積やパワー(乗)を展開したりしない。
subs(x = 1, a[x])がa[1]だがalgsubs(x=1,a[x])は
a[x]を返す。つまり内のインデックスネームには代入しない。

また代入の結果に、ファンクションコールが適用される(w*y=0をfに代入するなら
w*yを代入した結果に、w*y=0が適用されてw*yをゼロにおくということ)

expandについて

ee:=(a+b)*z+sin(a+b)+exp(a+b)

expand(ee,sin(a+b))とすればsin(a+b)は手をつけない
ようにできる
またindetsを使うやり方もある。
expand(ee, op(indets(ee, specfunc(anything,exp))));
     z a + z b + sin(a) cos(b) + cos(a) sin(b) + exp(a + b)
 the exponentialとsineを展開しない
expand(ee, op(indets(ee, specfunc(anything,[exp,sin]))));
              z a + z b + exp(a + b) + sin(a + b)
すべての関数を展開しない
expand(ee, op(indets(ee, function)));
              z a + z b + exp(a + b) + sin(a + b)
b := (sin(x+y)+sin(x-y))^2;
frontend(expand,[b]);

sin(x+y)^2+2*sin(x+y)*sin(x-y)+sin(x-y)^2
を得れる。関数はすべてexpandしない



indetsの使い方
indeterminantsを返す。タイプネームをつけるとindeterminates以外の物も拾う
indets(3*x^2-5*x*y+6-y^2);
                             {x, y}
a:=5*x-3*sin(y)+x*y^4+exp(z^2);
indets(a);
                  { x, y, z, exp(z^2), sin(y) }
indets(a,function);
                      { exp(z^2), sin(y) }
次のやり方で効率的に拾える
e := x^(1/2) + exp(x^2) + f(9):
indets(e, 'specfunc(anything, {f,g})');
{f(9)}


applyopの使い方
p := y^2-2*y-3;
applyop(f,2,p);
結果は
y^2+f(-2*y)-3

mapは
map(f, x + y*z);
で+のoperandにfがかかりf(x)+f(y*z)となる
map(f,x*y)ならf(x)*f(y)と*のoperandにfが
掛かる。





combine(f, `@@`)
combine/@@ combines nested functions into function expressions using the iterated composition operator, "@@"
>combine(f*2, `@@`);
(f@@4)(x)
>combine(g*3(x))), `@@`);
(g@@3)(x)




 




****************************************************


行列の計算
http://ist.ksc.kwansei.ac.jp/~nishitani/Lectures/Maple/LA/VectorMatrix.pdf
http://ist.ksc.kwansei.ac.jp/~nishitani/Lectures/Maple/LA/Inner&Outer.pdf
http://ist.ksc.kwansei.ac.jp/~nishitani/Lectures/Maple/LA/Det&Inverse.pdf
http://ist.ksc.kwansei.ac.jp/~nishitani/Lectures/Maple/LA/Eigenvalues.pdf
http://ist.ksc.kwansei.ac.jp/~nishitani/Lectures/Maple/Symbolic/Ex2.pdf




mapleの勉強方法
http://ist.ksc.kwansei.ac.jp/~nishitani/Lectures/Maple/
?mapleresources
で検索すると勉強手段が出てくる。

?examples/index
でいろいろでてくる

********?examples/index*****************
Symbolic Calculations
<<Define>>

>define(f, linear, f(1) = tt);
>f(2*x+4);
2 f(x) + 4 tt
>define(g, g(a::algebraic^n::(nonunit(integer))) = n*g(a), g(a::realcons) = a);
>g(x^2)
2*g(x)
>g(Pi*sqrt(2))
Pi*sqrt(2)

>define(P, diff(P(x), x) = 1/P(x));
>diff(P(x), x);
1/P(x)
>diff(P(exp(z)), z);
exp(z)/P(exp(z))
>diff(1/P(x^2), x);
-2*x/P(x^2)^3

IntegrationTools[command](arguments)
command(arguments)
の使い方

plotsetup(maplet);
plot(x, x = 0 .. 1);
で図だけ別表示できる


myTipsofMaple。mwからの書き出し
> Maple上でmathMLに変換→Mathtypeにペーストして数式をつくる作り方は
> MathML[Export](式)として式を変換し、それをコピーして、Mathtypeにペーストする。
> その時に、Mathtypeの設定を、MathMLがペーストできるように変える。
>

代入について
> 副次式を代入する場合には algsubs コマンドを使用します。 > algsubs(a+b=1, a+b+c); 1 + c > subs(a*b=2,
> a*b*c); * a b c > algsubs(a*b=2, a*b*c); 2 c
powerの簡単化の方法

> simplify*4;
{\frac {\sin \left( x \right) }{\cos \left( x \right) }}
> diff(sin(x),x);
cos(x)
> eq := Diff(sin(x),x);
d eq := --- sin(x) dx
> latex(eq);
{\frac {d}{dx}}\sin \left( x \right)
> eq=value(eq);
d --- sin(x) = cos(x) dx
> latex(eq=value(eq));
{\frac {d}{dx}}\sin \left( x \right) =\cos \left( x \right)
>
> simplifyにsizeをつけるとより簡単になる
> c := v =
> -(-w[2]*theta*w[1]-theta*w[2]-w[2]^2*phi^2-w[2]*phi^2+theta*w[2]^2*phi^2+theta
> *w[2]*phi^2+theta*phi*w[1]^2+w[1]*w[2]*phi+phi*w[1]-w[1]*theta*w[2]*phi)/(-w[1]*
> theta*w[2]*phi-phi*w[2]^2-w[2]*phi+phi*theta*w[2]^2+theta*phi^2*w[1]^2+theta*phi
> ^2*w[1]+w[2]*w[1]+w[1]-w[2]*theta*w[1]-theta*w[1]);
             /                                    2    2           2
  c := v = - \-w[2] theta w[1] - theta w[2] - w[2]  phi  - w[2] phi

                 2    2                 2                 2                
     + theta w[2]  phi  + theta w[2] phi  + theta phi w[1]  + w[1] w[2] phi

                                     \//                               2
     + phi w[1] - w[1] theta w[2] phi/ \-w[1] theta w[2] phi - phi w[2]

                                2            2     2            2     
     - w[2] phi + phi theta w[2]  + theta phi  w[1]  + theta phi  w[1]

                                                      \
     + w[2] w[1] + w[1] - w[2] theta w[1] - theta w[1]/
>
> simplify(c,size);
        /    2                 2
    v = \-phi  (theta - 1) w[2]

         /                                    2                    \     
       + \(theta - phi + theta phi) w[1] + phi  (1 - theta) + theta/ w[2]

                                  2\//                    2
       - phi w[1] - theta phi w[1] / \(theta - 1) phi w[2]

       + *5 = y(x) }
                  \                                             /
> j:=diff(h,x);
                 /       / d      \                / d      \      
           j := { 2 y(x) |--- y(x)| - 2 z(x) - 2 x |--- z(x)| = 0,
                 \       \ dx     /                \ dx     /      

                               /         / d      \\    d      \
             2 x + sin(x z(x)) |z(x) + x |--- z(x)|| = --- y(x) }
                               \         \ dx     //    dx     /
> solve(j,{diff(y(x),x),diff(z(x),x)});
            / d           2 y(x) x + y(x) sin(x z(x)) z(x) - z(x)  
           { --- z(x) = - ---------------------------------------,
            \ dx                 x (y(x) sin(x z(x)) - 1)          

              d                   2 x         \
             --- y(x) = - -------------------- }
              dx          y(x) sin(x z(x)) - 1/
> 分母と分子を消去しないやりかた
> aa:=``(delta[1]*n[1])/``(n[f1]*delta[1]);



一時的代入は't'というふうに' 'で囲む。
> t:=a+1/a;
                                           1
                                  t := a + -
                                           a
> t^2+2;
                                        2    
                                 /    1\     
                                 |a + -|  + 2
                                 \    a/     
> 't'^2+2;
                                     2    
                                    t  + 2
>
代入についてsimplify(x^3,{x^2=3*a+1});というのがalgsubsと同じ働きをするものとして使えそう。
> simplify(x^3,{x^2=3*a+1});
                                  3 x a + x
> コマンド+シフト+スペースで入力補完

cat コマンドを使ってTikzで使えるデータを作る。
pl := plot(sin(x), x=0..5, numpoints=100);
data := plottools[getdata](pl);
M := data[-1];
seq(M[i], i = 1 .. 100);%でモニターにMのデーターがうつる。
ExportMatrix("test.dat”,M);%テキストファイルとして保存する場合(保存できない場合はファイルを作って、
そのファイルへのパスを書く)
ExportMatrix("test.csv", M, delimiter=“,”);%cvsデータとして保存する場合

pt:=Matrix(2,2, [[1,2],[3,5]]);
TikZdata := cat("(", convert(pt[1,1], string), ",", convert(pt[1,2], string), ")", " -- ");
とすることで
TikZdata := "(1,2) -- "
と表示される。Tikzの形式

mapleデータをtikzで利用する方法
pl := plot(sin(x), x = 0 .. 5, numpoints = 100);
data := plottools[getdata](pl);
M := data[-1];
string1 := cat(seq(sprintf("(%a,%a,)==", M[k, 1], M[k, 2]), k = 1 .. op([1, 1], M)))[1 .. -3];

thisproc, _passedの使い方

p := proc( expr )
if type( expr, 'numeric' ) then
          sin( 2 * expr )
      elif type( expr, { '`+`', '`*`' } ) then
          map( thisproc, _passed )
      else
          'procname'( _passed )
      end if
end proc:
> p( 2 );
sin(4)
> p( x );
p(x)
> p( x + 1 );
p(x)+sin(2)
>p(a*b);
p(a)*p(b)


微分の仕方
f := x->x^2;
with(Student[MultivariateCalculus]);
Jacobian([f(x)], [x] = [3])
上のだとf(x)をxで全微分して、x=3で評価している

*1:shift+return)<====enter) でインライン評価

<paragraphでパラグラフ挿入(タイトルを入れる時など)>>
edit->Split/Joinedで一つの大きなパラグラフを作る。
それから>のアイコンをクリック(command+sift+< (?))で
パラグラフを作る。

入力についてcommand +T…..textモード
          command +R…2D数式モード
      command+underscore…subscript


plotbuilderの使い方
tool->assistant->plotbuilderで
図のcode(コード、コマンド)を吐き出させたり、図そのものを描ける。
パッケージの呼び出しwith(Student[Precalculus])などが
必要な場合もある。(どのパッケージが必要かはエラーをみて
考える)
 そのコードをコピーペーストして出て来たものをdocument block
を使ってコマンドを消すこともできる。
一旦document blockをformat->Remove document blockで消して
指定して再度Create documentblockにする
View->Expand Document blockやCollapse document blockを
使って展開したり折り畳むこともできる。

plot(x^2, x = -1 .. 1, labels = [x[old], x[old]^2], labelfont = [TIMES, ITALIC, 16])
で軸に^2や、_oldを入れる事ができる。






******************************************************
<<spreadsheet>>
~B$1 で参照。$1は絶対指定 Bは相対指定
列をドラッグして、メニューバーのfill->detailed->Step Sizeを1へ

<<両辺から同じ数を引く>>
eq:=4*x+17=23
eq-(17=17)
とすれば両辺から17が引かれる

siderels:=x^2+y^2=1
simplify(fnc,siderels,[x,y])
とすることで
x^2=1-y^2を計算しそれをfncの中に
代入して単純化

<<部分的に項をまとめる>>
eqmH1 := sigma*omega*alpha = mu(H, H)*s*omega*gamma*L+mu(F, H)*s*L-mu(F, H)*s*L*gamma;

collect(eqmH1,{mu(F,H),s,L});
とすると
sigma*omega*alpha = (1-gamma)*L*s*mu(F, H)+mu(H, H)*s*omega*gamma*L


<<代入して変数を消す方法>>
x := D(a*b*c = 3*d);
y := D(a^2*b^3*c = 3*a);

#"isolate"コマンドでD(a)のみを左辺に移動します。
d_a := isolate(x, D(a

*2:f@@3)(x

*3:g@@4)((g@@(-2

*4:a^b)^c);
                                        c
                                    / b\
                                    \a /
> simplify((a^b)^c,power);
                                        c
                                    / b\
                                    \a /
> simplify((a^b)^c,power,symbolic);
                                     (b c)
                                    a     
> x^a*y^b;
                                     a  b
                                    x  y
> simplify(x^a*x^b,power);
                                    (a + b)
                                   x       
> 変数がどういう性質かをみるときaboutを使う


> assume(a>0);
> about(a);
Originally a, renamed a~: is assumed to be: RealRange(Open(0),infinity)
> 実数の答えのみ出るようにするRealDomain指定をする。
> use RealDomain in simplify( sqrt( x^2 ) ) end;
                                     |x|
> か、with(RealDomain);として計算する。
> with(RealDomain);
Warning, these protected names have been redefined and unprotected: Im, Re, `^`,
arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, arcsech, arcsin,
arcsinh, arctan, arctanh, cos, cosh, cot, coth, csc, csch, eval, exp, expand,
limit, ln, log, sec, sech, signum, simplify, sin, sinh, solve, sqrt, surd, tan,
tanh
[Im, Re, ^, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, arcsech,

  arcsin, arcsinh, arctan, arctanh, cos, cosh, cot, coth, csc, csch, eval, exp,

  expand, limit, ln, log, sec, sech, signum, simplify, sin, sinh, solve, sqrt,

  surd, tan, tanh]
> solve(x^3-1,x);
                                      1
> 下添字は
                                     ?

> p[x]:=5;
                                  p[x] := 5
> Format->paragraphで位置を変えれる
>
Command +4で400%にZOOM FACTOR


>
mapleでtexコードを出させる

> latex(sin(x)/cos(x

*5:-theta phi + 1 - theta) w[1] - phi) w[2]

              /         2                 2            \\
       + w[1] \theta phi  w[1] + theta phi  + 1 - theta//
> collectについて factorをoptionとして付けるととても簡単になる
> c := v =
> -(-w[2]*theta*w[1]-theta*w[2]-w[2]^2*phi^2-w[2]*phi^2+theta*w[2]^2*phi^2+theta
> *w[2]*phi^2+theta*phi*w[1]^2+w[1]*w[2]*phi+phi*w[1]-w[1]*theta*w[2]*phi)/(-w[1]*
> theta*w[2]*phi-phi*w[2]^2-w[2]*phi+phi*theta*w[2]^2+theta*phi^2*w[1]^2+theta*phi
> ^2*w[1]+w[2]*w[1]+w[1]-w[2]*theta*w[1]-theta*w[1]);
             /                                    2    2           2
  c := v = - \-w[2] theta w[1] - theta w[2] - w[2]  phi  - w[2] phi

                 2    2                 2                 2                
     + theta w[2]  phi  + theta w[2] phi  + theta phi w[1]  + w[1] w[2] phi

                                     \//                               2
     + phi w[1] - w[1] theta w[2] phi/ \-w[1] theta w[2] phi - phi w[2]

                                2            2     2            2     
     - w[2] phi + phi theta w[2]  + theta phi  w[1]  + theta phi  w[1]

                                                      \
     + w[2] w[1] + w[1] - w[2] theta w[1] - theta w[1]/
> g:=collect(c,phi,factor);
           /                               2
g := v = - \w[2] (w[2] + 1) (theta - 1) phi

                                                                           \/
   - w[1] (-theta w[1] - w[2] - 1 + theta w[2]) phi - theta w[2] (w[1] + 1)/

  /                         2                                                 
  \theta w[1] (w[1] + 1) phi  + w[2] (-theta w[1] - w[2] - 1 + theta w[2]) phi

                                \
   - w[1] (w[2] + 1) (theta - 1)/
> 陰関数の微分。implicitdiffを使うが、2つの式があり3つの変数x,y,zがあり、y,zがxの関数と考えて、xでy, zを微分する方法
> f:=y^2-2*x*z=1: g:=x^2-cos(x*z)=y: implicitdiff({f,g},{y,z},y,x);
                                      2 x      
                               - --------------
                                 y sin(x z) - 1
> implicitdiff({f,g},{y,z},z,x);
                            2 y x + y sin(x z) z - z
                          - ------------------------
                               x (y sin(x z) - 1)   
> 他方で次のやりかたも使える。
> h:=eval({f,g},{y=y(x),z=z(x)});
                  /    2                  2                     \
            h := { y(x)  - 2 x z(x) = 1, x  - cos(x z(x

maple-ユーザーインターフェースの使い方

コメントの書き方

command+Jで次の行に実行行(>の行)を挿入(command+kで前の行に挿入)

command+t でテキストモードにする

fn+f5で数式を入れる

数式を不活性化するにはsift+fn+f5

ギリシャ文字はcommand+sift+g でfとすればφ、dとすればδ等。

 

コマンドをすべて実行するのはcommand+sift+return

行を消すのはcommand+delete

 

実行行について

alias(`&delta;x`=dx, `&Delta;x`=Dx,`&Delta;y`=Dy):#を入れておけばdxと書けば

δ+xになるし、Dxと書けばΔxとなる。

 

PDEtools:-declare(f(x),prime=x,copyasdisplayed = true);

とすると

diff(f(x)*g(x),x);の結果が(diff(f, x))*g(x)+f*(diff(g(x), x))だが、この表示が簡単になる。

 

clisp-lispの動かし方

slime—clispを使うときのインターフェース
M-x slimeで起動
http://qiita.com/bori_so1/items/38182e4171fad82c7ff0

Gaucheの動かし方
;;gauche                                                                   
;;http://qiita.com/da1/items/02f7d2f157c7145d58f2                          
;;C-c Sでインタプリタの起動                                                
;;C-c C-lでファイルのロード                                                
;;C-x C-eで直前の式を評価

maple-changevarとCompleteSequare

x^4+3*x^2+5
を完全平方する。このときに、changevarを使う。

with(student):
p:=changevar(x^2=t,x^4+3*x^2+5);
                           2          
                          t  + 3 t + 5
q:=Student[Precalculus][CompleteSquare](p,t);

#がlong form. Shortformはwith(Student[Precalculus]);

#CompleteSquare(p,t)とする。

                                2     
                         /    3\    11
                         |t + -|  + --
                         \    2/    4
r:=changevar(t=x^2,q);
                                 2     
                         / 2   3\    11
                         |x  + -|  + --
                         \     2/    4

説明: Student[changevar](x^2=t,x^4+3*x^2+5);はx^2をtと置く。だからx^2はt^2

となる。そうしないと、Student[Precalculus][CompleteSquare](p,t);で平方完成できない。平方完成してから、t=x^2を入れてtを元に戻す