vv

13080 Reputation

20 Badges

9 years, 42 days

MaplePrimes Activity


These are replies submitted by vv

@acer However,

restart;
local a; 	
a := 17:
:-a := 18:
p := proc()
  local a;
  a := 25;
  return parse("a",statement);
end proc:

p();  #17

 

@mmcdara Sorry, probably I have seen an older version of your answer, or maybe I was not careful enough.

@mmcdara You have ommited useassumptions. So, solve has another task: a single inequality instead of a system.

@Axel Vogt Just replace 10.0 by 10

@sursumCorda 
I used Maple 2018 on an old Windows tablet  and I obtain 
limit(1/f, x=infinity) = 0.

@petit loup   "#" starts a comment, so actually method='integer'  is not needed when the matrix has integer entries.
For our matrix A,
S,U,V := SmithForm(A, output=['S,U,V'], method='integer');
and
S,U,V := SmithForm(A, output=['S,U,V']);
give the same result.
 

@mmcdara Actually, when limit returns an interval a..b, this means that the limit does not exist; mathematically this is equivalent to the undefined result, but Maple also says that the limit points (aka accumulation points) are contained in the interval a..b.

Note that e.g. 

limit(3*sin(1/x)-4*cos(1/x), x=0);
    -7 .. 7

but actually the set of accumulation points is the interval -5 .. 5, which Maple cannot find.

It would be nice to have in Maple the comands  sup, inf, limsup, liminf for functions and sequences, just like in Mathematica!

@mmcdara Probably the designers consider that <...> is enough, e.g. the first method or

<M[1,1],M[1,2]; M[2,1],M[2,2]>;

 

@Mikey_W 

restart;
m:=1000: n:=1000: A:=LinearAlgebra:-RandomMatrix(m, n):
x:=Pi/77:
    
f:=proc(x,A) local i,j,s:=0; 
for i to m do for j to n do
  s:=s+cos(sin(x+A[i,j]));
od od;
s
end proc:

CodeTools:-Usage( evalf(f(x,A)) );
## memory used=6.11GiB, alloc change=33.00MiB, cpu time=10.89s, real time=10.90s, gc time=1.70s

##                        7.639612369 10^5 

CodeTools:-Usage( evalhf(f(x,A)) );
## memory used=7.63MiB, alloc change=7.63MiB, cpu time=265.00ms, real time=266.00ms, gc time=0ns

##                    7.63961236894650501 10^5 

 

@acer  No, please do.

@sursumCorda Corrected and .mw inserted.

restart;

SYS := [cos(x)*cos(y)*cos(x + y) - 2*(sin(x)*sin(y) - 1)*2*(sin(x)*sin(x + y) - 1)*2*(sin(y)*sin(x + y) - 1),
       (cos(x + y) - (cos(x) + cos(y)) + 1)**2 + 2*cos(x)*cos(y)*cos(x + y)]:

Sys:=eval(expand~(SYS)):

solve(eval(Sys[2],y=Pi)); #Not real; idem x=Pi and for Sys[1]

arccos(2/3+((1/3)*I)*2^(1/2)), arccos(2/3-((1/3)*I)*2^(1/2))

(1)

tanhalf := [ cos(x)=(1-t^2)/(1+t^2), sin(x)=2*t/(1+t^2), cos(y)=(1-u^2)/(1+u^2), sin(y)=2*u/(1+u^2) ]:

f:=seq(
  convert( SolveTools:-SemiAlgebraic( {numer(eval(Sys[i], tanhalf))}), radical),
i=1..2);

[[u = -1, t = -1], [u = -1, t = 0], [u = -(1/3)*3^(1/2), t = -(1/3)*3^(1/2)], [u = 0, t = -1], [u = 0, t = 1], [u = (1/3)*3^(1/2), t = (1/3)*3^(1/2)], [u = 1, t = 0], [u = 1, t = 1]], [[u = -1, t = -1], [u = -1, t = 0], [u = -(1/3)*3^(1/2), t = -(1/3)*3^(1/2)], [u = 0, t = -1], [u = 0, t = 1], [u = (1/3)*3^(1/2), t = (1/3)*3^(1/2)], [u = 1, t = 0], [u = 1, t = 1]]

(2)

evalb({f[1][]} = {f[2][]});   # The equations have the same solutions

true

(3)

XY:=t -> arctan(2*t/(1+t^2),  (1-t^2)/(1+t^2));

proc (t) options operator, arrow; arctan(2*t/(1+t^2), (1-t^2)/(1+t^2)) end proc

(4)

map( z -> [x=XY(eval(t,z)), y=XY(eval(u,z))], f[1]);

[[x = -(1/2)*Pi, y = -(1/2)*Pi], [x = 0, y = -(1/2)*Pi], [x = -(1/3)*Pi, y = -(1/3)*Pi], [x = -(1/2)*Pi, y = 0], [x = (1/2)*Pi, y = 0], [x = (1/3)*Pi, y = (1/3)*Pi], [x = 0, y = (1/2)*Pi], [x = (1/2)*Pi, y = (1/2)*Pi]]

(5)

select(z -> is(eval(x,z)+eval(y,z) >=0), %);

[[x = (1/2)*Pi, y = 0], [x = (1/3)*Pi, y = (1/3)*Pi], [x = 0, y = (1/2)*Pi], [x = (1/2)*Pi, y = (1/2)*Pi]]

(6)

Download sysok_vv.mw

@mmcdara If you don't know an IC for some x>1, you cannot find a solution.
For example, 
sol3 := piecewise( x<1, 1/(1-x), 1/(a-x) )

is a solution for any a<1.

Removing the conditions psi1(1)=0, psi2(1)=0, the solution is unique in terms of e1, e2 and can be obtaind symbolically.

Now, imposing psi1(1)=0, psi2(1)=0 it results a system in {e1, e2} which can be solved numerically.

@Carl Love I do not have a solid theoretical justification. The vector <x,y> can ve represented (via isolve) as p*v1 + q*v2; p,q in Z, v1, v2 in Z^2.  For our problem, it will be convenient to have small p,q when x and y are small. This happens when v1, v2 are replaced with the simplified equivalent basis given by LLL.

I think that indeed R_max could be estimated using the properties of the LLL basis, but I did not (and probably will not) try to investigate this.

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