Introduction to Mathematica, 5 credits

Introduktion till Mathematica 


Language of instruction: English
Course period: Fall Semester 2023, Period 1
Course structure: Physical presence is to prefer for interactivity, but digital participation is possible upon request.


Students should be familiar with linear algebra, calculus and basic programming. No previous knowledge of Mathematica is assumed.


By the end of the course, students will be able to:

1. Account for the basic structure of computer algebra systems
2. Implement various algorithms in the Mathematica language
3. Compare and contrast different programming styles
4. Use efficiently functional and rule-based programming
5. Understand how the Mathematica kernel evaluates expressions
6. Test and optimize Mathematica code
7. Design and set up their own Mathematica packages
8. Apply Mathematica to solve problems in mathematics, physics, chemistry and biology.     


According to the learning outcomes for a doctoral degree, a doctoral candidate should ”demonstrate broad knowledge and systematic understanding of the research field”. Computer algebra systems and symbolic computation are a field that lies at the intersection of Mathematics and Computer Science. As such, the course allows students in certain fields (Mathematics, Information Technology and Physics) to gain deeper knowledge of an important (and growing) part of their field.

Additionally, a doctoral student should, ”demonstrate familiarity with research methodology in general and the methods of the specific field of research in particular”, as well as ”demonstrate the ability to [...] plan and use appropriate methods to undertake research”. Scientific programming in general and symbolic calculation with Mathematica in particular are powerful and versatile methods for undertaking research in many fields in TekNat. These include, aside from Mathematics, Physics and Information Technology, also Chemistry, Biology, Engineering. In this respect, the guest lectures on modeling in Biology are particularly relevant. Additionally, the final-project part of the course is designed to directly help students apply what they have learned to their research.     


  1. An introduction to computer algebra systems and symbolic programming
  2. The basics of Mathematica as a programming language (symbolic expressions, vectors and matrices)
  3. Linear algebra and calculus with Mathematica
  4. Procedural programming with Mathematica (loops, conditional expressions, scoping constructs)
  5. Functional programming with Mathematica
  6. Substitution rules and pattern matching. Rule-based programming
  7. Kernel evaluation.
  8. Elements of optimization, parallel programming
  9. Writing your own Mathematica package
  10. Applications relevant to research in Mathematics, Physics, Chemistry and Biology (total of 6 lectures)

Applications discussed during the course will depend on the participants' interests. As an example, the 2022 iteration of the course (which is being given at the moment of this writing) includes the following:

  • Polynomial reduction and Gröbner basis. Of interest for everybody.
  • Studying molecular conformations with Mathematica, including graphical methods. Of interest for Chemists.
  • Optimization methods and linear programming. Of interest for Chemists/Physicists/Engineers.
  • Two lectures on evolutionary models with Mathematica, including analytic tools for solving differential equations (Guest lecture from Prof. Sylvain Glemin, Department of Ecology and Genetics).

These topics are sufficiently broad that participants from different departments can all benefit from the lectures. Additional topics can be included according to students’ interests, such as data analysis with Mathematica, machine learning, interfacing Mathematica with C++, and open-source alternatives to Mathematica. Moreover, additional applications will be covered in the three exercise sessions.


  • P. Wellin, ”Programming with Mathematica: An Introduction”, Cambridge University Press, 2013
  • Andrey Grozin, ”Introduction to Mathematica for Physicists”, Springer, 2014;

Useful reference:

  • Wagner, ”Power Programming with Mathematica: the Kernel, McGrawHill, 1996

The main study material will consist of lecture notes that will be handed out during the course (the above textbooks are meant mainly as references).

The course exists also as a master course with code 1FA164; this application asks for funds to support participation of doctoral students and, in particular, to deliver lectures focusing on applications of Mathematica outside of Physics, which are necessary for targeting doctoral students across the Faculty (including guest lectures).


– 13 lectures (26 h total)
– 3 problem-solving sessions in which students work in groups
– 2 additional overview sessions held at the beginning of the course to support students who need some extra help with the material (e.g. students who never used Mathematica before).

The lectures are conducted using presentations written as Mathematica notebooks in which new material discussed by the lecturer is combined with short exercises designed for hands-on learning.

The group-work component consists of students working in teams for the problem-solving sessions. In this way, my course provides an opportunity to also develop teamwork skills. The groups are constructed to include members from different departments and at different career stages (i.e. doctoral and master students are in the same group).

50% of the student final grade comes from an individual final project. This gives students an opportunity to apply the course content to their own research and to receive individual feedback.

The structure of the course is meant to be flexible and adaptable to students coming from different departments and having different levels of proficiency in Mathematica. Extra tutorials are geared at assisting students who have never used Mathematica before. Some advanced topics, for example interfacing Mathematica and C/C++ are meant for more advanced users. The choice of topics for the lectures focusing on applications will be done according to student interests.     .


Group work (50%) individual project (50%).


Marco Chiodaroli,


Physics and Astronomy


Marco Chiodaroli,


Submit the application for admission to:
Submit the application not later than: August 15, 2023

Last modified: 2022-11-21