Mad Math

8 Reputation

2 Badges

16 years, 355 days

MaplePrimes Activity


These are Posts that have been published by Mad Math

There is one thing which, as far as I know (please correct me if I'm wrong), you can do with other languages like FORM and MATHEMATICA, but cannot do with MAPLE. That is, to use patterns in replacement rules. If this were included in a future version of MAPLE, I wouldn't use MATHEMATICA ever again! For example, in MATHEMATICA you can write the following input: f[{a,b}] + f[c] /. f[{x_,y_}] -> p[x+y] and then you get the following output: f[c]+p[a+b] Another example, {1,x,x^2,x^3} /. x^n_ -> r[n] then you get {1,x,r[2],r[3]} The underscores are used to mean "any expression". For example, x_ means any expression to be named x. MATHEMATICA also has things like x__ (x with two underscores), which means any sequence to be named x, and x___ (three underscores) which means any sequence of zero or more expressions to be named x.
Page 1 of 1