4Algebra and Symbolic Math with SymPy

image

The mathematical problems and solutions in our programs so far have all involved the manipulation of numbers. But there’s another way math is taught, learned, and practiced, and that’s in terms of symbols and the operations between them. Just think of all the xs and ys in a typical algebra problem. We refer to this type of math as symbolic math. I’m sure you remember those dreaded “factorize x3 + 3x2 + 3x + 1” problems in your math class. Fear no more, for in this chapter, we learn how to write programs that can solve such problems and much more. To do so, we’ll use SymPy—a Python library that lets you write ...

Get Doing Math with Python 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.