solvex 概要

solvex は冪乗根関数で表された方程式,不等式の系を指定された変数についての1次式を原始式とする系に変換する関数です.

例えば,3数の相加平均と相乗平均とが一致する条件を得ようとしても,qex では...

(%i1) qex(a>=0 %and b>=0 %and c>=0 %and (a*b*c)^(1/3)=(a+b+c)/3);
Evaluation took 1.0500 seconds (1.4300 elapsed) using 117.327 MB.
(%o1) (a >= 0) %and (b >= 0) %and (c >= 0)
                %and (c^3+3*b*c^2+3*a*c^2+3*b^2*c-21*a*b*c+3*a^2*c+b^3+3*a*b^2+3*a^2*b+a^3 = 0)

一方,solvex は

(%i2) solvex(a>=0 %and b>=0 %and c>=0 %and (a*b*c)^(1/3)=(a+b+c)/3);
Evaluation took 8.3100 seconds (16.3700 elapsed) using 761.807 MB.
(%o2) [[0 <= a,b = a,c = a]]

と答えます.

solvex の書式は solvex(formula,var1,...,varN)であり,formula を var1,...,varN のうち listofvars(formula) の要素について順に解こうとし,それら以外の変数は定数と見做します.

ただし,solvex(formula) は listofvars(formula) の全ての要素について順に解こうとし,それら以外の変数は定数と見做します.

出力は,bracket dnf,つまり,2重のリストであり,外側のリストのヘッドは %or,内側のリストのヘッドは %and を表わしています.

%or,%and の表示に変換するには,ora コマンドで

(%i3) ora(%);
Evaluation took 0.0000 seconds (0.0100 elapsed) using 817.102 KB.
(%o3) (0 <= a) %and (b = a) %and (c = a)

元に戻すには,bra コマンドで

(%i4) bra(%);
Evaluation took 0.0200 seconds (0.0200 elapsed) using 1.058 MB.
(%o4) [[0 <= a,b = a,c = a]]

といった具合です.

また,この書式による入力も可能で

(%i35) solvex([[x^2=a,x>-1]],x);
Evaluation took 8.4900 seconds (18.3800 elapsed) using 469.256 MB.
(%o35) [[a < 1,x = -sqrt(a)],[x = sqrt(a)]]

と出来,ご覧のように冪乗根を含んだ出力に対応しています.