Mathematica – Day 1

I played for a while with the trial version. It is a very mighty program indeed! It is also a huge program. Skipping around in the demos I found a lot of nice stuff, some of which I really liked. Mathematica impressed me with the following numerical integral.

\(\int\limits_0^1 \dfrac{1}{x} \cos \left( \dfrac{\log x}{x} \right) \, dx = 0.323367\)

This is a really tough integral and requires well done adaptive integration backwards from 1 to 0, plus an estimate of the convergence. Since neither Mathematica nor I know a closed form of this integral, it has to use numerical methods. Euler can do that with an adaptive integration from 0.001 to 1 or so.

Mathematica produces the following nice plot of this function. For the plot, it seems to use the quick OpenGL rendering.

The plot of Euler looks like this.

Anyway, it cannot be my aim to compare the two programs, since Mathematica has another target audience. Rather Euler might learn from Mathematica.

Mathematica has its quirks too. You need a day or two to avoid errors like the following.

It took me a while to find out that sin is a variable here, and this is multiplied by x^2 and x for x^3. Likewise

You expect the answer 10. The reason is that „while“ must be written as „While“. Another source of trouble is opening a new notebook and getting

The reason is that x now has a value from the previous notebook. There is only one Mathematica engine in the background, and it is not reset with new notebooks. In contrast to Euler, Mathematica can open multiple notebooks for the same kernel. I think this is confusing.

When I tried to search for „clear value“ in the help window, I got the following error.

After „Continue Waiting“ an error window opened, which I closed. Then I tried again. This time, I used the search button instead of pressing Return. And I found the command easily: Clear[x].

This kind of trouble is not nice, but it happens. With modern software like this, you got to be patient.

It is also strange that Mathematica wants to give me a Macintosh feeling on Windows with its menu bar at the top of my screen. This covers icons I may put on my desktop and is nasty style in Windows. I can size this bar, but it does not remember its position or size.

Stay tuned for more.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.