# Introduction to Mathematica, 5 credits

*Introduktion till Mathematica*

## COURSE INFORMATION

**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.

## 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, 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.

## COURSE CONTENTS

- An introduction to computer algebra systems and symbolic programming
- The basics of
*Mathematica*as a programming language (symbolic expressions, vectors and matrices) - Linear algebra and calculus with
*Mathematica* - Procedural programming with
*Mathematica*(loops, conditional expressions, scoping constructs) - Functional programming with
*Mathematica* - Substitution rules and pattern matching. Rule-based programming
- Kernel evaluation.
- Elements of optimization, parallel programming
- Writing your own
*Mathematica*package - 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.

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

## INSTRUCTION

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).

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. .

## ASSESSMENT

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

## COURSE EXAMINER

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

## DEPARTMENT WITH MAIN RESPONSIBILITY

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 15, 2023