SciPy 2023

SymPy Introductory Tutorial
07-11, 13:30–17:30 (America/Chicago), Classroom 101

SymPy is a Python library for symbolic mathematics. This tutorial will introduce SymPy to a beginner audience. It will cover an introduction to symbolic computing, basic operations, simplification, calculus, matrices, advanced expression manipulation, code generation, and selected advanced topics. The tutorial does not have any prerequisites beyond knowledge of Python and basic freshman level mathematics. It will be presented with Jupyter notebooks with regular exercises for the attendees. After attending this tutorial, attendees will be able to start using SymPy to solve their own problems.


SymPy is a pure Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible. SymPy is written entirely in Python.

SymPy can be used in a wide array of applications. This includes basic usage as an interactive calculator, symbolically modeling problems in physics and engineering, generating fast numeric code, and use in a Python library representing custom symbolic objects. Anyone interested in learning how to get started using SymPy for any such applications should attend this tutorial.

This tutorial is a beginner level tutorial and only requires knowledge of how to use Python. Knowledge of mathematics up to basic calculus is recommended. More advanced mathematical topics will be explained as part of the tutorial. Knowledge of other Python libraries such as NumPy is NOT required. There will be a short section near the end on how to interface SymPy with other libraries such as NumPy, but the majority of the tutorial does not make use of any additional libraries.

This tutorial will cover the basics of how to use SymPy, and will also touch on some advanced topics. We will start by discussing the basics of how to build mathematical expressions with SymPy and manipulate them. We will look at how to avoid some of the more common pitfalls and gotchas when using the SymPy. We will then move onto the most common functions in SymPy such as simplification functions, solvers, functions for doing operations from calculus such as differentiation and integration, and matrices. Finally, as time permits, we will look into more advanced topics, such as code generation, extending SymPy, interfacing with other libraries such as NumPy, and additional SymPy submodules.

After attending this tutorial, attendees will be able to start using SymPy to solve their own problems. They will also be armed with the knowledge of how to discover additional more specific functionality in SymPy that may be required for their particular use-case.

We will expect tutorial attendees to have the tutorial materials installed on their computers prior to the tutorial. This way we will not waste time in the beginning getting things installed. The tutorial will also be available online using either Binder or JupyterLite for those that do not wish to install things locally.


Prerequisites

Attendees should know the basics about calculus and linear algebra, and programming in Python. The code generation section at the end of the tutorial will cover interfacing SymPy with other tools such as NumPy, but knowledge of other libraries will not be needed for the bulk of the tutorial.

Installation Instructions

https://github.com/sympy/scipy-2023-tutorial#installation-instructions

Aaron Meurer is a software engineer at Quansight, where he works on important projects affecting the scientific Python ecosystem including the array API standard, NumPy, and PyTorch. He is also a core maintainer of the SymPy symbolic mathematics library.

This speaker also appears in:

I am Anutosh Bhat, a 4rth year undegraduate student at IIT Madras . I'm persuing an interdisciplinary dual degree (B.Tech + M.Tech) in Biological Engineering and Data Science .I am an Open Source and Software Development enthusiast and have contributed to some influential libraries like SymPy, SageMath, Networkx, Kyverno and a couple others in the past . My main interests revolve around
domains like Symbolic and Numerical computations/algorithms and also some Cloud Native Computing based stuff.

I am a contributor of SymPy, and I have been using SymPy to develop math education solutions in Mathpresso Inc and TigerMilk.Education.