Kitonum

13489 Reputation

24 Badges

11 years, 101 days

MaplePrimes Activity


These are questions asked by Kitonum

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);

 

 

restart;

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:

restart;

Circumcircle:=proc(a,b,c)

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

uses geometry;

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

n:=x2*y3-x3*y2+x3*y1-x1*y3+x1*y2-x2*y1;

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?

Circumcircle.mws

Obviously, that  f:=x->x^3  is the same function as  g:=t->t^3 . But

f:= x-> x^3;  g:= t-> t^3;

is(f=g);

 

Worse yet

f:= x-> x^3;  g:= x-> x^3;

is(f=g);

3 4 5 6 7 Page 5 of 7