## 40 Reputation

2 years, 211 days

## Maximize function does not work...

Maple

I'm not sure if there's something on the page I'm not seeing but even  https://www.maplesoft.com/support/help/Maple/view.aspx?path=Optimization/Minimize#examples

 Maximize(2*x^2 + 2*y^2 + y, {2*x + y <= 6, y^2 - x <= 2})

a literal copy-paste of the posted example maple just repeats what I posted Idk whats wrong. btw is there some way to read the maple documentation pages?

## maple save variables is greyed out...

Maple

maple save variables is greyed out  would anyone happen to know why this could be the case?

## Error, (in mod/Normal) invalid arguments...

Maple

tmmp := [1, 10 q]
PS1 := 1
PS2 := 10 q
[1, 10 q]
tnmp := [8, 5 q]
QS1 := 8
QS2 := 5 q

gP, gQ, S1, S2, P1, P2, Q1, Q2

(q*x + 9*q + y)^33*(4*q*x + 6*q + y)^16/((x + 3)^48*(x + 10)), (q*x + 9*q + y)^33*(4*q*x + 6*q + y)^16/((x + 3)^48*(x + 10)), 8, 6*q, 1, q, 1, -10*q

Normal(Eval(gP, {x = QS1, y = QS2})*Eval(gQ, {x = S1, y = -S2})*1/(Eval(gP, {x = PS1, y = PS2})*Eval(gQ, {x = S1, y = -S2}))) mod p;
Error, (in mod/Normal) invalid arguments or not implemented

## q = -10*q mod 11 not true???...

Maple

P1 := 1;
Q1 := 1;
P2 := q;
Q2 := -10*q;
p - 11;
P1 := 1
Q1 := 1
P2 := q
Q2 := -10 q
0
NULL;
if Q2 = P2 mod p then
return 42;
else
return 0;
end if;
(P2 - Q2) mod p;
0

I don't know why but   (p=11)   here the code below does not return 42  and

evalb(Q2 = P2 mod p);      returns
false

## Error, invalid subscript selector...

Maple

Error, invalid subscript selector
WeilP:
7       PS1 := temp[1];
============================================

WeilP:=proc(m, P1, P2, Q1, Q2, f, p)
local S1, S2, gP, gQ, temp, PS1, PS2, QS1, QS2;
if [P1,P2] = [Q1, Q2] mod p then
return 1 ;
else
# [S1, S2] := EAdd( f, x, P1, P2, Q1, Q2);
temp := EAdd( f, x, p, P1, P2, Q1, Q2);
S1:= temp[1];
S2:=temp[2];
temp := EAdd( f, x, p, P1, P2, S1, -S2);   #represents P-S
PS1:= temp[1];
PS2:=temp[2];
temp := EAdd( f, x, p, Q1, Q2, S1, S2);    #Q+S
QS1:=temp[1];
QS2:=temp[2];
#        gP:=Weil( m, P1,P2, f, p );
#        gQ:=Weil( m, Q1,Q2, f, p );
return 0
#    return Normal(  ( Eval(gP, { x=QS1, y=QS2 } ) * Eval(gQ, {x=S1, y= -S2} ) )  / ( Eval(gP, { x=PS1, y=PS2 } ) * Eval(gQ, {x=S1, y= -S2} ) )   )  mod p;    # ( f_P(Q+S) f_Q(-S)  ) / ( f_Q(P-S) f_P(S)  )
end if ;