270 Reputation

4 years, 163 days

one integer sums of cubes of integers...

Sorry for my errors.
I tried to adapt the program to cubes

Cubes := `~`[`^`]([`\$`(1 .. 10)], 3); Cubes := [1, 8, 27, 64, 125, 216, 343, 512, 729, 1000] for n from 100 to 100+13^(3) do found:=false ; for m to nops(Cubes) do for c in combinat:-choose(Cubes,m) do if add(c)=n then printf(cat("\n%d = %d^3", " + %d^3"\$(m-1)),n,root~(3,c)[]); found:=true fi until found until found; if not found then printf("\n%d: no solution",n) fi od: But it doesn't work.

Any integer in [129,129+13^2[ 1s written...

restart; Squares := `~`[`^`]([`\$`(1 .. 12)], 2); Squares := [1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144] for n from 129 to 129+13^(2) do found=false ; for m to nops(Squares) do for c in combinat:-choose(Squares,m) do if add(x,x=c)=n then printf(cat("\\n%d = %d^2", " + %d^2"\$(m-1)),n,sqrt~(c)[]); found=true fi until found until found; if not found then printf("\\n%d: no solution",n) fi od: How to avoid this message ? Error cannot determinate if this expression is true or false : found. Thank you.

there is still an error...

In spice of this changing, there is : Error, cannot determine if the expressionis true or false : found

Error, cannot determine if this expressi...

still an error ! Thank you

Error, invalid if statement termination...

I have this error with this last program; How to correct it ? Thank you.

Any integer in [129,129+13^2[ 1s written...

For a more concise response could use fprint ? Thank you.

Any integer in [129,129+13^2[ 1s written...

How to present the results, one number per line ? Thank you

where the vertex of an angle moves ?...

How to find out the equation of the curve from t and t1 ? (that i found by hand calculation :
y*y^2*(2*x+p)*(2*x+p1)+(4*x^2-p*p1)^2=0); Thank you.

there is still an error...

with debug(BISSEC);
I am getting : Error in BISSEC (now at the top level)=invalid left hand side in assignment. What can I do ? Thank you.

I don't unterstand why this procedure do...

BISSEC := proc (P, U, V) local a, b, eq1, eq2, M1, M2, t, PU, PV, bissec1, bissec2; a := (P-U)/Norm(P-U, 2)+(P-V)/Norm(P-V, 2); M1 := P+a*t; b := (P-U)/Norm(P-U, 2)-(P-V)/Norm(P-V, 2); M2 := P+b*t; eq1 := op(eliminate({x = M1, y = M1}, t)); eq2 := op(eliminate({x = M2, y = M2}, t)); P := convert(P, list); U := convert(U, list); V := convert(V, list); PU := plot([P, U]); PV := plot([P, V]); bissec1 := implicitplot(op(eq1), x = 0 .. 5, y = 0 .. 10, color = red); bissec2 := implicitplot(op(eq2), x = 0 .. 5, y = 0 .. 10, color = green); display([bissec1, bissec2, PU, PV], scaling = constrained) end proc;

A := `<,>`(4, 8); B := `<,>`(4, 2); C := `<,>`(1, 4);
debug(BISSEC);
BISSEC
BISSEC(A, B, C);

plot of an ellipse...

P := [3/2, -42/25]; Q := [22649/5523, -2304/1841]; lma := 1.627112258;

with(geometry); point(Pp, P, P); point(Qp, Q, Q);
ellipse(ell, ['foci' = [Pp, Qp], 'MajorAxis' = lma]);
Error, (in geometry:-ellipse) the given polynomial/equation is not an algebraic representation of a ellipse

Why this error? Thank you

procedure to find characteristics of ell...

How to use LinearAlgebra to find characteristics of ellipse ?

build a square with 2 known opposites ve...

H2:=[4.4854,3.378]:H5:=[6.5922,2.0388]:

car_2som_opp(H2,H5) don't work with this message : Error invalid subscript selector. Thank you.

your code geo2 works in a fichier but not in the other.
How to correct hhese errors ? Thank you.
restart;
#Construction de 3 cercles tangents entre-eux et aux côtés d'un triangle
#a, b et c sont les 3 côtés, A,B et C les 3 sommets Ag, Bg, Cg les 3 angles, r1, r2 r3 les rayons des cercles

#A1A2=x, B1B2=y, C1C2=z, x²=4r1*r2, y²=4*r1r3, z²=4r1r2, r1=yz/2xn r2=xz/2y, r3=xy/2z

with(plots);
;
A := [-1, 5]; B := [-7, -1]; C := [12, -1];
a := sqrt((B-C)^2+(B-C)^2); b := sqrt((A-C)^2+(A-C)^2); c := sqrt((B-A)^2+(B-A)^2);
a := 19
(1/2)
b := 205
(1/2)
c := 6 2
p := 1/2*(a+b+c); Aire := sqrt(p*(p-a)*(p-b)*(p-c)); r := evalf(Aire/p);
19   1    (1/2)      (1/2)
p := -- + - 205      + 3 2
2    2
r := 2.727070319
Ag := arccos((-a^2+b^2+c^2)/(2*b*c)); Bg := arccos((a^2-b^2+c^2)/(2*a*c)); Cg := arccos((a^2+b^2-c^2)/(2*a*b)); verif := evalf(Ag+Bg+Cg);
/ 7     (1/2)  (1/2)\
Ag := Pi - arccos|--- 205      2     |
\410                /
1
Bg := - Pi
4
/13     (1/2)\
Cg := arccos|--- 205     |
\205         /
verif := 3.141592655

#Calcul des rayons des 3 cercles
r1 := evalf((1/2)*r*(1+tan((1/4)*Bg))*(1+tan((1/4)*Cg))/(1+tan((1/4)*Ag)));
r1 := 1.190796377
r2 := evalf((1/2)*r*(1+tan((1/4)*Ag))*(1+tan((1/4)*Cg))/(1+tan((1/4)*Bg)));
r2 := 1.918607660
r3 := evalf((1/2)*r*(1+tan((1/4)*Bg))*(1+tan((1/4)*Ag))/(1+tan((1/4)*Cg)));
r3 := 2.244243923
xI := evalf((a*A+b*B+c . C)/(2*p)); yI := evalf((a*A+b*B+c . C)/(2*p));
xI := -0.4162698432
yI := 1.727070322
interface(rtablesize = 10);
kernelopts(version);
Physics:-Version();
with(geometry):
with(plots):
S := segment:
L := line:
Per := PerpendicularLine:
R := 5: xA := 0: yA := 0:
point(A, xA, yA):
xI := (1/3)*R:
yI := 0:
point(I1, xI, yI):
circle(C, [A, R]):
local xM, yM, xN, yN, xE, yE, dr1;
xM := evalf(R*cos(t));
yM := evalf(R*sin(t));
point(M, xM, yM);
L(lMI, [M, I1]);
intersection('h', C, lMI, [M, N]);
L(lAM, [A, M]);
L(lAN, [A, N]);
Per(lME, M, lAM);
Per(lNE, N, lAN);
intersection(E, lME, lNE);
S(sAM, [A, M]);
S(sAN, [A, N]);
S(sME, [M, E]);
S(sNE, [N, E]);
dr1 := draw({sME, sNE, lMI(color = blue), sAM(color = black), sAN(color = black)});
display({dr1})
end proc:
dr := draw({C}, view = [-6 .. 17, -10 .. 6]);
xA := -1;
yA := 5;
xB := -1; # Observation: yB is undefined but is used
# later. Is this an issue?? I have included
# a "random" value for yB in the next line here
yB:= 2;
xC := -7;
yC := -1;
_EnvHorizontalName := x;
_EnvVerticalName := y;
point(A, xA, yA);
point(B, xB, yB);
# point(C, C, C); # Cand C are undefined
# maybe you meant xC and yC
# I have changed this in the
# following
point(C, xC, yC);
coordinates(B);
triangle(Tr, [A, B, C]);
whattype(A); # type() generally takes two arguments
# Maybe you intended to use whattype()??
#
# None of A, A], [B, B], [C, C]
# are defined by the above code. No idea how you expect the
# following to work - Maybe you intended xA, yA, xB, yB, xC
# and yC????
#
#  Po := pointplot([[A, A], [B, B], [C, C], [xI, yI]],
#                   color = blue,
#                   axes = none,
#                   view = [-7 .. 12, -1 .. 5]
#                 );
Po := pointplot([[xA, yA], [xB, yB], [xC, yC], [xI, yI]],
color = blue,
axes = normal,
symbol=solidcircle,
symbolsize=20,
view = [-7 .. 12, -1 .. 5]
);
10
Maple 2018.2, X86 64 WINDOWS, Nov 16 2018, Build ID 1362973
"D:\lib\update.mla", 2018, November 16, 9:40 hours, version in

the MapleCloud: unable to determine, version installed in

this computer: not installed
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-circle) wrong type of arguments
Error, (in geometry:-draw) unknown geometric object  [12, -1]
Error, (in geometry:-intersection) wrong type of arguments
xA := -1
yA := 5
xB := -1
yB := 2
xC := -7
yC := -1
_EnvHorizontalName := x
_EnvVerticalName := y
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-coordinates) wrong type of argument
Error, (in geometry:-triangle) wrong type of arguments
list

with(geometry);
point(A, A, A);
Error, (in geometry:-point) the first argument is expected of type name
Examples
with(geometry);
point(B, 2, 0);
Error, (in geometry:-point) the first argument is expected of type name
form(B);
FAIL
coordinates(B);
Error, (in geometry:-coordinates) wrong type of argument
HorizontalCoord(B);
Error, (in geometry:-HorizontalCoord) wrong type of argument
VerticalCoord(B);
Error, (in geometry:-VerticalCoord) wrong type of argument
detail(B);
Error, (in geometry:-detail) unknown object:  -7

The code you gave me work in certain cas but not in the other. I can't understand why.

interface(rtablesize = 10); kernelopts(version); Physics:-Version(); with(geometry); with(plots); S := segment; L := line; Per := PerpendicularLine; R := 5; xA := 0; yA := 0; point(A, xA, yA); xI := (1/3)*R; yI := 0; point(I1, xI, yI); circle(C, [A, R]); quadri := proc (t) local xM, yM, xN, yN, xE, yE, dr1; xM := evalf(R*cos(t)); yM := evalf(R*sin(t)); point(M, xM, yM); L(lMI, [M, I1]); intersection('h', C, lMI, [M, N]); L(lAM, [A, M]); L(lAN, [A, N]); Per(lME, M, lAM); Per(lNE, N, lAN); intersection(E, lME, lNE); S(sAM, [A, M]); S(sAN, [A, N]); S(sME, [M, E]); S(sNE, [N, E]); dr1 := draw({sME, sNE, lMI(color = blue), sAM(color = black), sAN(color = black)}); display({dr1}) end proc; dr := draw({C}, view = [-6 .. 17, -10 .. 6]); display([dr, quadri(.7), quadri(1), quadri(1.2)], view = [-6 .. 17, -10 .. 6]);
Maple 2018.2, X86 64 WINDOWS, Nov 16 2018, Build ID 1362973
"D:\lib\update.mla", 2018, November 16, 9:40 hours, version in

the MapleCloud: unable to determine, version installed in

this computer: not installed
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-circle) wrong type of arguments
Error, (in geometry:-draw) unknown geometric object  [12, -1]
Error, (in geometry:-intersection) wrong type of arguments

with(geometry); xA := -1; yA := 5; xB := -1; xC := -7; yC := -1;
_EnvHorizontalName := x;

_EnvVerticalName := y;

point(A, xA, yA); point(B, xB, yB); point(C, C, C);
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-point) the first argument is expected of type name
Error, (in geometry:-point) the first argument is expected of type name
coordinates(B);
Error, (in geometry:-coordinates) wrong type of argument
triangle(Tr, [A, B, C]);
Error, (in geometry:-triangle) wrong type of arguments
line(LAB, [A, B]); line(LBC, [B, C]); line(LAC, [A, C]);
Error, (in geometry:-line) wrong type of arguments
Error, (in geometry:-line) wrong type of arguments
Error, (in geometry:-line) wrong type of arguments
type(A);
false

Po := pointplot([[A, A], [B, B], [C, C], [xI, yI]], color = blue, axes = none, view = [-7 .. 12, -1 .. 5]);
NULL;

display(Po);

﻿