September 2014
Intermediate to advanced
512 pages
12h 39m
English
SymPy contains a rich calculus toolbox to analyze real-valued functions: limits, power series, derivatives, integrals, Fourier transforms, and so on. In this recipe, we will show the very basics of these capabilities.
We first need to import SymPy. We also initialize pretty printing in the notebook (see the first recipe of this chapter).
x):In [1]: var('x z')
Out[1]: (x, z)
In [2]: f = 1/(1+x**2)1:In [3]: f.subs(x, 1) Out[3]: 1/2
In [4]: diff(f, x) Out[4]: -2*x/(x**2 + 1)**2
f's limit to infinity? (Note the double o (oo ...Read now
Unlock full access