vv

13080 Reputation

20 Badges

9 years, 42 days

MaplePrimes Activity


These are replies submitted by vv

@Carl Love Nice idea, I have used it in my first version but without chrem.
Unfortunately, for larger problems it is very slow.
For example, I could not wait MinY for
eqs := [154*x+69*y, 13*x+716*y, 23*x+3059*y, 2295*x + 4522*y, 6479*x + 5396*y, x+2*y]:
M:= [7^3, 13^3, 23^3, 17^3, 29^3, 31^3]

but Miny finished in less the 1 second (for R=100) or 5 seconds for R=1000 (default).
 

Congratulations for  mapletransactions and for your interesting contribution on Special Functions.

P.S. Concerning Tom Rocks Maths, I wonder whether such "performances" are really necessary to attract young math students.

@Jesús Guillera  I guess your comment is instead of a "thanks".
Have you tried my proc? It works correctly.
In my second example, the last modulus is 29^3. (For your 19^3 ==> x = 1103, y = 26390).
 

@Jesús Guillera  Without a minimization the solution is not unique (modulo the product of the moduli) and you already have here an example.

@sursumCorda   If we change in the loop +-1000 with +-10000, your smaller pair (or better) will be found.
Actually, there is a simple and fast enough method to find the smallest (x,y) using X0 and Y0.

 

@Carl Love  Yes, but the coeffs were divided by 23.

@Carl Love Yes, I also wanted to clarify the mathematical aspect (modules), but you were faster.
It seems that the OP wants to consider the vector space C[x,y]^3  (for the rows) over the field C. This is non-standard and a rank notion for a matrix in the ring  M_n(C[x,y]) does not seem to be useful.

@Carl Love Of course 2 is the "generic" value of the rank. The exact value is given by:

ans:=(x,y) -> piecewise(x<>0 and y<>0, 2, x<>0 or y<>0, 1, 0)

@Gharhoud  Yes.

The following works in Maple 2022+ and produces several solutions, some of them being very comlicated. 

sys1:=
{-A(t)^2*diff(Zeta_1(t,x,y,z),t)+diff(Zeta_0(t,x,y,z),x) = 0, 
A(t)^2*diff(Zeta_1(t,x,y,z),y)+B(t)^2*diff(Zeta_2(t,x,y,z),x) = 0, 
A(t)^2*diff(Zeta_1(t,x,y,z),z)+C(t)^2*diff(Zeta_3(t,x,y,z),x) = 0,
-B(t)^2*diff(Zeta_0(t,x,y,z),y)+diff(Zeta_0(t,x,y,z),y) = 0, 
B(t)^2*diff(Zeta_2(t,x,y,z),z)+C(t)^2*diff(Zeta_3(t,x,y,z),y) = 0, 
-C(t)^2*diff(Zeta_3(t,x,y,z),t)+diff(Zeta_0(t,x,y,z),z) = 0,
# diff(Zeta_0(t,x,y,z),t) = psi(t,x,y,z), 
diff(Zeta_1(t,x,y,z),x) = diff(Zeta_0(t,x,y,z),t),
diff(Zeta_2(t,x,y,z),y) = diff(Zeta_0(t,x,y,z),t), 
diff(Zeta_3(t,x,y,z),z) = diff(Zeta_0(t,x,y,z),t)}:
V1:=[Zeta_0(t,x,y,z), Zeta_1(t,x,y,z), Zeta_2(t,x,y,z), Zeta_3(t,x,y,z), A(t), B(t), C(t)]:
pdsolve(sys1, V1);

 

@Zeineb  So, you have the system:

pdsolve(
{-A(t)^2*diff(Zeta_1(t,x,y,z),t)+diff(Zeta_0(t,x,y,z),x) = 0, 
A(t)^2*diff(Zeta_1(t,x,y,z),y)+B(t)^2*diff(Zeta_2(t,x,y,z),x) = 0, 
A(t)^2*diff(Zeta_1(t,x,y,z),z)+C(t)^2*diff(Zeta_3(t,x,y,z),x) = 0,
-B(t)^2*diff(Zeta_0(t,x,y,z),y)+diff(Zeta_0(t,x,y,z),y) = 0, 
B(t)^2*diff(Zeta_2(t,x,y,z),z)+C(t)^2*diff(Zeta_3(t,x,y,z),y) = 0, 
-C(t)^2*diff(Zeta_3(t,x,y,z),t)+diff(Zeta_0(t,x,y,z),z) = 0,
diff(Zeta_0(t,x,y,z),t) = psi(t,x,y,z), diff(Zeta_1(t,x,y,z),x) = psi(t,x,y,z),
diff(Zeta_2(t,x,y,z),y) = psi(t,x,y,z), diff(Zeta_3(t,x,y,z),z) = psi(t,x,y,z)},
[Zeta_0(t,x,y,z), Zeta_1(t,x,y,z), Zeta_2(t,x,y,z), Zeta_3(t,x,y,z), A(t), B(t), C(t), psi(t,x,y,z)]
);

Unfortunately pdsolve throws an (internal) error. It's a bug! But a general solution could be hard to find. 
(The system has of course the trivial solution Zeta_k = 0, psi=0,  A,B,C = arbitrary).

@Carl Love I like your highly optimized code (vote up). However, I prefer (for an answer) the version:

A219954list := nmax -> [ 
seq[scan=`+`](
    ifelse(n=1, 0, 3^add(Bits:-Split(n-1)) - ifelse(2^ilog2(n)=n, n/2, 0)),
    n = 1..nmax
)]:

which is much easier to read and less than twice slower.

@Carl Love Nice, but you must take care of "too many levels of recursion" for n large.

1. You need a package (FractionalCalculus) which is not present. Maple does not contain it; not even the Application Center.

2. The empty definition of u does not make sense.

@vv 

plots:-display(  seq( plottools:-tetrahedron([ P[u[1]],P[u[2]],P[u[3]],P[u[4]] ]), u in T) );

5 6 7 8 9 10 11 Last Page 7 of 171