modelling

Mathematical modelling and problem solving

Mathematica hints

An online version of Mathematica is available here. The online version is sufficient for this course. If you have the desktop version of Mathematica installed on your machine as well, you may use that version if you prefer. (Chalmers students can download Mathematica to your own computer on a Chalmers site licence. Please contact IT support for more information.)

In this course, we do not require much more than using standard Mathematica commands. However, it is an extensive system and it is a bad idea to guess how to do things with Mathematica, you may get into unnecessary trouble. For example, just testing commands without knowing anything about how the system works is probably not the fastest way to get forward.

The documentation in the Mathematica help system is comprehensive

This includes both the the help system available within the program itself, and the Mathemtica web site. There is more than you expect, and if you look carefully you can usually find an example of a command very similar to what you need. You should try to get acquainted with the basics before you do any real work. While you read, try the commands in Mathematica along the way.

The kernel and entering definitions

When you write a command in a Mathematica window (Mathematica notebook) and press Enter, the command is sent to the Mathematica kernel. If it is some sort of definition or assignment, this is remembered by the kernel and will subsequently be used whenever that symbol or function is encountered.

A definition is not active just because it is in the notebook, it has to be actively executed to get into the kernel. Note that while you can have several Mathematica windows open at the same time, they normally send commands to the same kernel, so definitions entered in one window are automatically valid also in another.

Symbol definitions can be checked by evaluating them or with the command. You can erase a definition for a symbol x by writing Remove[x]. A function definition f can be checked by evaluating ?f and is erased by Remove[f] . You can remove all definitions you introduced in the kernel with Remove["Global`*"] or by restarting it.

Common causes of trouble