vv

13867 Reputation

20 Badges

9 years, 357 days

MaplePrimes Activity


These are replies submitted by vv

@Alfred_F 

1. Accepting the existence of a maximal area polygon, the fact that it is cyclic follows easily from the elementary case n=4.

2. The polygon being cyclic, any 3 distinct vertices A[i], A[j], A[k] will do.

@MaPal93 Forget abaut Maple, think mathematically:

 d/dX[i] sum(X[i]^2, i= 1..3)  =  d/dX[i] ( X[1]^2 + X[2]^2 + X[3]^2 ) 

= d/dX[i]  X[1]^2 + d/dX[i]  X[2]^2 + d/dX[i]  X[3]^2 = ?

The last sum should be 2X[i]  if i is in {1,2,3} and 0 otherwise, but it is much better to avoid such expressions in Maple; for Sum d/dX[i] is applied to the summand.

 

@MaPal93 

DXI = diff(OBJ, X[i]);
has two problems:
--   you want :=  instead of 

--   diff(OBJ, X[i])  cannot work well (actually it makes no sense) when X[i] appears in sum( ..., i=1..n)

@MaPal93 

factor(expand(value(DB_wrong-DB_correct)));

         

So,  DB_wrong <> DB_correct;  DB_wrong is correct! 

You have changed the code with something unexplained!

@MaPal93 X__i and X__r are just symbols, they do not depend on the variables i and r.
So, for example sum(X__i, i=1..3)  simplifies to 3*X__i  and appears as  3 Xi

Use only subscripted names X[i]; avoid  X__i which is used only for typesetting purposes.

@Alfred_F The computations are easy (by hand) and are not Maple related. 
The perimaters can be arbitrarily large. By replacing a portion of a ray by an isometric copy of the graph of x -> b*x*sin(1/x), x in [0,a], the perimeters will be infinite.

@mmcdara Interesting and useful information. Thank you!

I've seen even library procedures using:

if cond or is(cond) then ... fi

@vv We can generate infinitely many solutions e.g. playing with u1 and u3 and using fsolve.

solfs:=fsolve([perim, u1=8, u3=12]); # infinitely many solutions, playing e.g. with u1 and u3
   #    {u1 = 8.000000000, u2 = 7.152963125, u3 = 12.00000000,  v1 = 0.5346258468, v2 = 0.2316337764, v3 = 0.5061472158,  v4 = 0.1464801560, v5 = 0.3671814714, v6 = 0.4712668716}

eval(seq("A"||i=A||i,i=0..8), solfs);
#   "A0" = [0, 0], "A1" = [8.000000000, 0],    "A2" = [7.152963125, 12.00000000], "A3" = [4.277006774, 0],   "A4" = [7.803797650, 2.779605317], 
#   "A5" = [7.571274644, 6.073766590],  "A6" = [1.047767154, 1.757761872],  "A7" = [2.626435525, 4.406177657],  "A8" = [4.231660510, 2.239322836]

eval([perim], solfs);
#    [10.00000000 = 10, 15.00000000 = 15, 11.00000000 = 11,
#      9.000000001 = 9, 13.00000000 = 13, 12.00000000 = 12, 
#      20.00000000 = 20]

plots:-display(plot(eval([A0,A1,A2,A0],solfs)), plot(eval([A3,A4,A6,A3],solfs)), plot(eval([A5,A7,A8,A5],solfs)), scaling=constrained);

 

So, you want to prove that if X in M_n(R) commutes with any invertible matrix A then X is a scalar multiple of Id (= identity matrix).

(Here R is a unitary and commutative ring).

This is easy to prove by taking A = Id + E, where E has a zero diagonal and a single nonzero entry. 
But not so easy with Maple, and I don't understand why  you want it; it would be very artificial and useless.

@one man  Here is a compact version for animation:

restart;

with(plots):
A := [cos(t),sin(t)]:
sol := solve({x^2+y^2-1=0,  (x-cos(t))^2+(y-sin(t))^2 - sin(t)^2 =0}, [x,y], explicit):
P1:=rhs~(sol[1]): P2:=rhs~(sol[2]):
F := proc(a, dt:=0.02) Threads:-Sleep(dt);  display(
  plot([A[],t=0..2*Pi]), 
  plot(eval([P1,P2], t=a), symbolsize=20, color=red),
  plot(eval([A, [cos(t),0]], t=a), symbolsize=20, color=gold, thickness=4),
  plot([eval([P1,P2], t=a)], color=red, thickness=4), 
  plot([cos(t),sin(t)/2, t=0..a], color=blue, thickness=4),  
  implicitplot( (x-cos(a))^2+(y-sin(a))^2 - sin(a)^2 =0, x=-2..2,y=-2..2, color=green),
  textplot([[cos(a),sin(a), "A"], [cos(a),sin(a)/2, "C"]],align=left),
  scaling=constrained, view=[-2..2, -2..2]   ) end proc:

Explore( F(a), a=0..2*Pi, animate, autorun, loop );

 

The fact that the locus of C is an ellipse is easy to prove:

restart;
A := [cos(t),sin(t)]:
sol := solve({x^2+y^2-1=0,  (x-cos(t))^2+(y-sin(t))^2 - sin(t)^2 =0}, [x,y], explicit):
P1:=rhs~(sol[1]): P2:=rhs~(sol[2]):
C:=simplify(P1+lambda*~(P2-P1)):
lambda := solve(C[1]=cos(t), lambda):
C:=simplify(C);

              C := [cos(t), (1/2)*sin(t)]

So, the locus is an ellipse with semiaxes 1 and 1/2.

@mmcdara I never recommend to students to solve such problems using just Maple. But it is nice to know how to use Maple to check maths resuts while learning.

@Carl Love Yes, you are right

eps:=1e-5:
Optimization:-LPSolve(AD, {CD=AB-2, BC=AB+2, AD=AB+BC+CD, AB>=eps, BC>=eps, CD>=eps}, integervariables={AD});
#   [7, [AB = 2.33333333333333, AD = 7, BC = 4.33333333333333,  CD = 0.333333333333333]]

Or, using exact ("pure") maths:

inf(eval(AD::integer, solve({CD=AB-2, BC=AB+2, AD=AB+BC+CD, AB=a, BC=b, CD=c})), a>0,b>0,c>0);

#  inf((6 + 3*c)::integer, 0 < a, 0 < b, 0 < c)  ;   ==>  7

@JAMET Your code is for conics with center. A parabola has no center.

4 5 6 7 8 9 10 Last Page 6 of 176