Quick start – Automated curve sketching

The main use of SymPy is to automate tedious mathematical procedures, so let us look at an example of this. Curve sketching, that staple of introductory calculus classes where the student has to find out the salient features of the curve of a function through algebraic manipulations, limits, and derivatives. In this section, you will learn how to perform it automatically using SymPy.

There are many variants of the task. For simplicity, we will reduce it to its bare essentials: identifying the local extrema and asymptotes of the curve, and highlight them on a plot of the function. We will also limit ourselves to rational fractions, which are functions equal to a ratio of polynomials.

We shall work exclusively ...

Get Instant SymPy Starter now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.