Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mockmma for evaluation of Mathematica (tm) commands

30 views
Skip to first unread message

Hunter

unread,
Dec 12, 2009, 8:04:38 PM12/12/09
to
Mockmma uses wxMaxima to evaluate a small subset of commands in the
syntax of Mathematica (tm),
which is a trademark of Wolfram Research Incorporated (WRI).
Mockmma is in no way associated with WRI and is based on code written
by Richard Fateman in 1990 and
compatibility functions written by John Lapeyre.

To install Mockmma: unzip Mockmma.tar.gz (or checkout trunk/Mockmma
from the Mockmma sourceforge project) into the directory share
\mockmma
under the Maxima source tree; type load("mockmma/mockmma.lisp"); and
type :lisp (mockmma).
You should see the prompt "In[1] :=". To run a test suite, enter batch
("mockmma/rtest_mockmma.mac", 'test). You can load Mockmma.wxm by
choosing File, Open from the wxMaxima menu.

Below is a list of 200+ Mathematica (tm) commands which Mockmma
correctly emulates. Any help in developing Mockmma is welcome.

Mockmma is experimental. It has no error handling and may not work on
all platforms. No warranty is expressed or implied.

"PrimeQ[23] "
"2+3"
"3^7"
"4!"
"yy=5"
"yy^2"
"Sin[1.0]"
"5+1.0"
"2.3+5.63 "
"g[x_]:=x^3"
"g[2]"
"Map[g, {1,2,3}]=={1,8,27}"
"Sqrt[4]"
"Sqrt[3.0]"
"{1,4,9,16}[[3]]"
"Cos[0]"
"Sin[0]"
"Cos[Pi]"
"Sin[Pi]"
"Sin[Pi/2]"
"Cos[Pi/2]"
"2>1"
"2<1"
"2>1"
"1<2"
"2<=1"
"1>=2"
"2>=2"
"2<=2"
"FactorInteger[24]=={{2, 3}, {3, 1}}"
"Expand[(1+x)^2]==1+2*x+x^2"
"Log[E]"
"E==Exp[1]"
"I*I "
"D[Log[x],x]==1/x "
"D[Sin[x],x]==Cos[x] "
"D[Cos[x],x]==-Sin[x] "
"Factor[x^2+2*x+1]==(x+1)^2 "
"Integrate[x,x]==x^2 / 2"
"Integrate[Sin[z]*z,z]== - z Cos[z] + Sin[z]"
"Integrate[x,{x,0,1}]==1/2"
"True && True "
"True && False "
"True || False "
"False || False "
"{a,b}.{c,d}==a*c + b * d "
"{2,3}.{5,3}"
"If[True,a,b]==a "
"If[False,a,b]==b "
"If[False,a,b]==b "
"ArcSin[1]==Pi /2 "
"Abs[1]"
"Abs[-1]"
"Round[1.1]"
"Round[1.6]"
"Mod[13,3]"
"Mod[27,8]"
"Max[27,8]"
"Min[27,8]"
"Sign[27]"
"Sign[0]"
"Sign[-23]"
"Re[5+ 7 I]"
"Im[5+ 7 I]"
"Conjugate[5+ 7 I]==5 - 7 I "
"Floor[12.5]"
"Ceiling[12.5]"
"GCD[12,18]"
"LCM[12,18]"
"KroneckerDelta[12,18]"
"KroneckerDelta[a,a]"
"Table[1,{3}]=={1, 1,1} "
"Table[i^2,{i,1,10}]=={1, 4, 9, 16, 25, 36, 49, 64, 81, 100} "
"Table[i^2,{i,10}]=={1, 4, 9, 16, 25, 36, 49, 64, 81, 100} "
"Table[f[i], {i, 1, 3}]=={f[1],f[2],f[3]} ")
"Module[{i=0},Table[i++,{10}]]=={1, 2, 3, 4, 5, 6, 7, 8, 9, 10} ")
"Table[10*i + j, {i, 4},{j,3}]==Out[2]:= {{11, 12, 13}, {21, 22, 23},
{31, 32, 33}, {41, 42, 43}}"
"Table[100* i + 10* j + k, {i, 3}, {j, 2}, {k, 4}]==
{{{111, 112, 113, 114}, {121, 122, 123, 124}}, {{211, 212, 213, 214},
{221, 222, 223, 224}}, {{311, 312, 313, 314}, {321, 322, 323, 324}}}"
"Table[x^2, {x, {1, 4, 9, 16}}]=={1, 16, 81, 256}")
"Table[j^i, {i, {1, 2, 4}}, {j, {1, 4, 9}}]=={{1, 4, 9}, {1, 16, 81},
{1, 256, 6561}} "
"Take[{a,b,c,d,e,f},4]=={a,b,c,d}"
"Take[{a,b,c,d,e,f},-3]=={d,e,f}"
"Take[{a,b,c,d,e,f},{2,4}]=={b,c,d}"
"Take[{a,b,c,d,e,f},{2,-2}]=={b,c,d,e}"
"Take[{{11,12,13},{21,22,23},{31,32,33}},2]=={{11,12,13},{21,22,23}}"
"Take[{{11,12,13},{21,22,23},{31,32,33}},3,2]=={{11, 12}, {21, 22},
{31, 32}}"
"Take[{{11,12,13},{21,22,23},{31,32,33}},2,-1]=={{13}, {23}}"
"Take[Partition[Range[11,55],5],{2,4},{3,5}]=={{18, 19, 20}, {23, 24,
25}, {28, 29, 30}}"
"Partition[{a,b,c,d,e,f},2]=={{a, b}, {c, d}, {e, f}}"
"Partition[{a,b,c,d,e,f},3,1]=={{a, b, c}, {c, d, e}}"
"Fold[f,x,{a,b,c,d}]==f[f[f[f[x, a], b], c], d]"
"Fold[Times,1,{a,b,c,d}]==a b c d "
"Apply[f,{x}]==f[x]"
"Apply[Plus,{x,y,z}]== x + y + z "
"Apply[#1+#2&,{x,y}]==x+y "
"Fold[ x * #1 + #2 &, 0, {a, b, c, d, e}]==e + x (d + x (c + x (b + a
x)))"
"Reverse[{a,b,c,d}]=={d, c, b, a}"
"Fold[1/(#1 + #2)&, x, Reverse[{a, b, c, d}]]==1/(1/(1/(1/(x+d)+c)+b)
+a)"
"Fold[ 10*#1 + #2&, 0, {4, 5, 1, 6, 7, 8}]"
"Fold[#2-#1&, 0, Reverse[{a, b, c, d, e}]]==a - b + c - d + e "
"Fold[ {#2,#1}&, x, {a, b, c, d}]=={d, {c, {b, {a, x}}}}"
"Fold[Apply[#2,{#1}]&, x, {a,b,c,d}]==d[c[b[a[x]]]]"
"Fold[f[#]& , x, Range[5]]==f[f[f[f[f[x]]]]]"
"Union[{1,2},{3,4}]=={1, 2, 3, 4}"
"Join[{a,b,c},{x,y},{u,v,w}]=={a, b, c, x, y, u, v, w}"
"Join[{{a, b}, {c, d}}, {{1, 2}, {3, 4}}]=={{a, b}, {c, d}, {1, 2},
{3, 4}}"
"Union[{1, 2, 1, 3, 6, 2, 2}]=={1, 2, 3, 6}"
"Union[{a, b, a, c}, {d, a, e, b}, {c, a}]=={a, b, c, d, e}"
"Prepend[{a, b, c, d}, x]=={x, a, b, c, d}"
"Append[{a, b, c, d}, x]=={a, b, c, d, x}"
"Riffle[{a,b,c},{x,y,z}]=={a, x, b, y, c, z}"
"Fold[Union[#1, #1 + #2]&, {0}, {1, 2, 2, 8}]=={0, 1, 2, 3, 4, 5, 8,
9, 10, 11, 12, 13}"
"FoldList[f,x,{a,b,c,d}]=={x, f[x, a], f[f[x, a], b], f[f[f[x, a], b],
c], f[f[f[f[x, a], b], c], d]}"
"FoldList[Plus,0,{a,b,c,d}]=={0, a, a + b, a + b + c, a + b + c + d}"
"FoldList[#1^#2&,x,{a,b,c,d}]=={x, x^a , (x^a )^b , ((x^a )^b )^c ,
(((x^a )^b )^c )^d }"
"FoldList[#1*#2&,x,{a,b,c,d}]=={x, a x, a b x, a b c x, a b c d x}"
"FoldList[Times,1,Range[10]]=={1, 1, 2, 6, 24, 120, 720, 5040, 40320,
362880, 3628800}"
"FoldList[1/(#2 + #1)&, x, Reverse[{a, b, c}]]==Out[5]:= {x, (c + x)
^-1 , (b + (c + x)^-1 )^-1 , (a + (b + (c + x)^-1 )^-1 )^-1 }"
"Nest[f,x,3]==f[f[f[x]]]"
"Nest[(1 + #)^2& , 1, 3]==676"
"Nest[(1 + #)^2& , x, 5]==(1 + (1 + (1 + (1 + (1 + x)^2 )^2 )^2 )^2 )
^2"
"Nest[Sqrt,100.0,4]==1.333521432163324"
"Range[4]=={1, 2, 3, 4}"
"Range[x,x+4]=={x, 1 + x, 2 + x, 3 + x, 4 + x}"
"IntegerDigits[58127]=={5, 8, 1, 2, 7}"
"IntegerDigits[58127,2]=={1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1,
1}"
"IntegerDigits[58127,16]=={14, 3, 0, 15}"
"IntegerDigits[{6,7,2},2]=={{1, 1, 0}, {1, 1, 1}, {1, 0}}"
"IntegerDigits[7,{2,3,4}]=={{1, 1, 1}, {2, 1}, {1, 3}}"
"IntegerDigits[Range[0,7],2]=={{0}, {1}, {1, 0}, {1, 1}, {1, 0, 0},
{1, 0, 1}, {1, 1, 0}, {1, 1, 1}}"
"IntegerDigits[Range[0,7],2,3]=={{0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {0,
1, 1}, {1, 0, 0}, {1, 0, 1}, {1, 1, 0}, {1, 1, 1}}"
"FromDigits[{5, 1, 2, 8}]==5128"
"FromDigits[{1, 0, 1, 1, 0, 1, 1}, 2]==91"
"FromDigits[{a, b, c, d, e}, x]==e + d x + c x^2 + b x^3 + a x^4"
"FromDigits[{7, 11, 0, 0, 0, 122}]==810122"
"Chop[10^-20]==0"
"Chop[a]==a "
"Chop[ 1 + 10.^-20* I - 7*(a + 10.^-30* b)*I]==1 - 7 I a "
"Chop[10^-17]==0"
"Chop[-1]==-1"
"Chop[-10.^-17]==0"
"Chop[{1,10^-20}]=={1, 0}"
"Chop[{10^-20,{1,10^-17}}]=={0, {1, 0}}"
"Chop[1+I]==1+I "
"Chop[1+10.^-20 I]==1 "
"Chop[10^-20 +I]==I "
"Dimensions[{{a, b, c}, {d, e, f}}]=={2, 3}"
"Dimensions[f[f[x, y], f[a, b], f[s, t]]]=={3, 2}"
"Dimensions[f[g[x, y], g[a, b], g[s, t]]]=={3, 2}"
"Most[Range[10]]=={1, 2, 3, 4, 5, 6, 7, 8, 9}"
"Dimensions[{{a, b, c}, {d, e, f}}]=={2, 3}"
"Det[{{1,2,3},{4,5,6},{7,8,9}}]==0"
"Transpose[{{1,2,3},{4,5,6},{7,8,9}}]=={{1, 4, 7}, {2, 5, 8}, {3, 6,
9}}"
"Det[ {{a,b},{c,d}}]== -(1 b c) + a d "
"Tr[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}]==15"
"MatrixRank[{{1,2,3},{4,5,6},{7,8,9}}]==2"
"MatrixRank[{{a,b},{2*a,2*b}}]==1"
"MatrixRank[{{1,I},{I,-1}}]==1"
"Eigenvalues[ { {1,0,0}, {0,1,0}, {0,0,1}}]== {1, 1, 1}"
"DiagonalMatrix[{a,b,c}]=={{a, 0, 0}, {0, b, 0}, {0, 0, c}}"
"DiagonalMatrix[{a,b,c},1]=={{0, a, 0, 0}, {0, 0, b, 0}, {0, 0, 0, c},
{0, 0, 0, 0}}"
"DiagonalMatrix[{a,b,c},-1]=={{0, 0, 0, 0}, {a, 0, 0, 0}, {0, b, 0,
0}, {0, 0, c, 0}}"
"DiagonalMatrix[{a,b,c},2]=={{0, 0, a, 0, 0}, {0, 0, 0, b, 0}, {0, 0,
0, 0, c}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}}"
"Nest[Times,2,10]==2"
"Table[f[i], {i, 10, -5, -2}]=={f[10], f[8], f[6], f[4], f[2], f[0], f
[-2], f[-4]}"
"Dimensions[Table[100* i + 10* j + k, {i, 3}, {j, 2}, {k, 4}]]== {3,
2, 4}"
"Partition[{1,2,3,4,5,6,7,8,9,10},2]=={{1, 2}, {3, 4}, {5, 6}, {7, 8},
{9, 10}}"
"Partition[{1,2,3,4,5,6,7,8,9,10},2,1]=={{1, 2}, {2, 3}, {3, 4}, {4,
5}, {5, 6}, {6, 7}, {7, 8}, {8, 9}, {9, 10}}"
"Range[10,3]=={}"
"Range[3,10,2]== {3, 5, 7, 9}"
"Range[n,x+4]==Range[n, 4 + x]"
"Range[10,3,-1]=={10, 9, 8, 7, 6, 5, 4, 3}"
"Range[x,x+4]=={x, 1 + x, 2 + x, 3 + x, 4 + x}"
"Range[x+4,x]=={}"
"Range[x+4,x,-1]=={4 + x, 3 + x, 2 + x, 1 + x, x}"
"IntegerDigits[0]=={0}"
"Union[{a,b,c}]=={a, b, c}"
"Union[g[a,b,c],g[c,d,e]]==g[a, b, c, d, e]"
"Intersection[g[a,b,c],g[c,d,e]]==g[c]"
"Subsets[{a,b,c,d}]=={{},{a}, {a, b}, {a, b, c}, {a, b, c, d}, {a, b,
d}, {a, c}, {a, c, d}, {a, d}, {b}, {b, c}, {b, c, d}, {b, d}, {c},
{c, d}, {d}}"
"Subsets[f[a,b,c,d]]==Out[12]:= {f[],f[a], f[a, b], f[a, b, c], f[a,
b, c, d], f[a, b, d], f[a, c], f[a, c, d], f[a, d], f[b], f[b, c], f
[b, c, d], f[b, d], f[c], f[c, d], f[d]}"
"AtomQ[x]==True "
"AtomQ[123456]==True "
"AtomQ[1/10]==True "
"AtomQ[3+I]==True "
"Nest[h,x,3]==h[h[h[x]]] "
"NestList[h,x,3]=={h[x], h[h[x]], h[h[h[x]]]} "
"Fold[h,x,{a,b,c}]==h[h[h[x, a], b], c] "
"FoldList[h,x,{a,b,c}]=={x, h[x, a], h[h[x, a], b], h[h[h[x, a], b],
c]} "
"Length[{a,b,c,d}]==4"
"Length[a+b+c+d]==4"
"Length[f[g[x,y],z]]==2"
"Length[x]==0"
"Length[123456]==0"
"Length[3+I]==0"
"Length[1/10]==0"
"Length[{{a,b,c},{d,e,f}}]==2"
"Length[IntegerDigits[1000!]]==2568"
"Csc[Pi/2]==1"
"Cot[1.0]==0.64209261593433065"
"ArcCosh[2.0]==1.3169578969248166"
"Module[{x=5},x]"
"i=7"
"i++ "
"i-- "
"PermutationQ[e_List] := (Sort[e] === Range[Length[e]])"
"PermutationQ[{3,2,1}] "
"PermutationQ[{3,2,2}] "
"(p={2,3,4,5,1}
"Select[Range[20], PrimeQ[#]&]=={2, 3, 5, 7, 11, 13, 17, 19} "
"BesselJ[2,0.2]==0.004983354152783565"
"BesselY[2,0.2]==-32.15714455874636"
"BesselI[2,0.2]==0.0050166875138946783"
"BesselK[2,0.2]==49.51242928773285"
"Gamma[0.2]==4.5908437119988044"
"Plot[x^2,{x,-5,5}] "
"Plot3D[x^2+y^2,{x,-5,5},{y,-5,5}] "
"ParametricPlot[{Cos[t],Sin[t]},{t,0, 2 Pi}]"
"ListPlot[Table[{Cos[t],Sin[t]},{t,0,6.28,0.1}]]"
"ContourPlot[ Exp[-(x^2 + 3 y^2)], {x, -2, 2}, {y, -2, 2} ]"
"Erf[1.0]"
"Erfc[1.0]"
"LaplaceTransform[t,t,s]==1/s^2"
"InverseLaplaceTransform[1/s^2,s,t]==t "
"UnitStep[0.00001]"
"UnitStep[0]"
"Inverse[{{1,2},{3,4}}]=={{-2, 1}, {3/2, -1/2}}"
"Eigenvalues[{{1,2},{2,1}}]=={3, -1}"
"PartitionsP[1000]==24061467864032622473692149727991"
"LegendreQ[1,3]==1/2 (-2 +3 Log[-2])"


clicl...@freenet.de

unread,
Dec 13, 2009, 3:23:18 PM12/13/09
to

Hunter schrieb:

>
> Mockmma uses wxMaxima to evaluate a small subset of commands in the
> syntax of Mathematica (tm),
> which is a trademark of Wolfram Research Incorporated (WRI).
> Mockmma is in no way associated with WRI and is based on code written
> by Richard Fateman in 1990 and
> compatibility functions written by John Lapeyre.
>
> [...]

>
> Below is a list of 200+ Mathematica (tm) commands which Mockmma
> correctly emulates. Any help in developing Mockmma is welcome.
>
> Mockmma is experimental. It has no error handling and may not work on
> all platforms. No warranty is expressed or implied.
>

Could you say something about your motives? Do you think many people
pefer to write Sin[x] for sin(x)? That many want to define functions in
the manner of f[x_] := 1/x? Etc.

Wouldn't it be more profitable to make Maxima simplify trigonometric
expressions correctly (in the sense of MMA)? Or make it solve polynomial
equations automatically like MMA? Or make it calculate integrals like
Integrate[Sqrt[x] Sin[a^2 x] Sin[b^2/x], {x,0,Infinity}] too?

Martin.

Axel Vogt

unread,
Dec 13, 2009, 5:03:14 PM12/13/09
to

/semi-off-topic on
that strange notation and handling it on a German keyboard
for me was one reason to decide for Maple ...
/semi-off-topic off

Nasser M. Abbasi

unread,
Dec 13, 2009, 5:50:25 PM12/13/09
to

"Axel Vogt" <&nor...@axelvogt.de> wrote in message
news:7ol6k7F...@mid.individual.net...

>
> /semi-off-topic on
> that strange notation and handling it on a German keyboard
> for me was one reason to decide for Maple ...
> /semi-off-topic off

I do not think it is off topic, but I'd like to point out that it is very
easy to use standard parenthesis in Mathematica instead of [ and ].

Just set the preferences. This is how to do it with examples in Mathematica
7:

http://12000.org/my_notes/using_traditional_notation_in_mathematica/

--Nasser


clicl...@freenet.de

unread,
Dec 14, 2009, 10:32:27 PM12/14/09
to

clicl...@freenet.de schrieb:

This should have been "systems of polynomial equations". Sorry!

Martin.

rjf

unread,
Dec 15, 2009, 7:55:58 AM12/15/09
to
On Dec 14, 7:32 pm, cliclic...@freenet.de wrote:

> > Wouldn't it be more profitable to make Maxima simplify trigonometric
> > expressions correctly (in the sense of MMA)? Or make it solve
> > polynomial equations automatically like MMA?
>
> This should have been "systems of polynomial equations". Sorry!

Do you actually have a copy of Maxima? solve (also algsys) solve
polynomial systems.
linsolve solve systems of polynomials if they happen to be linear
polynomials.
Or using Grobner bases?

Now I don't know what you mean by "automatically like MMA". Does MMA
take polynomial
systems out of your pocket and automatically solve them, like, say a
thermostat
automatically adjusts the temperature in your house? Or does it just
wait around
until you manually type in a command to solve them?

Or are you saying that someone should reverse engineer MMA so that the
solve program in Maxima should have the same program?

Or are you talking about formatting the results the same? Or what?

grump.
RJF
RJF

clicl...@freenet.de

unread,
Dec 16, 2009, 12:52:15 PM12/16/09
to

rjf schrieb:

gulp.

This matter shouldn't be too difficult to sort out. Let's take it up
where it was left in Nasser's recent thread "A bit of statistics trivia
for Maple and Mathematica" (my post of Nov. 23, 01:53; your post of Nov.
23, 02:12; my post of Nov. 23, 04:26),

<http://groups.google.com/group/sci.math.symbolic/browse_thread/thread/27c1f100b4ec63d7>.

My experience with Maxima is limited to a few commands entered on some
web interface (I forgot the URL), and my experience with Mathematica
isn't worth mentioning either (when I had access to it, I usually didn't
need it, or it wasn't up to my needs, and the new Alpha web interface
seems to fail systematically with my ancient browser). Thus, the
statements I made in this thread are based mainly on 20 months of
observing sci.math.symbolic - done precisely in order to learn about the
capabilities of modern Computer Algebra systems without having to try
them all, or having to find out what the respective on-line
documentation chooses to be silent about.

During these 20 months there seems to have been only one attempt to
solve a polynomial system on Maxima (although there were responses for
Mathematica, FriCAS, and Derive, and of course by Robert Lewis for
Fermat, to a number of other such problems), according to my memory.
This one attempt was by Peter Nachtwey in his thread "Is this a Maxima
bug or is it just me, again?",

<http://groups.google.com/group/sci.math.symbolic/browse_thread/thread/678a8ed23313abbb>.

The attempt was no complete failure (which fact I had forgotten), but
almost so even for the expert, and completely so for Peter: Maxima
failed thoroughly in the initial straightforward formulation of the
problem where it returned with no solution. With the free parameter r
included among the variables to be solved for, an unnecessarily
complicated system resulted, which Maxima was not able to reduce to an
explicit solution.

As regards the other points I have mentioned in the present thread: The
integral is readily solved when viewed as a Mellin convolution of
Meijer-G functions; hence it would have been surprising if Mathematica
would have failed here, and also if Maxima wouldn't have. The remark on
trigonometic simplification is informed by an example you brought up
yourself a couple of months ago.

Martin.

PS: For seasonal reasons, my usenet response is slowed down these days.

Richard Fateman

unread,
Dec 17, 2009, 12:33:15 AM12/17/09
to

There are 28 messages in that thread. Which are you responding to?

>
> My experience with Maxima is limited to a few commands entered on some
> web interface (I forgot the URL),

I suggest that you download a version of Maxima and try it before you
make claims about what it can or cannot do.

and my experience with Mathematica
> isn't worth mentioning either (when I had access to it, I usually didn't
> need it, or it wasn't up to my needs, and the new Alpha web interface
> seems to fail systematically with my ancient browser).

Ditto.

Thus, the
> statements I made in this thread are based mainly on 20 months of
> observing sci.math.symbolic - done precisely in order to learn about the
> capabilities of modern Computer Algebra systems without having to try
> them all, or having to find out what the respective on-line
> documentation chooses to be silent about.

You don't have to try them all.

>
> During these 20 months there seems to have been only one attempt to
> solve a polynomial system on Maxima (although there were responses for
> Mathematica, FriCAS, and Derive, and of course by Robert Lewis for
> Fermat, to a number of other such problems), according to my memory.
> This one attempt was by Peter Nachtwey in his thread "Is this a Maxima
> bug or is it just me, again?",
>
> <http://groups.google.com/group/sci.math.symbolic/browse_thread/thread/678a8ed23313abbb>.
>
> The attempt was no complete failure (which fact I had forgotten), but
> almost so even for the expert, and completely so for Peter: Maxima
> failed thoroughly in the initial straightforward formulation of the
> problem where it returned with no solution. With the free parameter r
> included among the variables to be solved for, an unnecessarily
> complicated system resulted, which Maxima was not able to reduce to an
> explicit solution.

It seems to me that the solution in Maxima was posted, namely by me,

try s: solve([(x-x0)^2+(y-y0)^2=r^2,(x-x1)^2+(y-y1)^2=r^2],[x,y,r]);
which takes 0.3 seconds on my system.

and maybe in another form by "none".


>
> As regards the other points I have mentioned in the present thread: The
> integral is readily solved when viewed as a Mellin convolution of
> Meijer-G functions; hence it would have been surprising if Mathematica
> would have failed here, and also if Maxima wouldn't have.

Since you didn't try it on Maxima, why do you assume it would not work?

The remark on
> trigonometic simplification is informed by an example you brought up
> yourself a couple of months ago.
>

Maybe you could inform us here of which example you are referring to?


Of course these are still irrelevant to HunterMonroe's original message.
RJF

clicl...@freenet.de

unread,
Dec 27, 2009, 7:58:45 PM12/27/09
to

Richard Fateman schrieb:

> clicl...@freenet.de wrote:
> > rjf schrieb:
> >> On Dec 14, 7:32 pm, cliclic...@freenet.de wrote:
> >>
> >>>> Wouldn't it be more profitable to make Maxima simplify
> >>>> trigonometric expressions correctly (in the sense of MMA)?
> >>>> Or make it solve polynomial equations automatically like MMA?
> >>> This should have been "systems of polynomial equations". Sorry!
> >> Do you actually have a copy of Maxima? solve (also algsys) solve
> >> polynomial systems.
> >> linsolve solve systems of polynomials if they happen to be linear
> >> polynomials.
> >> Or using Grobner bases?
> >>
> >> Now I don't know what you mean by "automatically like MMA". Does MMA
> >> take polynomial
> >> systems out of your pocket and automatically solve them, like, say a
> >> thermostat
> >> automatically adjusts the temperature in your house? Or does it just
> >> wait around
> >> until you manually type in a command to solve them?
> >>
> >> Or are you saying that someone should reverse engineer MMA so that the
> >> solve program in Maxima should have the same program?
> >>
> >> Or are you talking about formatting the results the same? Or what?
> >>
> >
> > This matter shouldn't be too difficult to sort out. Let's take it up
> > where it was left in Nasser's recent thread "A bit of statistics trivia
> > for Maple and Mathematica" (my post of Nov. 23, 01:53; your post of Nov.
> > 23, 02:12; my post of Nov. 23, 04:26),
> >
> > <http://groups.google.com/group/sci.math.symbolic/browse_thread/thread/27c1f100b4ec63d7>.
>
> There are 28 messages in that thread. Which are you responding to?

I was referring to the three messages identified by date and time above.
But I did so mainly to call to attention that I had made a similar
assertion before, that you had asked about it before, and that I had
answered you before, although in November I had been to lazy to dig up
the actual thread. (Naturally in such a case one may assume that you
finally rembered the problem, and take your your subsequent silence for
an admission of this. Beyond this, nothing in our November exchange is
of relevance now.)

>
> >
> > My experience with Maxima is limited to a few commands entered on some
> > web interface (I forgot the URL),
>
> I suggest that you download a version of Maxima and try it before you
> make claims about what it can or cannot do.

Thank you. I think that inferring CAS capabilities on the basis of
evidence posted to sci.math.symbolic (and other published material like
Michael Westers 1999 article) is a valid approach for the purpose of
discussion on the group. In particular, I myself can thus judge the
various systems other than Derive (the system I am using) in the same
way. I guess you'll just have to stand my meddling like the other
correspondents. :)

>
> and my experience with Mathematica
> > isn't worth mentioning either (when I had access to it, I usually didn't
> > need it, or it wasn't up to my needs, and the new Alpha web interface
> > seems to fail systematically with my ancient browser).
>
> Ditto.

Well, I am commenting on the apparent capabilities and defects of
Mathematica too (last on Dec. 9 at 18:54 in the thread "Symbolic
manipulation with Sqrt[-1] ?"), sometimes even blusterously, and I
haven't heard complaints about meddling. I simply take it for granted
that examples of bugs or features are posted to the group for this
purpose, among others.

>
> Thus, the
> > statements I made in this thread are based mainly on 20 months of
> > observing sci.math.symbolic - done precisely in order to learn about the
> > capabilities of modern Computer Algebra systems without having to try
> > them all, or having to find out what the respective on-line
> > documentation chooses to be silent about.
>
> You don't have to try them all.

Sounds like you want me to switch from Derive to Maxima. My impression
from reading 20 months of sci.math.symbolic postings is that this would
be a slight downgrade. :(

>
> >
> > During these 20 months there seems to have been only one attempt to
> > solve a polynomial system on Maxima (although there were responses for
> > Mathematica, FriCAS, and Derive, and of course by Robert Lewis for
> > Fermat, to a number of other such problems), according to my memory.
> > This one attempt was by Peter Nachtwey in his thread "Is this a Maxima
> > bug or is it just me, again?",
> >
> > <http://groups.google.com/group/sci.math.symbolic/browse_thread/thread/678a8ed23313abbb>.
> >
> > The attempt was no complete failure (which fact I had forgotten), but
> > almost so even for the expert, and completely so for Peter: Maxima
> > failed thoroughly in the initial straightforward formulation of the
> > problem where it returned with no solution. With the free parameter r
> > included among the variables to be solved for, an unnecessarily
> > complicated system resulted, which Maxima was not able to reduce to an
> > explicit solution.
>
> It seems to me that the solution in Maxima was posted, namely by me,
>
> try s: solve([(x-x0)^2+(y-y0)^2=r^2,(x-x1)^2+(y-y1)^2=r^2],[x,y,r]);
> which takes 0.3 seconds on my system.
>
> and maybe in another form by "none".

Whom are you trying to fool? Your proposal doesn't undo the empty-return
bug, and it is no "solution" at all, because Peter Nachtwey had two
equations in two unknowns, and adding one of the parameters to the
unknowns prevents an explicit solution of the system; instead of
coordinate points [x,y] you will (at best) get pairs relations among
x,y, and r from which r has to be eliminated. From a user viewpoint,
your proposal is unnecessary, arbitrary, and likely to complicate the
matter - and Peter has already expressed this feeling.

Thus my recollection of Maxima's performance is essentially borne out by
the evidence contained Peter's thread. It should be stressed that his
kind of geometrical problem in two and three dimensions is a very common
case for systems of polynomial equations. For the explicit solution to
his problem refer to the Derive result given in his thread.

>
> >
> > As regards the other points I have mentioned in the present thread: The
> > integral is readily solved when viewed as a Mellin convolution of
> > Meijer-G functions; hence it would have been surprising if Mathematica
> > would have failed here, and also if Maxima wouldn't have.
>
> Since you didn't try it on Maxima, why do you assume it would not work?
>
> The remark on
> > trigonometic simplification is informed by an example you brought up
> > yourself a couple of months ago.
> >
>
> Maybe you could inform us here of which example you are referring to?

I have found where I came to associate Maxima with problems (relative to
Mathematica) in trigonometric simplification: Eduardo Cavazos' thread
"Example 7.16 of Elementary Algorithms (simplify-trig)"

<http://groups.google.com/group/sci.math.symbolic/browse_thread/thread/db3e39c4be0bdf82>,

starting with your post of Oct. 1, 17:43.

>
> Of course these are still irrelevant to HunterMonroe's original
> message.

Of course I am interested in an answer to my original question regarding
the motives behind the OP's project, and not in digging up the old posts
underlying my impression of Maxima's capabilities - even if memory had
tricked me, it shouldn't be too hard to substitute other areas where
improvement is desirable, or at least possible.

But your asking where I got my ideas is legitimate, and the details are
relevant to my question inasmuch the OP should be of the opinion that
there is nothing left to improve about Maxima's mathematical
capabilities, although I would be surprised if he were. On the other
hand, I could imagine good reasons for a project like his in spite of
other things being left to improve. And I still think his motives would
interest other sci.math.symbolic readers too.

Martin.

Richard Fateman

unread,
Dec 27, 2009, 8:43:51 PM12/27/09
to
clicl...@freenet.de wrote:
> Richard Fateman schrieb:
>> clicl...@freenet.de wrote:
>>> rjf schrieb:
>>>.........

>>> where it was left in Nasser's recent thread "A bit of statistics trivia
>>> for Maple and Mathematica" (my post of Nov. 23, 01:53; your post of Nov.
>>> 23, 02:12; my post of Nov. 23, 04:26),
>>>
>>> <http://groups.google.com/group/sci.math.symbolic/browse_thread/thread/27c1f100b4ec63d7>.
>> There are 28 messages in that thread. Which are you responding to?
>
> I was referring to the three messages identified by date and time above.

I see messages but with different days and times (time zones!) It would
be so much simpler if you just quoted, succinctly, what you were
referring to.


> But I did so mainly to call to attention that I had made a similar
> assertion before, that you had asked about it before, and that I had
> answered you before, although in November I had been to lazy to dig up
> the actual thread.

What assertion is that?

Is it perhaps that Maxima cannot compute the intersection of two
circles? Or something about "integrated kernel functions"?

Or does it have to do with your assertion of the evident inferiority of
Maxima since it lacks Mellin convolutions?

Why can't you just state the point you are trying to make?


(Naturally in such a case one may assume that you
> finally rembered the problem, and take your your subsequent silence for
> an admission of this. Beyond this, nothing in our November exchange is
> of relevance now.)

??? I have no idea what you are talking about, and probably no one else
cares. In fact, I don't care either!


>
>>> My experience with Maxima is limited to a few commands entered on some
>>> web interface (I forgot the URL),
>> I suggest that you download a version of Maxima and try it before you
>> make claims about what it can or cannot do.
>
> Thank you. I think that inferring CAS capabilities on the basis of
> evidence posted to sci.math.symbolic (and other published material like
> Michael Westers 1999 article) is a valid approach for the purpose of
> discussion on the group.

Data from pre-1999 testing of CAS is not likely to be valid 10 or more
years later, except possibly for DERIVE, or if you are in some time-warp.


....

>
> Well, I am commenting on the apparent capabilities and defects of
> Mathematica too (last on Dec. 9 at 18:54 in the thread "Symbolic
> manipulation with Sqrt[-1] ?"), sometimes even blusterously, and I
> haven't heard complaints about meddling.

I don't think people complain about meddling. I usually try to keep my
complaints to erroneous statements of some sort, though I suppose I
sometimes go overboard.

I simply take it for granted
> that examples of bugs or features are posted to the group for this
> purpose, among others.

Bugs are generally posted by people who have encountered them in
computer algebra systems. Suggestions, comments, etc. are sometimes
offered. This is not "meddling" in my view.


>
>
> Sounds like you want me to switch from Derive to Maxima.

Not at all. I would prefer that you use a system that you are familiar
with. I would also prefer that you learn a good bit more about other
computer algebra systems (or the field generally) before making
pronouncements.

My impression
> from reading 20 months of sci.math.symbolic postings is that this would
> be a slight downgrade. :(

Why deal with facts when you can deal with (possibly uninformed!)
opinions? Do you really think sci.math.symbolic reflects the state of
the art, rather than a mixture of reportage, banter, spam?

I'm not going to go back to this...


>
>>> During these 20 months there seems to have been only one attempt to

>>> solve a polynomial system on Maxima (....

(RJF:)

>> It seems to me that the solution in Maxima was posted, namely by me,
>>
>> try s: solve([(x-x0)^2+(y-y0)^2=r^2,(x-x1)^2+(y-y1)^2=r^2],[x,y,r]);
>> which takes 0.3 seconds on my system.
>>
>> and maybe in another form by "none".
>
> Whom are you trying to fool?

.....

From a user viewpoint,
> your proposal is unnecessary, arbitrary, and likely to complicate the
> matter - and Peter has already expressed this feeling.

You know, there are often many ways stating a problem, and often some
number of solutions. Is it an inherent difficulty in Maxima that you
are referring to, or a matter of someone, perhaps you or Peter, writing
a 5 line function that might be called
Solve_polynomial_systems_for_Martin( ....)

>
> Thus my recollection of Maxima's performance is essentially borne out by
> the evidence contained Peter's thread. It should be stressed that his
> kind of geometrical problem in two and three dimensions is a very common
> case for systems of polynomial equations. For the explicit solution to
> his problem refer to the Derive result given in his thread.

....


>> (RJF)

Maybe you could inform us here of which example you are referring to?
>
> I have found where I came to associate Maxima with problems (relative to
> Mathematica) in trigonometric simplification: Eduardo Cavazos' thread
> "Example 7.16 of Elementary Algorithms (simplify-trig)"
>
> <http://groups.google.com/group/sci.math.symbolic/browse_thread/thread/db3e39c4be0bdf82>,
>
> starting with your post of Oct. 1, 17:43.

You are confusing some kind of trivial hack included or not included in
the current version of a CAS, as to ordering of trigonometric
simplification rules, with inherent capabilities. Furthermore you seem
to believe that this provides some kind of immutable ordering for
measuring the quality of a CAS.
>

>
> Of course I am interested in an answer to my original question regarding
> the motives behind the OP's project,

OK, here's a question for Hunter, and for you too. Why don't you work
on, say, clean energy, world peace, or even levitation. Any of these
would be enormously more useful than Mellin convolutions.

What makes you think that Hunter believes there is nothing left to
improve in Maxima?

>I could imagine good reasons for a project like his in spite of
> other things being left to improve.

OK

And I still think his motives would
> interest other sci.math.symbolic readers too.

While I suppose Hunter could answer for himself, my assumptions is that
Hunter did what he was interested in doing, and could do with his
knowledge and skills. He didn't do what he was not interested in doing,
or couldn't do with his knowledge and skills.

RJF

clicl...@freenet.de

unread,
Dec 28, 2009, 8:50:05 PM12/28/09
to

Richard Fateman schrieb:
>
> [please refer to the preceding posts]
>

I restrict myself to a few footnotes:

My sentence fragment "... pairs relations among x, y, and r from which r
has to be eliminated" should have read "... pairs of relations among x,
y, and r from which either x or y has to be eliminated".

I remain of the opinion, that the behavior of Maxima for Peter
Nachtwey's problem constitutes a serious failure (or "bug"); it should
therefore be repaired.

The trigonometric simplification problem is serious only if the sqrt
function is defined as unique and single-valued, with a fixed branch cut
along which the function jumps. This is the model of Mathematica and
also of Derive; if Maxima does not follow this model, the matter is of
secondary importance.

It should be left to the audience to decide, by each reader for himself,
to what extent who was clear or not, sensible or not, knowledgeable or
not, etc.; all relevant material is now quoted or referenced somewhere
in this thread.

To what extent the contributions to sci.math.symbolic reflect the state
of the art in CAS design, and to what extent Michael Wester's 1999
comparison of systems is hopelessly out of date, should be discussed by
the entire group, with as many contributions as possible.

My own impression is that the state of the art is reflected pretty well,
if you know how to read between the lines. The _symbolic_ capabilities
of Mathematica and Maple seem to have reached some kind of saturation
where bug and failure rates remain constant; and where the developers
must find ways to sell the same capabilities to the same people again
and again. The other systems are still well behind and are (apart from
Derive, which was discontinued in 2004) perhaps trying to catch up.

Martin.

Richard Fateman

unread,
Dec 29, 2009, 12:04:42 AM12/29/09
to
clicl...@freenet.de wrote:
> Richard Fateman schrieb:
>> [please refer to the preceding posts]
>>
>
> I restrict myself to a few footnotes:
>
> My sentence fragment "... pairs relations among x, y, and r from which r
> has to be eliminated" should have read "... pairs of relations among x,
> y, and r from which either x or y has to be eliminated".
>
> I remain of the opinion, that the behavior of Maxima for Peter
> Nachtwey's problem constitutes a serious failure (or "bug"); it should
> therefore be repaired.

How would you distinguish a serious failure of a program from a simple
flaw? How would you distinguish a failure of the program from a
misunderstanding of the user (failure to read the documentation?)

If you don't care for the way Maxima works, you are free to contribute
programs that have different functionality that work to your liking. I
assume that the algorithmically-challenging technical capabilities
needed for solving polynomial systems are already programmed, and your
contribution would consist of collecting lists of variables and such,
and arranging the computation as you see fit, and calling those programs.


>
> The trigonometric simplification problem is serious only if the sqrt
> function is defined as unique and single-valued,

Of course this is a mistake, since the sqrt function of mathematics
ordinarily has two values.


> with a fixed branch cut
> along which the function jumps.

You perhaps fail to understand that any such branch cut that you might
choose is a branch cut in the plane consisting of complex numbers. This
provides only slight help in determining what the single value of
sqrt (x^2-y^2) might be. Is it i*sqrt(y^2-x^2)? How familiar are you
with the mathematics of functions of several complex variables?

> This is the model of Mathematica and
> also of Derive;

you think so?

if Maxima does not follow this model, the matter is of
> secondary importance.

What matter are you referring to as primary then? In fact, I would
expect that Maxima, along with Maple and Mathematica are probably
inconsistent in this matter, having a behavior that is the combination
of several different programmers' notions of what is right.

>
> It should be left to the audience to decide, by each reader for himself,
> to what extent who was clear or not, sensible or not, knowledgeable or
> not, etc.; all relevant material is now quoted or referenced somewhere
> in this thread.

I certainly doubt that the reader has enough information to go on here.

>
> To what extent the contributions to sci.math.symbolic reflect the state
> of the art in CAS design, and to what extent Michael Wester's 1999
> comparison of systems is hopelessly out of date, should be discussed by
> the entire group, with as many contributions as possible.

Why do you suppose that sci.math.symbolic serves the function you propose?


>
> My own impression is that the state of the art is reflected pretty well,
> if you know how to read between the lines.

Why would your impression have any validity, since you admit to being
unfamiliar with every system except Derive?

> The _symbolic_ capabilities
> of Mathematica and Maple seem to have reached some kind of saturation
> where bug and failure rates remain constant;

Please define "symbolic capabilities".

and where the developers
> must find ways to sell the same capabilities to the same people again
> and again.

I suspect that the developers are trying to sell quite other things than
symbolic capabilities per se.

The other systems are still well behind and are (apart from
> Derive, which was discontinued in 2004) perhaps trying to catch up.

So, being unfamiliar with all systems including Mathematica and Maple,
since 1999, you feel capable of making this determination.
Why not write a paper for a conference on this topic?
RJF

0 new messages