Alejandro Jakubi

MaplePrimes Activity


These are replies submitted by Alejandro Jakubi

@PatrickT 

On Linux Mint 13, the Firefox version here is also 22, so I think that the issue is java version. Launching Firefox from the console prompt, at the point that the first example loads, a lot of Java error mesages appear:

$ firefox
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1)
OpenJDK Server VM (build 20.0-b12, mixed mode)
net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize applet. 
	at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:735)
	at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676)
	at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886)
Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Unknown Main-Class. Could not determine the main class for this application.
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:511)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:204)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:323)
	at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:701)
	... 2 more
Caused by: 
net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Unknown Main-Class. Could not determine the main class for this application.
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:511)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:204)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:323)
	at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:701)
	at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676)
	at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886)
java.lang.NullPointerException
	at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:149)
	at sun.applet.AppletPanel.run(AppletPanel.java:381)
	at java.lang.Thread.run(Thread.java:679)
java.lang.NullPointerException
	at sun.applet.AppletPanel.run(AppletPanel.java:431)
	at java.lang.Thread.run(Thread.java:679)
net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize applet. 
	at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:735)
	at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676)
	at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886)
Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Unknown Main-Class. Could not determine the main class for this application.
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:511)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:204)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:323)
	at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:701)
	... 2 more
Caused by: 
net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Unknown Main-Class. Could not determine the main class for this application.
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:511)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:204)
	at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:323)
	at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:701)
	at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676)
	at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886)
java.lang.NullPointerException
	at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:149)
	at sun.applet.AppletPanel.run(AppletPanel.java:381)
	at java.lang.Thread.run(Thread.java:679)
java.lang.NullPointerException
	at sun.applet.AppletPanel.run(AppletPanel.java:431)
	at java.lang.Thread.run(Thread.java:679)
MapleNet error: 
java.lang.reflect.InvocationTargetException
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1076)
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1053)
	at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
	at com.maplesoft.maplenet.worksheet.applets.editor.WmiEditor.init(WmiEditor.java:147)
	at sun.applet.AppletPanel.run(AppletPanel.java:437)
	at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.ExceptionInInitializerError
	at com.maplesoft.mathdoc.util.WmiResourcePackage.setPlatformSuffix(WmiResourcePackage.java:397)
	at com.maplesoft.mathdoc.util.WmiResourcePackage.(WmiResourcePackage.java:138)
	at com.maplesoft.mathdoc.controller.WmiClipboardManager.(WmiClipboardManager.java:136)
	at com.maplesoft.mathdoc.controller.WmiMathMLClipboardManager.(WmiMathMLClipboardManager.java:66)
	at com.maplesoft.mathdoc.view.WmiMathMLDocumentView.getClipboardManager(WmiMathMLDocumentView.java:110)
	at com.maplesoft.mathdoc.view.WmiMathDocumentView.(WmiMathDocumentView.java:506)
	at com.maplesoft.mathdoc.view.WmiInteractiveDocumentView.(WmiInteractiveDocumentView.java:62)
	at com.maplesoft.mathdoc.view.WmiMathMLDocumentView.(WmiMathMLDocumentView.java:44)
	at com.maplesoft.mathdoc.view.WmiMathMLDocumentView.(WmiMathMLDocumentView.java:52)
	at com.maplesoft.mathdoc.view.WmiMathMLEditorDocumentView.(WmiMathMLEditorDocumentView.java:59)
	at com.maplesoft.maplenet.worksheet.applets.editor.WmiEditor.createGUI(WmiEditor.java:190)
	at com.maplesoft.maplenet.worksheet.applets.editor.WmiEditor.access$000(WmiEditor.java:49)
	at com.maplesoft.maplenet.worksheet.applets.editor.WmiEditor$1.run(WmiEditor.java:149)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:216)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673)
	at java.awt.EventQueue.access$300(EventQueue.java:96)
	at java.awt.EventQueue$2.run(EventQueue.java:634)
	at java.awt.EventQueue$2.run(EventQueue.java:632)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:643)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission sun.arch.data.model read)
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:393)
	at java.security.AccessController.checkPermission(AccessController.java:558)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
	at net.sourceforge.jnlp.runtime.JNLPSecurityManager.checkPermission(JNLPSecurityManager.java:284)
	at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302)
	at java.lang.System.getProperty(System.java:705)
	at com.maplesoft.util.RuntimePlatform.(RuntimePlatform.java:136)
	... 27 more

MapleNet error: java.lang.reflect.InvocationTargetException at java.awt.EventQueue.invokeAndWait(EventQueue.java:1076) at java.awt.EventQueue.invokeAndWait(EventQueue.java:1053) at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347) at com.maplesoft.maplenet.worksheet.applets.editor.WmiEditor.init(WmiEditor.java:147) at sun.applet.AppletPanel.run(AppletPanel.java:437) at java.lang.Thread.run(Thread.java:679) Caused by: java.lang.ExceptionInInitializerError at com.maplesoft.mathdoc.util.WmiResourcePackage.setPlatformSuffix(WmiResourcePackage.java:397) at com.maplesoft.mathdoc.util.WmiResourcePackage.(WmiResourcePackage.java:138) at com.maplesoft.mathdoc.controller.WmiClipboardManager.(WmiClipboardManager.java:136) at com.maplesoft.mathdoc.controller.WmiMathMLClipboardManager.(WmiMathMLClipboardManager.java:66) at com.maplesoft.mathdoc.view.WmiMathMLDocumentView.getClipboardManager(WmiMathMLDocumentView.java:110) at com.maplesoft.mathdoc.view.WmiMathDocumentView.(WmiMathDocumentView.java:506) at com.maplesoft.mathdoc.view.WmiInteractiveDocumentView.(WmiInteractiveDocumentView.java:62) at com.maplesoft.mathdoc.view.WmiMathMLDocumentView.(WmiMathMLDocumentView.java:44) at com.maplesoft.mathdoc.view.WmiMathMLDocumentView.(WmiMathMLDocumentView.java:52) at com.maplesoft.mathdoc.view.WmiMathMLEditorDocumentView.(WmiMathMLEditorDocumentView.java:59) at com.maplesoft.maplenet.worksheet.applets.editor.WmiEditor.createGUI(WmiEditor.java:190) at com.maplesoft.maplenet.worksheet.applets.editor.WmiEditor.access$000(WmiEditor.java:49) at com.maplesoft.maplenet.worksheet.applets.editor.WmiEditor$1.run(WmiEditor.java:149) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:216) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673) at java.awt.EventQueue.access$300(EventQueue.java:96) at java.awt.EventQueue$2.run(EventQueue.java:634) at java.awt.EventQueue$2.run(EventQueue.java:632) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105) at java.awt.EventQueue.dispatchEvent(EventQueue.java:643) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177) at java.awt.EventDispatchThread.run(EventDispatchThread.java:138) Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission sun.arch.data.model read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:393) at java.security.AccessController.checkPermission(AccessController.java:558) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at net.sourceforge.jnlp.runtime.JNLPSecurityManager.checkPermission(JNLPSecurityManager.java:284) at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302) at java.lang.System.getProperty(System.java:705) at com.maplesoft.util.RuntimePlatform.(RuntimePlatform.java:136) ... 27 more

Then, if I can close that window/tab, some more messages appear:

Disposal was interrupted:
java.lang.InterruptedException
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at java.awt.EventQueue.invokeAndWait(EventQueue.java:1071)
	at java.awt.Window.doDispose(Window.java:1141)
	at java.awt.Window.dispose(Window.java:1084)
	at sun.applet.PluginAppletViewer.destroyApplet(PluginAppletViewer.java:630)
	at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:533)
	at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:232)
	at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:78)

So, if these examples are designed to work only for some specific software versions, I think that this point should be clarified. Better still, there should be a preliminary check that the required versions are available, rather than loading anyway and causing destabilization.

@Carl Love 

Certainly, tracing subs or map in your examples shows that the second and third arguments of `if` are not fully evaluated if the first one has not been evaluated as a boolean before:

> trace(subs):
> subs(A= true, `if`(A, sin(Pi), C));
execute subs, args = A = true, `if`(A,sin(Pi),C)
                                    sin(Pi)
> subs(A= false, `if`(A, sin(Pi), sin(0)));
execute subs, args = A = false, `if`(A,sin(Pi),sin(0))
                                     sin(0)
> 
> restart:
> trace(map):  	
> f:= x-> `if`(x::symbol, true, x):
> map(f, `if`(A, sin(Pi), C));
execute map, args = f, `if`(A,sin(Pi),C)
                                    sin(Pi)

Compare with:

> restart:
> trace(subs):
> trace(sin):
> subs(A= true, f(A, sin(Pi), C));
execute sin, args = Pi
value remembered (at top level): sin(Pi) -> 0
execute subs, args = A = true, f(A,0,C)
                                 f(true, 0, C)

A case of delayed evaluation is the McCarthy evaluation rules for boolean expressions, as described in ?boolean . May be that there is a relation.

I have tried the four examples linked above. The first, third and fourth not only do not work for me, using Firefox under Linux Mint 13 32-bit with its latest updates, but they turn Firefox highly unresponsive, and the only option out is closing it, which leaves a zombie process. This situation is fully reproducible here. I have to add that this system is very stable and I have never seen any similar problem in over a year that I have been using it.

@mank 

What symbolic links do you have in /lib? I have none there (as opposed to /bin.X86_64_LINUX, say).

For comparison of a pair of functions on the complex plane, plots:-plotcompare is quite handy, e.g.

plots:-plotcompare(ee,S, g=-3-3*I..3+3*I ,grid=[70,70]);

On the other hand, the logarithmic singularity at g=-4 of S and ee is the same:

series(ee,g=-4,4):
map(x->collect(x,ln(g+4),simplify),%);
                                      /       4\
                -ln(g + 4) + ln(2) + O\(g + 4) /

series(S,g=-4,4);
                       -ln(g + 4) + ln(2)

In particular, also their branch cuts:

FunctionAdvisor(branch_cuts,ee);
[  1  /1   /                                     2
[- -- |- I |I Pi ln(2) - I Pi ln(g + 4) - 2 ln(2) 
[  Pi \2   \                                      

                                   /  1  \               /  1  \
   + 2 ln(2) ln(g + 4) - 2 ln(2) ln|- - I| + ln(g + 4) ln|- - I|
                                   \  2  /               \  2  /

                           /  1  \                              \
   - ln(g + 4) ln(2 I) + ln|- - I| ln(4 - g) + ln(4 - g) ln(2 I)|
                           \  2  /                              /

  \        ]
  |, g < -4]
  /        ]
FunctionAdvisor(branch_cuts,S);
                     [   /    1  \        ]
                     [-ln|2 + - g|, g < -4]
                     [   \    2  /        ]

For comparison of a pair of functions on the complex plane, plots:-plotcompare is quite handy, e.g.

plots:-plotcompare(ee,S, g=-3-3*I..3+3*I ,grid=[70,70]);

On the other hand, the logarithmic singularity at g=-4 of S and ee is the same:

series(ee,g=-4,4):
map(x->collect(x,ln(g+4),simplify),%);
                                      /       4\
                -ln(g + 4) + ln(2) + O\(g + 4) /

series(S,g=-4,4);
                       -ln(g + 4) + ln(2)

In particular, also their branch cuts:

FunctionAdvisor(branch_cuts,ee);
[  1  /1   /                                     2
[- -- |- I |I Pi ln(2) - I Pi ln(g + 4) - 2 ln(2) 
[  Pi \2   \                                      

                                   /  1  \               /  1  \
   + 2 ln(2) ln(g + 4) - 2 ln(2) ln|- - I| + ln(g + 4) ln|- - I|
                                   \  2  /               \  2  /

                           /  1  \                              \
   - ln(g + 4) ln(2 I) + ln|- - I| ln(4 - g) + ln(4 - g) ln(2 I)|
                           \  2  /                              /

  \        ]
  |, g < -4]
  /        ]
FunctionAdvisor(branch_cuts,S);
                     [   /    1  \        ]
                     [-ln|2 + - g|, g < -4]
                     [   \    2  /        ]

@jschulzb 

Clearly, there is a difference of conventions by a factor I between both definitions in your worksheet:

> Y(1,1,theta,phi);
                               1/2                 1/2  1/2
               (cos(theta) + 1)    (cos(theta) - 1)    6    exp(phi I)
          -1/4 -------------------------------------------------------
                                          1/2
                                        Pi

> combine(%,radical) assuming real;
                            /(6 cos(theta) + 6) (-cos(theta) + 1)\1/2
          -1/4 I exp(phi I) |------------------------------------|
                            \                 Pi                 /

> simplify(%) assuming real;
                                        1/2
                     -1/4 I exp(phi I) 6    | sin(theta) |
                     -------------------------------------
                                       1/2
                                     Pi

> Ylm(1,1,theta,phi);
                         1/2                           2 1/2
                        6    exp(phi I) (1 - cos(theta) )
                   -1/4 ------------------------------------
                                         1/2
                                       Pi

@Carl Love 

I rather get a recursion error, but no lost kernel connection, in Maple 17.01 on Linux 32-bit, for Digits >=9:

#Wrong answer
> Ans:=evalf(Int(Vsi*(SP2), [theta=0..Pi,phi=0..2*Pi]));
memory used=25.1MB, alloc=56.3MB, time=8.10
memory used=72.3MB, alloc=56.3MB, time=9.05
memory used=117.7MB, alloc=80.3MB, time=9.94
memory used=180.4MB, alloc=108.3MB, time=11.08
Error, (in property/LinearProp/+) too many levels of recursion

So, there may be also a 32 vs 64-bit issue.

One kind of possible benefits derived from such marketing comparisons is that each part tries to emulate more quickly developments made by the other. I have described here a few such developments in Mathematica 9. And for Maple 17 we have e.g. ?updates,Maple17,Explore and ?updates,Maple17,Performance#ElementaryFunctions . The end result is a convergence process at feature level, despite the difference in structure.

Yet, certainly, expertise and time shortages in writing good comparative reviews of CAS are big problems. See e.g. this subthread of 2008 (note that this one was a convoluted thread and it was severely distorted by the transformation from primes 1 to primes 2 in June 2010). I keep my opinion expressed then that such reviews could only be done in a collaborative framework.  

Certainly Edgardo is right about the precedence of Maple wrt Mathematica in regards to plots:-plotcompare and FunctionAdvisor(branch_cuts,...) functionality. But, to be fair, the sentence "Maple's functionality is not equivalent to Mathematica's automatic branch cut detection" is right as they mean something else, namely the usage in Mathematica 3D function plots of an adaptive grid so that the two borders of the branch cut do not get joined, as shown in their previous graphical comparison.

I think that the introduction of an adaptive grid in Maple 3D function plots would be important, not only from the aesthetic point of view, but probably also from the efficiency point of view. Currently FunctionAdvisor(branch_cuts,...) 3D plots use a default of grid = [200, 200] in order to display the cuts sharply, as the help page describes, and later it warns: "The high value used for grid may slowdown the visualization". My guess is that an adaptive grid could help display the cuts sharply and more quickly by increasing the grid density only in the branch cuts close vicinity, accordingly to their geometry. 


 

@ecterrab 

Perhaps. I would need to see it in practice, how "every" output would look like. I wonder how a system-wide postprocessing routine, as you describe for simplify/size, can be added.

@SandorSzabo 

It is a problem of the interface design by mixing typeseting with computation. It brings lots of problems. This is a funny example of typeset text being automatically simplified ?updates,Maple9_5,compatibility > Automatic Simplifications:

Continuing the automatic simplification changes in Maple 9, a simplification has been removed. The simplification 0 does not automatically simplify to 0 if the value of x renders this simplification invalid.

The original text version was:

Continuing the automatic simplification changes in Maple 9, a simplification has been removed. The simplification x-x does not automatically simplify to 0 if the value of x renders this simplification invalid.

@SandorSzabo 

It is a problem of the interface design by mixing typeseting with computation. It brings lots of problems. This is a funny example of typeset text being automatically simplified ?updates,Maple9_5,compatibility > Automatic Simplifications:

Continuing the automatic simplification changes in Maple 9, a simplification has been removed. The simplification 0 does not automatically simplify to 0 if the value of x renders this simplification invalid.

The original text version was:

Continuing the automatic simplification changes in Maple 9, a simplification has been removed. The simplification x-x does not automatically simplify to 0 if the value of x renders this simplification invalid.

It should be remarked that

a[n] is `in` S;

gives the described output only for 2D input, while gives an error as 1D input.

a[n] is `in` S;
Error, missing operator or `;`

So, it may well be a bug in the 2D parser...

Well, assuming that it is a feature, and interpreting spaces as product signs makes any sense, you may use, as a workaround, the inertized form for Vector, like:

print(%Vector([1, 2])*is*`in`*S);
                   %Vector([1, 2]) is `in` S

It should be remarked that

a[n] is `in` S;

gives the described output only for 2D input, while gives an error as 1D input.

a[n] is `in` S;
Error, missing operator or `;`

So, it may well be a bug in the 2D parser...

Well, assuming that it is a feature, and interpreting spaces as product signs makes any sense, you may use, as a workaround, the inertized form for Vector, like:

print(%Vector([1, 2])*is*`in`*S);
                   %Vector([1, 2]) is `in` S
First 43 44 45 46 47 48 49 Last Page 45 of 109