Chapter 15. Symbolic and Numerical Mathematics

In this chapter, we will cover the following topics:

  • Diving into symbolic computing with SymPy
  • Solving equations and inequalities
  • Analyzing real-valued functions
  • Computing exact probabilities and manipulating random variables
  • A bit of number theory with SymPy
  • Finding a Boolean propositional formula from a truth table
  • Analyzing a nonlinear differential system — Lotka-Volterra (predator-prey) equations
  • Getting started with Sage

Introduction

In this chapter, we will introduce SymPy, a Python library for symbolic mathematics. Whereas most of the book deals with numerical methods, we will see examples here where symbolic computations are more suitable.

SymPy is to symbolic computing what NumPy is to numerical computing. ...

Get IPython Interactive Computing and Visualization Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.