Analytic approximation methods

Analytic approximation methods try to compute approximations to the exact solutions on suitable domains, in the form of truncated series expansions over a system of basis functions. In the SciPy stack, we have an implementation based on the Taylor series, through the routine odefun in the module sympy.mpmath.

Note

mpmath is a Python library for arbitrary-precision floating-point arithmetic, hosted inside the sympy module. Although it is independent of the numpy machinery, they both work well together.

For more information about this library, read the official documentation at http://mpmath.org/doc/current/.

Let's see it in action, first with our trivial example y'(t) = y(t), y(0) = 1. The key here is to assess the speed ...

Get Mastering SciPy 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.