This is one of the 100 recipes of the IPython Cookbook, the definitive guide to high-performance scientific computing and data science in Python.
from sympy import *
init_printing()
var('x z')
We define a new function depending on x.
f = 1/(1+x**2)
Let's evaluate this function in 1.
f.subs(x, 1)
We can compute the derivative of this function...
diff(f, x)
limits...
limit(f, x, oo)
Taylor series...
series(f, x0=0, n=9)
Definite integrals...
integrate(f, (x, -oo, oo))
indefinite integrals...
integrate(f, x)
and even Fourier transforms!
fourier_transform(f, x, z)
You'll find all the explanations, figures, references, and much more in the book (to be released later this summer).
IPython Cookbook, by Cyrille Rossant, Packt Publishing, 2014 (500 pages).