logo

... sympy.


sympy is a system for symbolic maths in python. It doesn't just compute, it also differentiates, integrates and automates common calculus steps. The documentation for it can be found here.


Episode Notes

The code from this video is listed below.

import sympy as sp 
l, w = sp.symbols("l, w")
area = l * w
circumference = 2 * l + 2 * w

sp.solve(sp.Eq(circumference, 10), l)
sp.solve(sp.diff(area.subs(l, -w + 5), w), w)

Feedback? See an issue? Feel free to mention it here.

If you want to be kept up to date, consider getting the newsletter.