Archive for the ‘Mobile Mathematics’ Category

June 11th, 2010

Apple’s iPad hasn’t been available for very long but there is already a wealth of mathematical apps available for it and I expect the current crop to only be the tip of the iceberg. So, this is the beginning of a new series of articles on Walking Randomly where I’ll explore the options for doing mathematics on this new platform.

Update: Part 2 is now available

SpaceTime Mathematics

Spacetime
The Rolls Royce of mobile mathematical applications and one that I have been using since my days as a Windows Mobile user.  The iPad version was one of the first apps I bought when I received my device and it is just beautiful!  Symbolic algebra and calculus, 2 and 3D interactive plotting, scripting, fractals linear algebra…the list of functions just goes on and on.  I would have loved to have access to this app when I was in high school or early university.

If you want to get an idea of the quality of SpaceTime’s graphical capabilities then check out the free demo, Graphbook, but be aware that there is a lot more to SpaceTime than just graphics.

Regular readers of Walking Randomly will know that I am a big fan of Wolfram’s Demonstration project which is made possible by Mathematica’s Manipulate function.  Well, SpaceTime has a similar, albeit simplified, version of Manipulate – a function called Scroll.  Interactive Fourier Series on the iPad anyone?

Something else that I like about SpaceTime is the fact that it is cross-platform with versions for Linux and Windows available in addition to iPhone, iPad and Windows Mobile.  So, students could use it in a classroom setting on PCs and use what they have learned on their own iPad/iPhone version.

If you only buy one mathematical application for iPad then this should be it.  It’s relatively expensive for an iPad app at £11.99 (at the time of writing) but is worth every penny and I bought it without hesitation – so should you!

PocketCAS Pro

PocketCAS pro
PocketCAS Pro is a computer algebra system that started out life as a Windows Mobile app and is now available for iPhone and iPad.  I haven’t had chance to try it out yet so I can’t comment on its quality but it has a lot of features including symbolic algebra and calculus, 2D plotting, numerical solution of equations and more.

At the time of writing, it is the same price as SpaceTime mathematics – £11.99 – and yet my first impression is that it has less functionality.   No 3d plotting for example.  I’ll know more when I buy a copy next month.

There is a free lite version available which includes some of the functionality of the main product to allow you to try it out.

fxIntegrator

fxIntegrator
My favourite operating system is Linux where there is a philosophy of “Write programs that do one thing and do it well”.  fxIntegrator does one thing -the numerical solution of 1d integrals – but does it do it well?

Well, it’s not bad.  You enter the function you want to integrate using the nice, specially designed keyboard, then you enter the limits and press the = button to get the result.  Couldn’t get any easier and I like it.  The equation editor is very nice resulting in well formatted integrands but I did manage to confuse it once or twice.  FxIntegrator is also very cheap at only 59p – a real bargain!

I tried a few straightforward integrals on it and it gave the correct answer in all cases.  Then I got nasty and tried the following which has an algebraic-logarithmic singularity at the origin (original source for this integral).

\int_0^1 x^{-1/2} \ln(x) dx = -4

I wasn’t expecting fxIntegrator to cope and it didn’t. Rather than giving the answer I just got an unhappy face indicating that it couldn’t compute the solution.  This isn’t a criticism though! I like the fact that rather than giving numerical garbage, fxIntegator simply said ‘I can’t do that’.

There are some niggles, however.  First of all, the list of elementary functions available is rather limited as it only includes square roots, powers,the trigonometric functions sin,cos and tan, the natural logarithm function ln and basic arithmetic.  Even when I was in high school I would have wanted more such as inverse trig functions. (update: There are now a lot more functions including inverse trig)

Another problem with it is that although you can use the customised keyboard to enter the integrand, when you try to enter limits the standard iPad keyboard pops up.

These niggles aside, however, this is a nice little app for 59p and I hope the author continues to develop it.  If he does then here are some suggestions for functionality I’d like to see.

  • Add a few more functions.  Inverse trig for a start.  If possible then maybe things such as Bessel functions. (update: Inverse trig has now been added)
  • Help turn this into a better teaching and learning tool by implementing a range of numerical methods for computing the integrand and allow the user to choose between them.  Methods such as the rectangle rule, trapezoidal rule and simpson’s rule along with the ability to change the sub-divison size.  The more methods the better :) (update: There are now three integration methods)
  • Perhaps add some tutorial notes on each numerical method.
  • Give the calculation time for the result in seconds along with the number of evaluations of the integrand.  This will help students compare the trade off in speed/accuracy of each method. (update: This has now been done and looks great)
  • Add the ability to plot the integrand along with the limits.  Allow the user to change limits by moving them on the graph as well as by direct input.  Once the calculation is performed, show the points on the curve where the algorithm sampled the function.

This good little app could be turned into a great little app.

Update (December 2010)

fxIntegrator has been updated several times since this article was written and it has improved even further.  There are now three integration methods (Simpson, Trapeze and Rectangle) and several new functions have been implemented including inverse trig.  Without doubt, this is now a great little app.

Update (February 2011)
More info on fxIntegrator. Of the version I originally reviewed I said “although you can use the customised keyboard to enter the integrand, when you try to enter limits the standard iPad keyboard pops up”. This is no longer the case in the current release. In fact, when entering the limits, not only you don’t see the standard iPad keyboard anymore, but you can freely write full-blown formulas (which can be just as complex as the integrands) to be used as integration limits. Further more, infinite limits are now possible too!


More articles from Walking Randomly on mobile Mathematics

October 17th, 2009

There’s a new CAS in town and this one runs on the iPhone! PocketCAS is the brainchild of Daniel Alm and is based on the powerful open source computer algebra system, XCas.  Functionality includes symbolic calculus, linear algebra, the numerical solution of equations and more – click here to see a more detailed list.

It currently lacks any support for graphics but Daniel tells me that he has plans for the inclusion of both 2 and 3D plotting in the future.  At the time of writing it is selling for just $4.99 which seems a bit of a bargain to me and so much more useful than the 1001 tip calculators that you can find for the iPhone.

PocketCAS for the iPhone

I haven’t been able to try it out myself since I don’t have either an iPhone or an iPod touch and, unfortunately for me, Daniel has no plans for an Android version.  However, if these screen shots are anything to go by, it is well worth your time and I would be interested to hear the opinion of anyone who has bought it.

PocketCAS for the iPhone

August 19th, 2009

There are a lot of symbols in mathematics and I mean a LOT!  Not content with the entire Greek alphabet, mathematicians have gone on to use symbols from other alphabets such as Hebrew.  Once they had run out of alphabets they went on to invent hundreds of symbols themselves – a symbol for every occasion.

So, you are writing a paper in an esoteric (or maybe not so esoteric) area of mathematics and, naturally, you are writing it in Latex.   Suddenly you think to yourself ‘What’s the LaTeX command for <insert weird and wonderful glyph here>’

Searching in vain through list after list of LaTeX symbols you get to thinking ‘If only I could just draw the symbol and have the computer tell me what the LaTeX command is‘.

Well now you can!

Detexify

Detexify is a new project from Philipp Kühl (who had the initial idea) and Daniel Kirsch (who implemented it) and is essentially an exercise in machine learning.  Sometimes it works perfectly (such as in the screenshot above) but other times it struggles a bit and you end up learning the commands for symbols you never even knew existed.

Teach the system

When it is struggling though, you can help it along.  Eventually you will find the symbol you were looking for and you can click on it to tell the system ‘That squiggle I drew – this is what I meant’ thus helping to train it for future searchers.

Other times though, you cannot blame it for not finding the symbol you meant.  For example I needed about 5 tries before I could get it to recognise my ham-fisted attempt at the lowercase zeta symbol.  This says a lot more about my poor handwriting and mouse skills than it does about the quality of Texify though.

Are you rubbish with the mouse?  Use your finger on your mobile phone then!

I found drawing even simple glyphs rather difficult with the mouse and soon found myself wishing that I could do it with my finger or a stylus so I was overjoyed to learn that Robin Baumgarten has released a version of Texify for Android mobile phones.  The Android app works exactly like the web version and connects to the server in order to do the actual recognition.

Iphone users haven’t been left out though since Daniel has released an app for that himself.

This is a great project that Daniel is now developing for his diploma thesis and you and you can read more about its progress over at his blog.

January 2nd, 2008

Around 3 years ago Russell Herman asked the question “Can Mathematics be done on pocket PCs?” and he came up with some very interesting results that included graphing packages, computer algebra systems and even an implementation of Latex! Well 3 years is a long time in the world of software so I thought I would ask the question again and post the results on here.

Surprisingly, little has changed in some areas and many of the entries in Russel’s 3 year old article are still bang up to date! For example, the only way to get Maxima on a pocket PC is still by using Rainer Keuchel’s port of Maxima 5.5 from 2001. Rainer’s port of Pari-GP is also the only version that runs on windows mobile at the present time which is a shame because the platform is much more capable than it was then.

There are also some changes for the worst – for example it seems that it is no longer possible to get the programmable calculator, rdcalc, as the developers website has disappeared. If anyone discovers a (legal) way of obtaining this software then please let me know.

It’s not all bad though – there have been some superb additions to the mathematical software library on the pocket PC. One of the most obvious ones is the superb package – SpaceTime – which really demonstrates what is possible on this platform. Then there is André Stemper’s port of version 4.2 of Gnuplot which is a great improvement on the old 3.7 version offered by the prolific Rainer Keuchel. Other new packages include YacasCE, pocket LME, Eigenmath PPC and Planmaker 2006.

My intention is to keep this page up to date so if you know of any other good pieces of mathematical pocket pc software then please let me know and I will include them here.

The entries that I have personally tested will have something like “works on WM6” or “Does not work on WM6” as part of the description. If this is missing then it simply means I have not yet got round to testing it yet.

Calculators

Amazingly powerful Computer algebra systems and beautiful plotting packages are all well and good but sometimes what you need is a good, old fashioned calculator. There are literally hundreds available for the pocket PC and sorting the wheat from the chaff can be a painful (and potentially expensive) experience. Personally, I use Calc98 and have never looked back.

  • Calc98 (free/commercial) An easy to use but powerful scientific calculator that has all of the functions you would expect and several that you would not. It works just like most standard scientific calculators by default (eg type in 1.2 and then press Sin to get the sine of 1.2) but will also work in Reverse Polish Notation (RPN) if that’s what you prefer. Some of its features include functions from science/engineering, complex numbers, matrices, vectors, statistics and finance. There is a free version available for download as well as a paid-for upgrade. Works on WM 6 devices.

Graphical and Programmable Calculators

The packages in this section allow you to generate plots and create simple programs.

  • AllWave MathCal Pocket PC Edition (commercial)
  • Easy Calc – (free) This was my calculator of choice back when I was using a palm PDA rather than a pocket PC. Lots of functions, easy to use and free – you don’t get much better than that. It also works on the Pocket PC via the Palm emulation software – Style Tap.
  • Gnuplot 4.2 – (free) The popular open-source plotting package, gnuplot, ported to the pocket PC by André Stemper. Works on Windows Mobile 6 – I have also written a review of this application.
  • Gnuplot 3.7 – (free) An older port of gnuplot to the pocket PC – this time by Rainer Keuchel. I have not yet checked that this works on Windows Mobile 6 devices but it worked just fine on Windows Mobile 2003 SE.
  • MathTablet – (commercial)
  • Pocket Atlantis – (commercial)
  • RealCalculator – (commercial) A very nice looking shareware calculator that can handle complex numbers, matrices and 2 and 3D plotting among other things. Thanks to Petr for alerting me to this one.

Computer Algebra Systems

In an ideal world it would be possible to have something like Mathematica or Matlab on a pocket PC. Unfortunately the world is far from ideal but there are still quite a few very nice packages out there that can do symbolic and matrix based calculations.

  • Eigenmath PPC – (free) This is a port of the open-source computer algebra system, eigenmath, to the pocket PC.
  • Formula 1 – (commercial) This commerical CAS requires the Jeode JVM and only works on specific machines. I have not used it myself and so have no idea if it works on WM 6 devices.
  • LME for pocket PC – (free) This technology preview is a Matlab-like programming language aimed at numerical computing. Works on WM6.
  • Maxima 5.5 for Win CE – (free) – I have not yet tried this myself because the installation is complicated enough to need instructions and I am feeling lazy. I will do soon though – Promise!
  • Pari-GP for Pocket PC (link dead as of March 2008) – (free) Pari-GP is a well known open source computer algebra system that has many features which are useful to number theorists. This pocket PC port is out of date (2002) but is still useful. It requires pocket console to be installed and works fine on Windows Mobile 6 devices.
  • qdCas -(free) qdCas (quick n dirty Computer Algebra System) is a freeware port of GIAC/XCAS developed by Bernard Parisse.
  • SpaceTime Mathematics – (commercial) This package is truly amazing and includes advanced plotting features, symbolic calculus and scripting. Possibly the closest thing to Mathematica in the Windows Mobile world. Works on WM 6.
  • YacasCE – (free) a port of the open source CAS, Yacas (Yet Another Computer Algebra System) in german. Works on Windows Mobile 6.

Calculator Emulators

Some people use a particular calculator for so long that they get very attached to it – I have known people who have used the same device for over 20 years because they know it inside out and it ‘just works’. Inevitably though even the best made calculator will die eventually and when it does you either have to move on and find a new calculator, try and find a working 2nd hand model or bring your old favourite back to life via the wonders of emulation.

  • Emu48 CE/PPC – (free) Emulator for the HP48GX calculator.
  • Free42 – (free) Simulator for the HP42-S calculator. Works fine on WM6 devices
  • Pocket 16C – (commercial) Emulator for the HP-16C calculator
  • VTI Pocket Emulator – (free) Emulator for various Texas Instruments calculators(eg TI-89,TI-86,TI-85 etc). This requires the original ROM files from a TI calculator.

An excellent article concerning the details of emulating Texas Instruments calculators on the pocket PC can be found over at the XDA developer Wiki.

Spreadsheets

Pocket Excel comes as standard on my Windows Mobile device but it might not be enough for some people. The following alternatives have had good reviews but I have not yet tried them myself.

Programming Languages

I did consider creating a separate post for languages but in the end I thought I would just include them here for the sake of completeness.

  • J (free) – A successor to APL that is very well suited to mathematics. Works on WM 6. Thanks to ‘fairplay’ for pointing this application out to me
  • OpenLisp (free) – Works on WM6 – Thanks to Arseny for this one.
  • Python 2.5 (free) Works on WM6.
  • Pocket Scheme (free) Works on WM6.

Fractals

…because they are pretty!

Misc

  • Latex for pocket pc (free) – Yet another port by Rainer Keuchel. I got this working on my old 2003 SE device but have not yet found the time to try it on WM6. I thought I had seen another,more recent, PPC Latex port somewhere on the net but cannot relocate it.

If you know of any packages that you think should be included in this list then please leave a comment and let me know.

Update – 25th March 2008 – added OpenLisp

December 17th, 2007

A few years ago Rainer Keuchel ported version 3.7 of the popular open source plotting tool, Gnuplot, to devices running WinCE. I discovered it back when I was running Windows Mobile 2003SE on my Dell Axim X50v and it worked very nicely. Recently I thought I would test it on my new Windows Mobile 6 device but before I got around to doing this I discovered that André Stemper had recently ported version 4.2 to Windows Mobile.

Gnuplot has come a long way since version 3.7 and so I was quite excited about this new port. Although there is no .cab file, the installation procedure is straightforward, simply download the zip file and extract it to the desired location on your device. To run it you just find the .exe file in the file explorer and double click on it. If you want Gnuplot to appear in start->Programs then you will need to manually create a shortcut which I have been told is not difficult but I have so far not done it myself. I like the fact that you can install directly on your device without the need for Activesync and a PC but a .cab file that takes care of the shortcut for you would have been even better.

Gnuplot is a console-based application but you will not need to install a 3rd party console application such as pocket console in order to use it since this port includes it’s own console built in. When you run the program you will see a screen similar to the one below.

Anyone who has used gnuplot before will instantly feel at home as it works just like the desktop version. For example typing

plot tan(x)

results in the following graph – pretty much identical to the desktop version.

The above plot looks odd, not because there is anything wrong with this port, but because gnuplot does not plot the tan function very well by default – those pesky singularities you see. Manually setting the x and y axes results in something much better.

set xrange [-5:5]
set yrange [-10:10]
plot tan(x)

Obviously things are a little more cramped on a 240×320 QVGA device as compared to your desktop but it is perfectly use-able. This port also supports full VGA devices (in fact it was developed on one) so if you are lucky enough to have one of these you will get even more mileage from the application. One way of getting a little more screen real estate is to set gnuplot to ‘fit window’ mode which gets rid of the second window title bar – you can also set it to full screen mode while removes all surrounding title bars.

Long time users of Gnuplot will know that you can write scripts in order to generate more complicated graphs and this functionality is also supported in the pocket version. In many cases you can just transfer a script written on your desktop machine to your PDA, open it in pocket Gnuplot and it will just work. As you might expect there are one or two things are not supported in the pocket version though. For example, in the full version of Gnuplot you can set the terminal to output .png files using the command

set terminal png

but this is not supported in the pocket version since the number of available terminals is limited. One minor gripe that I have is that I cannot seem to find a way to output a graph to an image file that is natively supported by Windows Mobile so I cannot produce a plot in gnuplot and then open it in the standard image viewer. Of course one way around this is to use some sort of screenshot-taking program as I did for all of the images in this post.

If you would like to write Gnuplot scripts directly on your hand held rather than transferring them from a desktop machine then I highly recommend using the freeware pocket notepad application. The built in text editor of Total Commander will also do the job nicely but please do not use a word processing package such as Pocket Word as the resulting file will contain all manner of formatting rubbish that will confuse Gnuplot and result in a stream of errors.

On the desktop version of Gnuplot you can click on a 3D plot with your mouse and rotate it in real time which can be very useful for looking at various features of your function or data. This is supported in this port but it does not work as well since it takes a while to replot the graph at each angle. This means that you can still view the plot from any angle you choose using the stylus but you cannot move it around in real time which is a shame as it would have looked very cool as well as being rather useful. I guess this is due to the reduced processing power available on pocket devices.

Another minor problem with this port is that the help files are not included which can be annoying when you are on the train and cannot remember the exact syntax for some rarely used feature. These really are just minor issues though – almost everything from the Desktop version is here – take a look at these full screen 3d plots taken straight from my Tytn II in landscape mode for example.

I could go on to discuss many more features such as the ability to evaluate and plot special functions (eg. Bessel functions, the Gamma function or the lambertw function), contour plots, histograms, scatter plots etc etc but then this would end up being a review of Gnuplot itself rather than a review of this port. Gnuplot is a very powerful and feature-rich piece of software and this pocket version brings almost all of that functionality to Windows Mobile powered PDAs and I highly recommend it.

If you have never used Gnuplot before and would like an idea of what it can do then I suggest taking a look at the Gnuplot homepage or the very informative Gnuplot-tips page.