Problem modules home

General instructions

Elementary self-check!

Reflection and self-assessment

How to submit

Mathematica hints

Writing hints

FAQ



Course PM

FIRE

Online Mathematica


modelling

Mathematica hints

Mathematica is for all students available on your accounts. As a Chalmers student you can also download Mathematica to your own computer on a Chalmers site licence. GU students can receive a copy of Mathematica on their own computer through a special arrangement for this course - ask for details.

In this course, we do not require much more than using standard Mathematica commands, where you can insert your own arguments and execute. 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



Mathematical modelling and problem solving