vv

14252 Reputation

20 Badges

11 years, 0 days

MaplePrimes Activity


These are replies submitted by vv

@Jsevillamol 

Why don't you post an executable worksheet . Use the green arrow to upload it.

with(Domains):

---------------------- Domains version 1.0 ---------------------

Initially defined domains are Z and Q the integers and rationals
Abbreviations, e.g. DUP for DenseUnivariatePolynomial, also made

 

GI:=Gaussian(Z):
za:=2+3*I: zb:=1-I:
a := GI[Input](za);
b := GI[Input](zb);

`domains/Gaussian/badge0`(2, 3)

 

`domains/Gaussian/badge0`(1, -1)

(1)

EEA:=proc(ED,a,b)
local u;
u:=ED[`*`](a,b);
u:=ED[`-`](u,a);  # +,- work directly
u;
end:

EEA(GI,a,b) = za*zb-za;

`domains/Gaussian/badge0`(3, -2) = 3-2*I

(2)

 


Download gi.mw

@Axel Vogt 

For the last limit it's a "semi-bug" because with assuming a>1 it works. And also with assuming a>0,a<=1.

P.S. Many limits are computed by series, not by f/g, L'Hospital or such.

CommonPeriod:=(T1::Not(0),T2::Not(0)) -> `if`(type(T2/T1,rational), abs(numer(T2/T1)*T1), infinity);

PER:=proc(f::algebraic,x::name)
description "The period of a fumction f = g(sin(...),cos(...),...)";
local v:=indets( f, specfunc({sin,cos})), T,t,i;
T:=2*Pi/~ (diff(op~(v),x) minus {0});
if T={} then 
   if depends(f,x) then error "Improper expr" else WARNING("Constant expr"); return 0 fi
fi;
if depends(subs(v=~{seq(t[i],i=1..nops(v))}, f), x) or depends(T,x) 
   then  error "Improper expr" fi ;
t:=op(1,T);
for i in T do 
   t:=CommonPeriod(t,i);
   if t=infinity then return t   fi;
od;
t
end:

PER(a*cos(2*x/3+4) + b*sin(5*x/2)*cos(x), x);
PER(sin(x)+cos(Pi*x), x);

                             12 Pi
                            infinity

 

@Axel Vogt 
It's not normal that Maple does not know

limit(GAMMA(a,x), x=0,right) assuming a>0;

Note that MultiSeries:-limit  knows it. Same for x=infinity and series. Probably in the near future MultiSeries will be part of "regular" Maple.

 

 

@Carl Love 

- The compilation could be done via an auxiliary procedure obtained with ToInert or subs. The problem is whether it is worth the effort.

- But you have recursion in Binomial (using thisproc). Of course it has not a serious impact on performance in our case.

@torabi 

You must give the general form of your function because it would be difficult (time consumming) to consider the period of an arbitrary function.

@Carl Love 

You simply have a typo (x =s).

@Carl Love 

Yes, but the name too long.

@Carl Love 

Thank you. It is very instructive.

@digerdiga 

combine(((1-t)^2)^q) assuming 1-t > 0;
   (1-t)^(2*q)

(even for a complex q)

 

@Carl Love 

I am not able to provide such an example. A good candidate should be
isolve((y^2-x^3-1)*(x-2*y)*(y-2*x) = 0);
but Maple does not solve y^2-x^3-1 = 0 and however the flag is not set; it should be clear (for Maple and for us too) that not all solutions have been found e.g. x=2,y=3 [actually this is the only one which is missing].
The reason I asked the question is that I don't know why _SolutionsMayBeLost   has disappeared. It would be nice to have it back.

@Carl Love 

I don't think you are right about _SolutionsMayBeLost . solve has no reason to set it because the system is very simple.
And as I have said, the flag was set in earlier versions (and the answer was the same).

@boblas 

I have already shown this:

prod( wdeg([1,1,0,1,1,0,etc], [x,y,z,t,u,v,etc]), plex(x,y,z,t,u,v,etc) );

If you want to test it, please come with a concrete polynomial P (or a list of monomials) and provide also the sorted version of P.

 

@Carl Love 

If the starting point is changed from x to  `if`(x<2,x/2, ln(x/ln(x)))  then 2 iterations are enough for any x>0 with accuracy 4e-10 for evalhf.  And actually the accuracy is better; for evalf[30] ==> 1e-17.

W(W(`if`(x<2,x/2, ln(x/ln(x))),x),x):

But of course this is not important because an iteration of W is probably not much more expensive than ln(ln(x)).

Edit.  W(W(x/2,x),x)  has accuracy 1e-7 in the interval 0.3 .. 10

 

 

@Carl Love 

Very nice, vote up!
So, you took x as starting point for iterations. Of course there are better ones, but it has the advantage that the first iteration does not contain ln.

First 76 77 78 79 80 81 82 Last Page 78 of 178