## 375 Reputation

6 years, 202 days

## Congruent Numbers...

proper procedure; Probleme with conguent(3); false
Have you look for the dimensions of the rectangular triangles ? Thank you;

## Difficulty with display...

restart;
with(LinearAlgebra);
with(geometry);
with(plots);
_EnvHorizontalName := 'x';

_EnvVerticalName := 'y';

xA := -7: yA := 0: xB := 5: yB := 9: xC := 9: yC := 1:
xP:=3:yP:=5:
point(A, xA, yA);
point(B, xB, yB);
point(C, xC, yC);
point(P, xP, yP);
Mat := Matrix(3,3,[xA,xB,xC,yA,yB,yC,1,1,1]);

"v := <x, y, 1>;

1/Mat;

Mcb := MatrixVectorMultiply(1/Mat, v);

Mbc := MatrixVectorMultiply(Mat, Mcb);

Triangle(Tr, [A, B, C]);

line(AP, [A, P]);

line(BP, [B, P]);

line(CP, [C, P]);

line(AB, [A, B]);

line(BC, [B, C]);

line(CA, [C, A]);

alpha := FindAngle(BP, CP);

beta := FindAngle(CP, AP);

eta := FindAngle(BP, AP);

Aa := FindAngle(AB, CA);

Bb := FindAngle(BC, AB);

Cc := FindAngle(BC, CA);

t3 := thickness = 3;

Mcb := <1/(cot(Aa) - cot(alpha)), 1/(cot(Bb) - cot(beta)),

1/(cot(Cc) - cot(eta))>;

Mbc := MatrixVectorMultiply(Mat, Mcb);

L3 := linestyle = 1;

cbl := color = blue;

dr := draw([AB, BC, CA, AP(cbl, L3), BP(cbl, L3), CP(cbl, L3)]);

tp := textplot([[coordinates(A)[], "A"], [coordinates(B)[],

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

align = {above, right});

display*[textplot*([[coordinates(A)[], "A"], [coordinates(B)[]\

, "B"], [coordinates(C)[], "C"]], align = {"above",

'right'}), draw*([AP(color = black), BP(color = green),

CP(color = green), Tr(color = blue, filled = true,

transparency = 0.9)], axes = none)];"

Can you tell me why this program is not running ? Thank you.

## Barycentric coordinate conversion test i...

"with(geometry);

with(LinearAlgebra);

with(plots);"

"_EnvHorizontalName := 'x'"

"_EnvVerticalName := 'y'"

xA := 1: yA := 0: xB := 0: yB := 0: xC := 0: yC := 1:
Mat := Matrix(3,3,[xA,xB,xC,yA,yB,yC,1,1,1]);
"v := <x, y, 1>"

"Mcb := MatrixVectorMultiply(1/Mat, v)"

"Mbc := MatrixVectorMultiply(Mat, Mcb)"

"xA := 4;

yA := 10;

xB := 0;

yB := -2;

xC := 13;

yC := 0;

xP := 5;

yP := 4;

Mat := Matrix(3, 3, [xA, xB, xC, yA, yB, yC, 1, 1, 1]);"

"Mcb := MatrixVectorMultiply(1/Mat, v)"

"Mbc := MatrixVectorMultiply(Mat, Mcb)"

"point(A, xA, yA);

point(B, xB, yB);

point(C, xC, yC);

point(P, xP, yP);

triangle(Tr, [A, B, C]);"

"line(AP, [A, P]);

line(BP, [B, P]);

line(CP, [C, P]);"

"alpha := FindAngle(BP, CP)"

"beta := FindAngle(CP, AP)"

"eta := FindAngle(BP, AP)"

"line(AB, [A, B]);

line(BC, [B, C]);

line(CA, [C, A]);"

"NULL"

"Aa := FindAngle(AB, CA)"

"Bb := FindAngle(BC, AB)"

"Cc := FindAngle(BC, CA)"

"Mcb := <1/(cot(Aa) - cot(alpha)), 1/(cot(Bb) - cot(beta)),

1/(cot(Cc) - cot(eta))>"

"Mbc := MatrixVectorMultiply(Mat, Mcb)"

"t3 := thickness = 3;

L3 := linestyle = 1;

cbl := color = blue;"

"dr := draw([Tr(t3), AP(cbl, L3), BP(cbl, L3), CP(cbl, L3)]),

textplot([[coordinates(A)[], "A"], [coordinates(B)[], "B"],

[coordinates(C)[], "C"], [coordinates(P)[], "P"]], align =

{above, right})"

"display({dr}, title = "Conversion", scaling = constrained,

axes = none, view = [-1 .. 14, -1 .. 11])"

Do you want to tell me why the program is not running ? Thank you very much.

## it’s not quite what I want...

How do you get these results? Thank you.

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

## What to replace evalm with LinearAlgebra...

```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.```

## confusion between linalg and LinearAlgeb...

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.

## Calculating of the real numbers cos(Pi/...

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.

## Steiner'sellipse and Marden's theorem...

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

## Still problem with diff...

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.

## use of Marden’s theorem...

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

## Matruce...

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.

## Chevron's lemma...

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

 1 2 3 4 5 6 7 Last Page 1 of 9
﻿