Alex Smith

630 Reputation

11 Badges

20 years, 268 days

MaplePrimes Activity


These are replies submitted by Alex Smith

outerproc sets up the local variable, prints y[1], and then gets down to business and returns the last thing before end proc, which calls out innerproc(y), which in turn prints y[1] again. This modification should make it clear: outerproc := proc(x) local y; y := x; print(hello); #Notice the change here innerproc(y); end proc:
Please let us know what Maple16 looks like there in the future.
Please let us know what Maple16 looks like there in the future.
Wow, scanblock is pretty cool. I will have to tuck that into my memory. Here is how I would have approached the problem: >L:=[seq(i,i=1..30)]; >test:=proc(n); if n mod 3=0 then true else false; fi; end; > Indexf:=[ ]; > for i from 1 to nops(L) do if test(i) then Indexf:=[op(Indexf),i]; fi; od; > Indexf;
Wow, scanblock is pretty cool. I will have to tuck that into my memory. Here is how I would have approached the problem: >L:=[seq(i,i=1..30)]; >test:=proc(n); if n mod 3=0 then true else false; fi; end; > Indexf:=[ ]; > for i from 1 to nops(L) do if test(i) then Indexf:=[op(Indexf),i]; fi; od; > Indexf;
Acer makes sense. When you use t[0] then t implictly becomes something like an array instead of a real or complex variable. People always get lured into using a construction like "t[0]" because it beautifully typesets a subscript, and lose sight of the semantics. Don't get carried away with trying to do beautiful typesetting with Maple. Use LaTeX for that, and use Maple for semantics. Document mode seems to be a pathetic attempt to have it both ways. People start getting away with not using * for multiplication as you did with your factor 1/m, etc. and it all goes down hill from there.
Acer makes sense. When you use t[0] then t implictly becomes something like an array instead of a real or complex variable. People always get lured into using a construction like "t[0]" because it beautifully typesets a subscript, and lose sight of the semantics. Don't get carried away with trying to do beautiful typesetting with Maple. Use LaTeX for that, and use Maple for semantics. Document mode seems to be a pathetic attempt to have it both ways. People start getting away with not using * for multiplication as you did with your factor 1/m, etc. and it all goes down hill from there.
My interpretation of the question is that we are supposed to expand (x*d/dx+y*d/dy)^n and interpret powers of d/dx and d/dy as kth derivatives, and apply all this to f(x,y). If so, this should work: > Dop:=proc(n,f); >sum(binomial(n,k)*x^k*diff(f(x,y),x$k)*y^(n-k)*diff(f(x,y),y$(n-k)),k=0..n); end; > Dop(3,f); > g:=(x,y)->cos(x)*sin(y); > Dop(3,g);
My interpretation of the question is that we are supposed to expand (x*d/dx+y*d/dy)^n and interpret powers of d/dx and d/dy as kth derivatives, and apply all this to f(x,y). If so, this should work: > Dop:=proc(n,f); >sum(binomial(n,k)*x^k*diff(f(x,y),x$k)*y^(n-k)*diff(f(x,y),y$(n-k)),k=0..n); end; > Dop(3,f); > g:=(x,y)->cos(x)*sin(y); > Dop(3,g);
Rich, In Maple e is not Euler's constant 2.718.... Use exp(x) instead of e^x. You can tell something is wrong when you see ln(e). If Maple knew e was exp(1), it would simplify ln(e) to 1.
Rich, In Maple e is not Euler's constant 2.718.... Use exp(x) instead of e^x. You can tell something is wrong when you see ln(e). If Maple knew e was exp(1), it would simplify ln(e) to 1.
What do you mean by risk? (Pi+3*cos(n))/n dominates Pi/n, and so by the comparison test, sum(Pi+3*cos(n))/n,1..infinity) diverges to +infinity. Maple's answer in this case seems perfectly reasonable. But you are correct in pointing out that it is peculiar that Maple cannot see that the series diverges to +infinity, but it can see that the limit of the sequence of partial sums is divergent. Maybe the Wizard Behind the Curtain is leaving wiggle room for differing types of summability. Maple cannot determine if the series converges because we have not showed our hand and declared our definition of summability. Dubious. It is probably just a feature.
What do you mean by risk? (Pi+3*cos(n))/n dominates Pi/n, and so by the comparison test, sum(Pi+3*cos(n))/n,1..infinity) diverges to +infinity. Maple's answer in this case seems perfectly reasonable. But you are correct in pointing out that it is peculiar that Maple cannot see that the series diverges to +infinity, but it can see that the limit of the sequence of partial sums is divergent. Maybe the Wizard Behind the Curtain is leaving wiggle room for differing types of summability. Maple cannot determine if the series converges because we have not showed our hand and declared our definition of summability. Dubious. It is probably just a feature.
The discussed example y'+y=sin(x) is in fact specific to document mode. I started a Maple10 worksheet, and checked to see that the typesetting level is set to "extended." Next I entered y'; The response was "Error, unexpected single forward quote". Thus I conclude that only document mode interprets y' as dy/dx. I also checked View > Typesetting Rules > Differential Options (parsing only) > Prime Derivatives The box is checked, and I find that y' parses only in document mode. In my opinion, y' should never parse in a computer algebra system since the dependent variable is not clear. y' is fine on paper and pencil and in LaTeX, but not in symbolic computation. To some extent my reaction to document mode is this: if I want a document, I use LaTeX, not document mode.
The discussed example y'+y=sin(x) is in fact specific to document mode. I started a Maple10 worksheet, and checked to see that the typesetting level is set to "extended." Next I entered y'; The response was "Error, unexpected single forward quote". Thus I conclude that only document mode interprets y' as dy/dx. I also checked View > Typesetting Rules > Differential Options (parsing only) > Prime Derivatives The box is checked, and I find that y' parses only in document mode. In my opinion, y' should never parse in a computer algebra system since the dependent variable is not clear. y' is fine on paper and pencil and in LaTeX, but not in symbolic computation. To some extent my reaction to document mode is this: if I want a document, I use LaTeX, not document mode.
First 13 14 15 16 17 18 Page 15 of 18