Ordinary Differential Equations

Tools for solving initial value problems (IVPs).

English API (Aliases)

numpyy.euler(f, y0, t0, tf, h, pedagogique=None)[source]

Resout une ODE par la methode d’Euler explicite.

Parameters:
  • f (callable) – La fonction derivee y’ = f(t, y).

  • y0 (float/array) – Condition initiale.

  • t0 (float) – Temps initial.

  • tf (float) – Temps final.

  • h (float) – Pas de temps.

  • pedagogique (bool, optional) – Affiche les premieres etapes si True.

Returns:

(t, y) ou t est le tableau des temps et y le tableau des solutions.

Return type:

tuple

numpyy.modified_euler(f, y0, t0, tf, h, pedagogique=None)
numpyy.rk2(f, y0, t0, tf, h, pedagogique=None)[source]
numpyy.rk4(f, y0, t0, tf, h, pedagogique=None)[source]

Resout une ODE par la methode de Runge-Kutta d’ordre 4.

Parameters:
  • f (callable) – La fonction derivee y’ = f(t, y).

  • y0 (float/array) – Condition initiale.

  • t0 (float) – Temps initial.

  • tf (float) – Temps final.

  • h (float) – Pas de temps.

  • pedagogique (bool, optional) – Non utilise pour l’instant.

Returns:

(t, y) ou t est le tableau des temps et y le tableau des solutions.

Return type:

tuple

numpyy.adams_bashforth(f, y0, t0, tf, h, ordre=2)[source]
numpyy.adams_moulton(f, y0, t0, tf, h, ordre=2)[source]

Backend French API

numpyy.ode.euler(f, y0, t0, tf, h, pedagogique=None)[source]

Resout une ODE par la methode d’Euler explicite.

Parameters:
  • f (callable) – La fonction derivee y’ = f(t, y).

  • y0 (float/array) – Condition initiale.

  • t0 (float) – Temps initial.

  • tf (float) – Temps final.

  • h (float) – Pas de temps.

  • pedagogique (bool, optional) – Affiche les premieres etapes si True.

Returns:

(t, y) ou t est le tableau des temps et y le tableau des solutions.

Return type:

tuple

numpyy.ode.rk4(f, y0, t0, tf, h, pedagogique=None)[source]

Resout une ODE par la methode de Runge-Kutta d’ordre 4.

Parameters:
  • f (callable) – La fonction derivee y’ = f(t, y).

  • y0 (float/array) – Condition initiale.

  • t0 (float) – Temps initial.

  • tf (float) – Temps final.

  • h (float) – Pas de temps.

  • pedagogique (bool, optional) – Non utilise pour l’instant.

Returns:

(t, y) ou t est le tableau des temps et y le tableau des solutions.

Return type:

tuple

Example: RK4 Solver

import numpyy as ny
f = lambda t, y: -y
t, y = ny.rk4(f, y0=1.0, t0=0, tf=1, h=0.1)