Michael

237 Reputation

11 Badges

19 years, 160 days

MaplePrimes Activity


These are questions asked by Michael

Can anyone tell me why "type" answers "false" and why do I get an error message, from the following simple code sequence (Maple 10)?

Thanks

restart;
> testp:=proc(m);
> if (m=0) then 0;
> elif (m>0) then 1;
> elif (m<0) then -1;
> end if;
> end proc;
> assume(n,posint);
> about(n);
> type(n,posint);
> is(n,posint);
> testp(n);
> testp(-1);

testp := proc(m)
if m = 0 then 0
elif 0 < m then 1
elif m < 0 then -1
end if
end proc

Originally n, renamed n~:
is assumed to be: AndProp(integer,RealRange(1,infinity))


false
Hi: I have a complicated expression containing many Maple generated terms each of which typically looks like: 12/b/(b^s)*s/sin(Pi*b)^2*Pi^2 I absolutely can't figure out how to make 1/b/b^s become b^(s+1). I have tried using "patmatch", "match", "subs", "collect" and have now run out of ideas. For example: subs(1/b/(b^s) = 1/b^(s+1),...) does nothing. Can someone please suggest a way to do this so that the end product will look like 12/b^(s+1)*s/sin(Pi*b)^2*Pi^2 Ultimately, I want to identify the exponents of b in each term. Thanks Mike
First 7 8 9 Page 9 of 9