JAMET

385 Reputation

4 Badges

6 years, 290 days

MaplePrimes Activity


These are replies submitted by JAMET

I want to write the equivalent of this statement with LinearAlgebra. Best regards.

the program following the previous
eta:=(x,y,z)->evalm(Mat&*[x,y,z]);        
eta(9/25,144/325,64/325); I should fond [4,18/5,1]. How to manufacture this adjutemen. Thank you.

 following the previous programme
eta:=(x,y,z)->evalm(Mat&x*[x,y,z]);  
eta:=(9/(25),144/(325),64/(325));
I should find :  [4,18/5,1]. Where is the mistake ? Thank you.

In order to calculate the real numbers cos(Pi/n), how to get the following polynomes
x^2 -3*x+1=0, x^3-6*x^2+10*x-4=0, x^4-8*x^3+20*x^2-20*x+5=0 and so on.
I got
F := (L, C) -> binomial(L - 2, C) + binomial(L - 2, C - 1);
for p from 5 to 10 do
    seq(F(p, p - i), i = 1 .. p);
end do;
Best regards.

Can you tell me why this program that seems correct does not work  Thank you very much.


        "restart;

          with(geometry);

          with(plots);

          _EnvHorizontalName = 'x';

          _EnvVerticalName = 'y';

          point(A, -3, 9);

          point(B, -5, 0);

          point(C, 6, 0);

          xA := -3;

          yA := 9;

          xB := -5;

          yB := 0;

          xC := 6;

          yC := 0;

          triangle(ABC, [A, B, C]);

          midpoint(M2, A, C);

          midpoint(M1, B, C);

          midpoint(M3, A, B);

          coordinates(M1);

          xM1 := %[1];

          yM1 := `%%`[2];

          coordinates(M2);

          xM2 := %[1];

          yM2 := `%%`[2];

          coordinates(M3);

          xM3 := %[1];

          yM3 := `%%`[2];

          segment(sA, [A, M1]);

          segment(sB, [B, M2]);

          segment(sC, [C, M3]);

          centroid(G, ABC);

          midpoint(J1, A, G);

          midpoint(J2, B, G);

          midpoint(J3, C, G);

          coordinates(J1);

          xJ1 := %[1];

          yJ1 := `%%`[2];

          coordinates(J2);

          xJ2 := %[1];

          yJ2 := `%%`[2];

          coordinates(J3);

          zA := xA + yA*I;

          zB := xB + yB*I;

          zC := xC + yC*I;

          F := z -> expand((z - zA)*(z - zB)*(z - zC));

          diff(F(z), z);

          sol := solve(%, z, explicit);

          evalf(sol[1]);

          evalf(sol[2]);"


                     "with(LinearAlgebra)"

"Mat := Matrix([[x^2, x*y, y^2, x, y, 1], [xM1^2, xM1*yM1, 

   yM1^2, xM1, yM1, 1], [xM2^2, xM2*yM2, yM2^2, xM2, yM2, 1], 

   [xM3^2, xM3*yM3, yM3^2, xM3, yM3, 1], [xJ1^2, xJ1*yJ1, 

   yJ1^2, xJ1, yJ1, 1], [xJ2^2, xJ2*yJ2, yJ2^2, xJ2, yJ2, 1]])"

                     "Determinant(Mat) = 0"

                            "M1;

                              M2;

                              M3;

                              J2;

                              J16;"

           "conic(Ell, [M1, M2, M3, J2, J1], [x, y])"

                        "Equation(Ell)"

                   "coordinates(foci_2_Ell);

                     evalf(%);"


                   "coordinates(foci_1_Ell);

                     evalf(%);"


              "point(F2, coordinates(foci_2_Ell))"

              "point(F1, coordinates(foci_1_Ell))"

"display(draw([A(color = black, symbol = solidcircle, 

   symbolsize = 12), B(color = black, symbol = solidcircle, 

   symbolsize = 12), C(color = black, symbol = solidcircle, 

   symbolsize = 12), G(color = black, symbol = solidcircle, 

   symbolsize = 12), J1(color = black, symbol = solidcircle, 

   symbolsize = 12), J2(color = black, symbol = solidcircle, 

   symbolsize = 12), J3(color = black, symbol = solidcircle, 

   symbolsize = 12), F1(color = black, symbol = soli4*yM2, 

   yM1^2*dcircle, symbolsize = 12), F2(color = black, symbol = 

   solidcircle, symbolsize = 12), ABC(color = yellow, filled = 

   true, transparency = 0.5), Ell(color = blue, filled = true, 

   transparency = 0.3), M1(color = black, symbol = solidcircle, 

   symbolsize = 6), M2(color = black, symbol = solidcircle, 

   symbolsize = 6), M3(color = black, symbol = solidcircle, 

   symbolsize = 6), sA(color = blue), sB(color = blue), 

   sC(color = blue)]), textplot([[coordinates(A)[], "A"], 

   [coordinates(B)[], "B"], [coordinates(C)[], "C"], 

   [coordinates(G)[], "C"], [coordinates(J1)[], "J1"], 

   [coordinates(J2)[], "J2"], [coordinates(J3)[], "J3"], 

   [coordinates(F1)[], "F1"], [coordinates(F2)[], "F2"], 

   [coordinates(M1)[], "M1"], [coordinates(M2)[], "M2"], 

   [coordinates(M3)[], "M3"]], align = [above, right]), axes = 

   none)"

Q:= expand((z - zA)*(z - zB)*(z - zC));
q:=diff(Q,z), 
sol:= solve`(`q`, z ,explicit) ;
evalf(sol[1]);
evalf(sol[2]);
I don't understand the difficulty with diff. Best regards.

Q:=z-> diff((z - zA)*(z - zB)*(z - zC), z)*I);    
solve(Q(z) , z ,explicit) ;
Sorry, I’m too clumsy to take care of myself

Thank you very much for your task.
I try to find out a matrice 4X4 whuch calculates coordinates A->N, B->P, C->C and E->M.
it would take into account translation, rotation and ratio

will you take my example again and show that the procedure works. Thank you.

for i while (x := S || (i + 1))::And(algebraic, Not(name)) do
    S1 += x;
end do;
Error, recursive operator assignment
Sorry this instruction does not work.
 

@rlopez 
It is a very good prg.
Will you draw me a figure on an example ? Thank you.

@Kitonum 
For instance

A, B, C := <-3, 1, 2>, <-2, -1, 1>, <0, 3, -3>;
                 [&uminus0;3]  [&uminus0;2]  [    0     ]
                 [          ]  [          ]  [          ]
      A, B, C := [    1     ], [&uminus0;1], [    3     ]
                 [          ]  [          ]  [          ]
                 [    2     ]  [    1     ]  [&uminus0;3]

alpha := [a, b, c];
                       alpha := [a, b, c]

G := (A*alpha[1] + B*alpha[2] + C*alpha[3])/add(alpha);
G := Vector(3, {(1) = Typesetting:-mfrac(Typesetting:-mrow(Types\

  etting:-mo("&uminus0;"), Typesetting:-mrow(Typesetting:-mn("3"\

  ), Typesetting:-mo("&InvisibleTimes;"), Typesetting:-mi("a")),\

   Typesetting:-mo("&minus;"), Typesetting:-mrow(Typesetting:-mn\

  ("2"), Typesetting:-mo("&InvisibleTimes;"), Typesetting:-mi("b\

  "))), Typesetting:-mrow(Typesetting:-mi("a"), Typesetting:-mo(\

  "&plus;"), Typesetting:-mi("b"), Typesetting:-mo("&plus;"), 

   Typesetting:-mi("c"))), (2) = Typesetting:-mfrac(Typesetting:\

  -mrow(Typesetting:-mi("a"), Typesetting:-mo("&minus;"), 

   Typesetting:-mi("b"), Typesetting:-mo("&plus;"), Typesetting:\

  -mrow(Typesetting:-mn("3"), Typesetting:-mo("&InvisibleTimes;"\

  ), Typesetting:-mi("c"))), Typesetting:-mrow(Typesetting:-mi("\

  a"), Typesetting:-mo("&plus;"), Typesetting:-mi("b"), 

   Typesetting:-mo("&plus;"), Typesetting:-mi("c"))), (3) = 

   Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mrow(Typese\

  tting:-mn("2"), Typesetting:-mo("&InvisibleTimes;"), 

   Typesetting:-mi("a")), Typesetting:-mo("&plus;"), 

   Typesetting:-mi("b"), Typesetting:-mo("&minus;"), 

   Typesetting:-mrow(Typesetting:-mn("3"), Typesetting:-mo("&Inv\

  isibleTimes;"), Typesetting:-mi("c"))), Typesetting:-mrow(Type\

  setting:-mi("a"), Typesetting:-mo("&plus;"), Typesetting:-mi("\

  b"), Typesetting:-mo("&plus;"), Typesetting:-mi("c")))})


solve({G[1] = A, G[2] = B, G[3] = C}, {a, b, c});
Error, invalid input: solve expects its 1st argument, eqs, to be of type {`and`, `not`, `or`, algebraic, relation(algebraic), ({list, set})({`and`, `not`, `or`, algebraic, relation(algebraic)})}, but received {(-3*a-2*b)/(a+b+c) = (Vector(3, {(1) = -3, (2) = 1, (3) = 2})), (a-b+3*c)/(a+b+c) = (Vector(3, {(1) = -2, (2) = -1, (3) = 1})), (2*a+b-3*c)/(a+b+c) = (Vector(3, {(1) = 0, (2) = 3, (3) = -3}))}
Why this program fails; Thank you.

@tomleslie  Very good prg using geomety, Thang you very much;

@sand15 
Yes, weights may be negative

Tomlesie, I thank you yout program is very good.
I want now to draw equilateral hyperbole
  orthocenter(H, Tr1):
   evalf(coordinates(H));
   #conic(Hyp,[P1,P2,P3,P4,H],[x,y]);
But the computer crashes
Perhaps we should model the equation of this hyperbole?

1 2 3 4 5 6 7 Last Page 2 of 10