vv

14092 Reputation

20 Badges

10 years, 116 days

MaplePrimes Activity


These are replies submitted by vv

@Carl Love 

My point is that it is not very difficult to write a procedure with a local status for a variable.
 

@Carl Love 

Maybe something like this:

restart;
x:=10:
pl:=proc(f::uneval, r::uneval)
plot(f, r);
end:
pl(sin(x), x=-Pi..Pi);

 

@Carl Love 

I know, my answer was in the OP's context and it is correct.

@nm 

Because it is global.

@Carl Love 

Heinz'  is not that bad with a small change.

Heinz:= n-> min(select(d-> (d^2>n), Divisors(n))):

 

@Carl Love 

I wonder how useful is the type  `&+` due to the fact that the ordering of the terms in a sum could be difficult to predict.

@Al86 

This is not true. Take for instance p_0(t) = -t  or  p_0(t) = -t/2.
Not even when p_0 > 0.

 

@Al86 

It is not possible to maximize an expression depending on an unknown function (p_0 in this case).
It's just like asking for max { f(t): t in [0,1] } with no information about f().

Or, is the problem a variational one?

@Adam Ledger 

Your function F computes the set {p^t :  p is a prime, t is a power of 2, p^t | n} \ {2}.
This can be done much more efficiently using ifactors(n).

F:= n -> {seq(seq(p[1]^(2^j), j=0..ilog2(p[2])), p=ifactors(n)[2])} minus {2}:

 

@Markiyan Hirnyk 

I think that I have explained the problem crearly in my reply.
Note also that MultiSeries:-asympt(f,n,3) assuming x>0;  is even wronger.

@Markiyan Hirnyk 

Have you read my reply, or your "does not correspond to reality" was automatic?
a contains the asymptotic for real n --> oo. It is wrong. Please note that this result is used even when n::posint, so we cannot consider it as being correct in this case.

@Markiyan Hirnyk 

Thank you.
Unfortunately the asymptotic expansion obtained by Maple is wrong!

 

restart;

f := n*(diff((exp(x)-1)/x, x$n));

-n*(-1/x)^n*(GAMMA(n+1)-GAMMA(n+1, -x))/x

(1)

a:=asympt(f,n,2) assuming x>0;

-(exp(I*n*Pi))^2*exp(ln(-x)+x)/x+O(1/n)

(2)

b:=convert(a, polynom);

-(exp(I*n*Pi))^2*exp(ln(-x)+x)/x

(3)

c:=eval(b, n=m+1/2);

-(exp(I*(m+1/2)*Pi))^2*exp(ln(-x)+x)/x

(4)

simplify(expand(c)) assuming m::integer;

-exp(x)

(5)

d:=eval(b, n=m+1/4);

-(exp(I*(m+1/4)*Pi))^2*exp(ln(-x)+x)/x

(6)

simplify(expand(d)) assuming m::integer;

I*exp(x)

(7)

 


Download asympt.mw

 

@Adam Ledger 

From the user's point of view, it doesn't matter whether a procedure is in the kernel or in the library (except the speed and the posibility of being traced/viewed). It's the designer's decision; it is not unusual for a procedure to be moved from the kernel into the library or viceversa.

@Carl Love 

You are right. I can't explain why I did not use it.

@acer 

I also think that the "methods" associated to such objects should be better documented (with examples) for a user who is not necessarily interested in working with objects. It seems that all the new packages are implemented with objects; this is of course more flexible but the user will have problems to understand how exactly they work and what are the side effects.

First 90 91 92 93 94 95 96 Last Page 92 of 177