SymPy – 17 – calcolo infinitesimale – 3

Continuo da qui, copio qui.

Limiti
SymPy can compute symbolic limits with the limit function. The syntax to compute

is limit(f(x), x, x0).

limit should be used instead of subs whenever the point of evaluation is a singularity. Even though SymPy has objects to represent , using them for evaluation is not reliable because they do not keep track of things like rate of growth. Also, things like ∞-∞ and ∞/∞ return NaN (not-a-number). For example

Like Derivative and Integral, limit has an unevaluated counterpart, Limit. To evaluate it, use doit.

To evaluate a limit at one side only, pass '+' or '-' as a third argument to limit. For example, to compute

do

Espansione di serie
SymPy can compute asymptotic series expansions of functions around a point. To compute the expansion of f(x) around the point x=x0 terms of order xn, use f(x).series(x, x0, n). x0 and n can be omitted, in which case the defaults x0=0 and n=6 will be used.

The O(x4) term at the end represents the Landau order term at x=0 (not to be confused with big O notation used in computer science, which generally represents the Landau order term at x=∞). It means that all x terms with power greater than or equal to x4 are omitted. Order terms can be created and manipulated outside of series. They automatically absorb higher order terms.

If you do not want the order term, use the removeO method.

The O notation supports arbitrary limit points (other than 0):

Aggiornamento: il capitolo continua con Finite differences ma semplicemente non funziona 😡
Le funzioni risultano non definite; Stack Overflow ha diversi post a riguardo, tutti segnalantio problemi. Salto 😜 Forse in futuro… 😉

Aggiornamento 2: era solo la versione da aggiornare; non leggete l’aggiornamento precedente, quello scancellato 😉

:mrgreen:

Posta un commento o usa questo indirizzo per il trackback.

Trackback

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.

%d blogger hanno fatto clic su Mi Piace per questo: