Introduction to Mathematica, 5 credits

Introduktion till Mathematica

Course information

Language of instruction: English
Course period: Period 1, fall semester 2025
Course structure: Campus teaching in normal cases. The option to participate via Zoom will be offered to doctoral students based in Gotland.

Recommended prerequisites

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

Learning outcomes

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.

Learning outcomes for doctoral degree

According to the learning outcomes for a doctoral degree as set forth by the Higher Education Ordinance (1993:100, annex 2), 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.

A doctoral student should further, ”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”. Computer algebra systems 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, Materials Science. 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.

Finally, the document “Uppsala University: Mission, Goals and Strategies” (UFV 2018:641) identifies the goal of “ensuring [...] that all doctoral students have access to a stimulating doctoral education environment.” I am confident that the course activities, including in particular the group-work sessions in which students from different departments and with different expertises work together, will facilitate fruitful exchanges and contribute to the creation of a stimulating and enjoyable learning environment.

Course contents

1. An introduction to computer algebra systems and symbolic programming;
2. The basics of programming with Mathematica (symbolic expressions, vectors and matrices);
3. Linear algebra and calculus with Mathematica;
4. Procedural programming with Mathematica (loops, conditional expressions);
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 5 lectures);

Applications discussed during the course will depend on the participants' interests. As an example, the 2023 iteration of the course included the following:

  • Polynomial reduction and Gröbner basis. Of interest for everybody.
    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 machine learning and open-source alternatives to Mathematica. Moreover, additional applications will be covered in the three assignments.

Textbooks:

  • 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 doctoral students across the Faculty (including guest lectures).

Instruction

– 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)
–2-3 open-coding sessions in which students get help on assignment (these were included in the last iteration of the course based on feedback from student evaluations).

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.

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. Individual feedback and help is also obtained in the open-coding sessions.

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 are meant for more advanced users. The choice of topics for the lectures focusing on applications will be done according to student interests. Finally, in the group-work assignments, students can choose the problems they will work on based on their interests and inclinations.

Assessment

Hand-in assignments with group work (50%) individual project including oral final presentation (50%).

Course examiner

Marco Chiodaroli, marco.chiodaroli@physics.uu.se

Department with main responsibility

Department of Physics and Astronomy

Contact person/s

Marco Chiodaroli, marco.chiodaroli@physics.uu.se

Application

Submit the application for admission to: marco.chiodaroli@physics.uu.se
Submit the application not later than: August 2025

FOLLOW UPPSALA UNIVERSITY ON

facebook
instagram
twitter
youtube
linkedin