MatrixMails - Get paid Symbolic Mathematics under Linux
Informal Linux Group Namibia
February 07, 2012, 01:45:57 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Symbolic Mathematics under Linux  (Read 4792 times)
riaan
Moderator
Full Member
*****

Karma: 1
Posts: 128



« on: February 01, 2008, 11:17:15 AM »

Hi Linux users!

Maybe some of you have seen some guys using expensive software to perform symbolic algebra, integrations, differentiations, etc. and were jealous. The answer is you can do all that - for FREE!

I'm currently exploring a Computer Algebra System (or CAS, if you will) called Maxima. Maxima is based upon the grand daddy of all the CASes called Macsyma. The two projects separated in 1982 and progressed in slightly different directions. Most telling is the shift to GLP almost a decade ago.

You can find several front ends for Maxima under Linux.
* There's the standard command line front end as well as a generic X-windows front end called xmaxima. Both of these try valiantly to produce math notation with with the ascii charset.
* What is much better is the wxMaxima (needs wxWidgets) front end that tries to reproduce math output with XML. It also have a lot of features that makes the use of Maxima much better.
* If these still offends your sense of aesthetics and you can stand the use of Emacs, you can use that together with a elisp macro called "imaxima" as a front end. The interface is pretty minimalistic like the command line front-end, but it uses TeX to nicely format the output.

"What are its capabilities?", you may ask. Well, to name but a few:
* polynomial and trigonometric simplification, factorisation, solving of roots,
* solving of systems of equations,
* matrix algebra, matrix inversion, determinant calculation, eigenvalues and eigenvectors,
* limits, differentiation and integration,
* solving ODEs
* plotting 2D and 3D graphs and surfaces via Gnuplot.
* and much, much more!

If you are interested, you can grab the relevant ebuilds, tarballs, rpms, debs, etc. and try it for yourself. To those interested in compiling your own programs (Gentoo & Slackware users), be sure to compile your stuff with LISP support otherwise most of the best front-ends won't work. Maxima is written in Common LISP, BTW. You can choose which lisp: clisp, sbcl, cmucl, gcl, ...

(Free) Alternatives to Maxima: Axiom, Yacas (haven't tried these - yet ...)

Regards
Riaan
Logged

Riaan Steenkamp
uwe
Global Moderator
Sr. Member
*****

Karma: 3
Posts: 261


WWW
« Reply #1 on: February 06, 2008, 07:50:06 PM »

Disclaimer: I have never used any of these symbolic mathematics applications. So take my post with a pinch of salt - or rather a truckload of it. ;-)

I have always wondered what these apps are really good for - other than visualisation. I am pretty good at solving mathematical problems which are always symbolic (if not, they are arithmetics). ;-) If I can't solve one, will these apps do the trick? Are they that sophisticated?

I am not trolling but interested In the question and its answer.

Uwe
Logged
riaan
Moderator
Full Member
*****

Karma: 1
Posts: 128



« Reply #2 on: February 14, 2008, 11:52:18 AM »

Hi Uwe

Well, your question is like asking why you need a pocket calculator if you can do basic arithmetic! ;-)

The answer is simple: To save time and avoid mistakes!

To answer your question about how sophisticated they are: Physicists, Engineers and Applied Mathematicians often do not have the time (or inclination) to spend significant time solving complicated standard integrals like $\int e^{-x^2}\,dx$ or $\int \sin ax\,\cos bx\,dx$. Thus they refer to standard tables of integration like Spiegel's "Mathematical Handbook" or the famous Abramovich & Stegun. While books like those can't be beat by OpenSource CASs like Maxima, they can be equalled by the big ones like Mathematica. It is usually much quicker (and more specific) to use a CAS than picking the appropriate (possibly mislaid, if you're anything like me) book from the bookshelf and looking up the appropriate integral up through a multi-step process.

However, CAS systems are usually much more than just that. They are also arbitrary precision 'calculators' and fully fledged high level mathematical programming environments. The advantage of a CAS system to do your scientific and mathematical calculations above numerical methods is that your answers are exact. You need not worry about stuff like machine epsilon, rounding errors, divergent numerical algorithms, etc. For example, you can get a theoretical answer like 2/3 and not 0.3333333475 because of weird quirks of your specific processor, compiler, libraries and/or algorithms.

The fluctuations can in some cases change your results completely. I have ported identical codes between different platforms: Sun SPARC, IBM RS600, x86 and in each and every case you can see differences on say the 7th (or 8th or 22nd or ..) significant figure because of differing function libraries, differing machine epsilon, etc.

Much better to get a symbolic answer and not worry about the poor processor/compiler/algorithm getting confused by numerical fluctuations. (Contemplation about the meaning of these computational fluctuations have given rise to Chaos Theory, BTW.)

However, the BIG disadvantage of CAS systems are the fact that it is very slow compared to the numerical methods and are best avoided if run times are measured in hours/days weeks.

Hope this helps!
Regards
Riaan

P.S. about machine epsilon:

Defined as the smallest positive number e (epsilon) such that 1+e > 1, or in other words, if you ad any number to 1.0 that are smaller than e, the answer will still be 1.0 - according to the computer, that is.

Machine epsilon differs from processor to processor and from compiler to compiler.

See any Numerical Analysis textbook's first chapter (like the famous Johnson and Riess) for more about machine epsilon, rounding errors and other stuff that plague scientific numerical programming.

Riaan
Logged

Riaan Steenkamp
uwe
Global Moderator
Sr. Member
*****

Karma: 3
Posts: 261


WWW
« Reply #3 on: February 16, 2008, 09:36:33 PM »

Hehehe - point taken on saving time, if they are really as good as a human (finding known solutions). They will never find unknown solutions.

<devellish mode>
If any of your software equals 2/3 to 0.3333333475, you have got a real problem - and not just a rounding one. ;-)
</devellish mode>

BTW, kcalc ( part of KDE) uses arbitrary precision. You can configure it to use any precision. That established, i wondered about constants like e or pi. Does it take them from the system C library/headers? No, it does not. They adhere to precision you have chosen. Quite good!

Uwe
Logged
riaan
Moderator
Full Member
*****

Karma: 1
Posts: 128



« Reply #4 on: February 19, 2008, 09:50:21 AM »

'bout the 2/3 business...  Cheesy

Yes, I have made a tewwible, tewwible typo, I meant 1/3 ... Embarrassed

I seem to make these 'boo-boos' a lot... I blame global warming that gave rise to heat fatigue which in turn caused the 'bright sparks' of ESCOM and the ANC to ignore advice from their analysts which in turn upset me so much that I have taken to much beta blockers that turned me into a ham fingered weirdo that hit the [2]-key instead of the [1].  (SIC)

PS. I think I'll make a good economical analyst, don't you?  Grin

Logged

Riaan Steenkamp
Informal Linux Group Namibia
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Unique Hits: 722322
Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Check PageRank