Symbolic computation with Python, SymPy

Sumith (~Sumith1896)




In this tutorial we will introduce attendees to SymPy, a computer aided algebra system (CAS) written in Python. We will show basics of constructing and manipulating mathematical expressions in SymPy, the most common issues and differences from other computer algebra systems, and how to deal with them. In the last part of this tutorial, we will show how to solve practical problems with SymPy. This will include showing how to interface SymPy with popular numeric libraries like NumPy.

Attendees will take home an introductory level understanding of SymPy. This knowledge should be enough for attendees to start using SymPy for solving mathematical problems and hacking SymPy's internals (though hacking core modules may require additional expertise).

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 and does not require any external libraries. The tutorial will cover the following topics and more.

    What is Symbolic Computation?
    A More Interesting Example
    The Power of Symbolic Computation
    Why SymPy?
    Equals signs
    Two Final Notes: ^ and /
Basic Operations
    Converting Strings to SymPy Expressions
    Setting up Pretty Printing
    Printing Functions
    Polynomial/Rational Function Simplification
    Trigonometric Simplification
    Exponentials and logarithms
    Special Functions
    Series Expansion
    Finite differences
    A Note about Equations
    Solving Equations Algebraically
    Solving Differential Equations
    Basic Operations
    Basic Methods
    Matrix Constructors
    Advanced Methods
Advanced Expression Manipulation
    Understanding Expression Trees
    Recursing through an Expression Tree


The tutorial will only assume a basic knowledge of Python. No prior knowledge of SymPy or other Python libraries is required, although it is suggested that attendees be familiar with the IPython notebook. A mathematical knowledge of calculus is recommended.

We recommend that the attendees install the Anaconda Python distribution which includes SymPy, NumPy, and IPython. Once Anaconda is installed simply type the following in a terminal to install the necessary packages:[HTML_REMOVED] $ conda install numpy ipython-notebook sympy

Other alternative installation instructions can be found here:

Content URLs:

SymPy team has developed and delivered many talks and tutorials at SciPy and other conferences. [HTML_REMOVED] We are constantly building on new content and improving the present at the same time. [HTML_REMOVED] The website for the workshop at PyCon India 2015 is here. [HTML_REMOVED] You can find the introduction slides here, the sphinx tutorial here and the exercises in form of IPython notebooks here. [HTML_REMOVED] Note: that the notebooks are hosted statically, you can download from here and run locally to have an interactive session.

Speaker Info:

SymPy India developers will be conducting the workshop: [HTML_REMOVED] Harsh Gupta, a student of IIT-Kharagpur, wrote the new symbolic solvers module for SymPy. He is mentoring a GSoC student and also is a previous GSoC-cer at SymPy. [HTML_REMOVED] Sudhanshu Mishra, a student of BITS Goa, core developer at SymPy[HTML_REMOVED] Sumith, a student of IIT-Bombay, currently implementing Polynomial module as his GSoC project for SymEngine. [HTML_REMOVED] Sartaj Singh, a student of IIT-BHU Varanasi, GSoC-cer at SymPy [HTML_REMOVED] Amit Kumar, a student of DTU, GSoC-cer at SymPy [HTML_REMOVED] Shivam Vats, a student of IIT-Kharagpur, GSoC-cer at SymPy/SymEngine [HTML_REMOVED] Abinash Meher, a student of IIT-Kharagpur, GSoC-cer at SymEngine [HTML_REMOVED] Sahil Shekhawat, a student at IIIT Delhi, GSoC-cer at PyDy/SymPy [HTML_REMOVED]

Speaker Links:

Workshop resource website: [HTML_REMOVED] Resource repository: [HTML_REMOVED] SymPy website: [HTML_REMOVED] SymPy live: [HTML_REMOVED] GitHub repository: [HTML_REMOVED]

Id: 152
Section: Scientific Computing
Type: Workshops
Target Audience: Beginner
Last Updated: