19511 Reputation

26 Badges

14 years, 324 days

MaplePrimes Activity

These are questions asked by Kitonum

properties of operations on sets?



is((A minus B) intersect (A minus C) = A minus (B union C)) assuming A::set, B::set, C::set;


Contour lines must be ordinary circles. In fact, we get:

plots[contourplot](1/(x^2+y^2), x=-1..1, y=-1..1);



If we use the additional options, the result is even worse:

plots[contourplot](1/(x^2+y^2), x=-1..1,y=-1..1, numpoints=10000);




Vector([a, b]);  <a, b>;  # Identical results

a:=[1, 2]:  b:=[3, 4]:

Vector([a, b]), <a, b>;   # Different results. Why?




evalf(10.2^20, 50);

evalf((10+1/5)^20, 50);


Where are 50 digits of the first result?

It is well known that  operating in  geometry  package when setting objects symbolically some inconveniences arise. The error occurs if you do not set limits on the parameters. I wrote the procedure for finding center and radius of the circumscribed circle, devoid of drawbacks:



local x1, y1, x2, y2, x3, y3, n;

uses geometry;

x1,y1:=op(a); x2,y2:=op(b); x3,y3:=op(c);


point(A,a), point(B,b), point(C,c);

if type(n,realcons) then triangle(T,[A,B,C]); circumcircle(cc,T,'centername'=OO);

return [coordinates(OO),radius(cc)]  else assume(n<>0);

triangle(T,[A,B,C]); circumcircle(cc,T,'centername'=OO);

simplify([coordinates(OO),radius(cc)]); fi;

end proc:


At initial startup procedure works correctly:

Circumcircle([x1,y1], [x2,y2], [x3,y3]);



But if you change the arguments of the procedure, an error occurs:

Circumcircle([x1,1], [x2,y2], [x3,y3]);


But if you run the procedure again with the same arguments, the error disappears:

Circumcircle([x1,1], [x2,y2], [x3,y3]);


What is the reason?


4 5 6 7 8 Page 6 of 8