toy problems
最後の簡約は重いので無効化します(笑).
(%i1) postsimp:off$ Evaluation took 0.0000 seconds (0.0000 elapsed) using 32 bytes.
放物線と直線との交わり.
(%i2) solvex(y=x^2 %and x+y=1,x,y); Evaluation took 5.4600 seconds (11.3400 elapsed) using 315.180 MB. (%o2) [[x = (-sqrt(5)/2)-1/2,y = sqrt(5)/2+3/2], [x = sqrt(5)/2-1/2,y = 3/2-sqrt(5)/2]]
領域と直線との交わり.
(%i3) solvex(y>x^2 %and x+y=1,y); Evaluation took 2.1600 seconds (4.7800 elapsed) using 120.922 MB. (%o3) [[(-sqrt(5)/2)-1/2 < x,x < sqrt(5)/2-1/2,y = 1-x]]
x について解くと.
(%i4) solvex(y>x^2 %and x+y=1,x); Evaluation took 2.2100 seconds (4.9300 elapsed) using 122.540 MB. (%o4) [[3/2-sqrt(5)/2 < y,x = 1-y,y < sqrt(5)/2+3/2]]
放物線と領域との交わり.
(%i5) solvex(y=x^2 %and x+y<1,y); Evaluation took 2.4200 seconds (5.0200 elapsed) using 146.358 MB. (%o5) [[(-sqrt(5)/2)-1/2 < x,x < sqrt(5)/2-1/2,y = x^2]]
x について解くと.
(%i6) solvex(y=x^2 %and x+y<1,x); Evaluation took 6.7700 seconds (11.4300 elapsed) using 462.988 MB. (%o6) [[0 <= y,x = -sqrt(y),y < 3/2],[0 <= y,x = sqrt(y),y < 3/2-sqrt(5)/2], [3/2-sqrt(5)/2 < y,x = -sqrt(y),y < sqrt(5)/2+3/2]]
結果が見難いので,x を含む式とその他とに分離.
(%i7) sepaxa(%,x); Evaluation took 0.0000 seconds (0.0000 elapsed) using 8.836 KB. (%o7) [[[x = -sqrt(y)],[0 <= y,y < 3/2]], [[x = sqrt(y)],[0 <= y,y < 3/2-sqrt(5)/2]], [[x = -sqrt(y)],[3/2-sqrt(5)/2 < y,y < sqrt(5)/2+3/2]]]
解の選択.
(%i8) solvex(3*x^2=2 %and 1<x); Evaluation took 0.2100 seconds (0.5500 elapsed) using 9.020 MB. (%o8) [[false]]
空のようなので,改めて.
(%i9) solvex(2*x^2=3 %and 1<x); Evaluation took 2.9600 seconds (6.4500 elapsed) using 211.316 MB. (%o9) [[x = sqrt(3)/sqrt(2)]]
不等式の連言.
(%i10) solvex(2*x^2<=3 %and 1<x); Evaluation took 2.6700 seconds (3.7200 elapsed) using 174.558 MB. (%o10) [[1 < x,x <= sqrt(3)/sqrt(2)]]
いきなり 3 変数ですが.
(%i11) solvex(a*x^2=b %and a<x); Evaluation took 2.7200 seconds (7.5900 elapsed) using 215.724 MB. (%o11) [[0 < x-a,b = a*x^2]]
変数の指定が必要です.
(%i12) solvex(a*x^2=b %and a<x,x); Evaluation took 6.7700 seconds (19.4000 elapsed) using 487.579 MB. (%o12) [[0 < a,a^3-b < 0,x = sqrt(b/a)],[a < x,a = 0,b = 0], [a < 0,a^3-b < 0,b <= 0,x = -sqrt(b/a)],[a < 0,b <= 0,x = sqrt(b/a)]]
見易く整理.
(%i13) sepaxa(%,x); Evaluation took 0.0000 seconds (0.0000 elapsed) using 12.602 KB. (%o13) [[[x = sqrt(b/a)],[0 < a,a^3-b < 0]],[[a < x],[a = 0,b = 0]], [[x = -sqrt(b/a)],[a < 0,a^3-b < 0,b <= 0]], [[x = sqrt(b/a)],[a < 0,b <= 0]]]
http://www.cybernet.co.jp/maple/documents/pdf/product/maple/maple17/maple17_new_feature31.pdf
の 2 つ目の例.
(%i14) solvex(a*x^2<b %and a<x,x); Evaluation took 31.4200 seconds (47.6300 elapsed) using 2388.419 MB. (%o14) [[0 < a,a < x,a < 0,b < 0],[0 < a,a < x,-sqrt(b/a) < x,x < sqrt(b/a)], [0 < b,a < x,a = 0],[0 < b,a < x,a < 0],[x < -sqrt(b/a),a < x,a < 0], [a < x,sqrt(b/a) < x,a < 0]]
やはり簡約は必要ですね.
(%i15) plineq(%,1); Evaluation took 0.2200 seconds (0.7700 elapsed) using 10.936 MB. (%o15) [[0 < a,a < x,-sqrt(b/a) < x,x < sqrt(b/a)],[0 < b,a < x,a = 0], [0 < b,a < x,a < 0],[a < x,sqrt(b/a) < x,a < 0], [x < -sqrt(b/a),a < x,a < 0],[false]]
見易く整理.
(%i16) sepaxa(bra(ora(%)),x); Evaluation took 0.4100 seconds (0.4100 elapsed) using 30.975 MB. (%o16) [[[a < x,-sqrt(b/a) < x,x < sqrt(b/a)],[0 < a]], [[a < x],[0 < b,a = 0]],[[a < x],[0 < b,a < 0]], [[a < x,sqrt(b/a) < x],[a < 0]],[[a < x,x < -sqrt(b/a)],[a < 0]]]