Home | Rooster | Dictaat | Errata | Slides & Lecture Videos | Formuleblad | Extra Wiskunde | Mathematica | Grind | Movies | Links | Docent |

The goal of this practical is to gain some experience with computer programs that can work with symbolic mathematical expressions.
While the analysis of differential equations remains to a large extent hand-work, we often use computer programs to assist us.
Programs like Grind or Berkeley Madonna can solve differential
equations *numerically*, and Grind can also draw null-clines and vectorfields.
Programs like Mathematica on the other hand have much broader application.
They can be used to analyse (parts of) differential equations symbolically (i.e. with parameters), and you can use them to solve
all kinds of mathematical and technical tasks. In this practical we will give an introduction to working with Mathematica, as it is a
very powerful and widely used package.

This Mathematica notebook contains a walk-through tutorial and a number of exercises. Download the file and open it in Mathematica. In the computer-rooms, Mathematica can be found under the Physics applications. You can work in the notebook itself (don't forget to save every now and then). When you're done, show the results to your assistent. Don't be afraid to ask questions, and remember that Mathematica als has a useful Help-function (which is also available online).

Download the exercises here (use "Save links as" and open in Mathematica)

At the end of the notebook, there are some optional exercises for interested students. Here is some more optional material you can take a look at:

- An example of how the data was fitted in the new question 2.7 on tumor growth (Theoretical Biology).
- An example of how you can use the
`Manipulate[]`

command to interactively plot parametric functions over a certain range (thanks to Merlijn Staps for providing this). - A Mathematica-application that allows you to play with predator-prey models and their parameters.
- A Mathematica-application that simulates spatial patterns in competing colonies of bacteria

For reference, you can also download the tutorial and excercises as a PDF-file or a plain-text file.

We are aware that Mathematica is a very expensive package (although much cheaper for students, and freely usable by UU-students/personnel), so most of you won't use it outside of your study or job. For the excercises, you will mostly use Mathematica on the University computers. However, if later you want to use some of the things you learn today outside of the University, there are several freely available alternatives to Mathematica:

- Wolfram Alpha is a kind of scientific search-engine, from the same makers as Mathematica. It can be freely used online, or for a small fee you can install the mobile app. Wolfram Alpha gives information on a wide range of subjects, and it also accepts Mathematica expressions. Therefore you can use it for things like solving (systems of) equations, plotting graphs, calculating eigenvalues, etc.
- Mathics is an open-source Mathematica clone. It does not yet have the full functionality of Mathematica, but it's free and you can also use it on-line without installing.
- Sage is also an open-source program, very similar to Mathematica although it uses a different syntax. It runs on Linux, but you can also use it online.
- Maxima and Maple are two other well-known computer algebra systems. Maxima is free, while Maple is a commercial package.

If you want to make part of the excercises at home, there are two options.
One is to install Mathematica at home, which you can legally do if you're a
biology student at the UU, via
the ICT Beta site. The
other option is to use free alternatives to Mathematica, such as the online version of Mathics.
You will have to copy-paste the Mathematica-commands from the plain-text version of the notebook
into Mathics. The current version of Mathics **cannot** do the following commands: `Maximize[]`

, `Minimize[]`

,
`FullSimplify[]`

, `Collect[]`

and `Dsolve[]`

. Some commands such as `Simplify[]`

may have
limited functionality in Mathics. For `Maximize[]`

, `Minimize[]`

, `Simplify[]`

,
`FullSimplify[]`

and `Collect[]`

you can use Wolfram Alpha.
Applying `Dsolve[]`

to
exponential growth and the
bloodcell production model will also work in Wolfram Alpha, but not with initial conditions, and you cannot really use the result for subsequent operations.
For more complex operations with differential equations you will therefore really need to use Mathematica.

Home | Rooster | Dictaat | Errata | Slides & Lecture Videos | Formuleblad | Extra Wiskunde | Mathematica | Grind | Movies | Links | Docent |

Theoretical Biology & Bioinformatics / Last modified on 18 Feb 2014 / Levien van Zon (L.vanZon@uu.nl)