diffeqzoo.bvps Module#

Boundary value problem examples.

This module provides a number of example implementations of boundary value problems (BVPs). BVPs are a combination of a (commonly second-order) ordinary differential equation

\[\ddot u(t) = f(u(t), \dot u(t), t, \theta)\]

and a set of boundary conditions: often, it is either a two-point boundary condition, \(g_0(u(0)) = g_1(u(1)) = 0\), or a general boundary condition, \(g(u(0), u(1)) = 0\). The boundary conditions \(g_0\), \(g_1\), or \(g\), and the vector field \(f\) are known, the parameters \(\theta\) might be known, and \(u\) is unknown.

The functions in this module construct implementations of this kind of problem. They (loosely) follow the input/output rule

f, g, (t0, tmax), param = constructor()
f, (g0, g1), (t0, tmax), param = constructor_two_point()

where the constructor is, e.g., pendulum() or measles(). This API specification is only loose, because every problem is different. For example, first-order problems implement a differential equation

\[\dot u(t) = f(u(t), t, \theta).\]

We try to stick as closely as possible to the above signature, but if problem-specific issues arise, we allow ourselves to deviate from this specification. When in doubt, consult the documentation of the respect constructor function. Each function’s documentation also explains whether the problem is a two-point boundary value problem, and whether the differential equation is first-, second-, or higher order.

Functions#

bratu(*[, time_span, parameters])

Construct Bratu's problem.

bratu_with_unused_derivative_argument(*[, ...])

Construct Bratu's problem with a signature \((u, \dot u)\) / and an unused second argument.

measles(*[, time_span, mu, lmbda, eta, beta0])

Construct the Measles problem.

pendulum(*[, time_span, parameters])

Construct the pendulum problem.

pendulum_with_unused_derivative_argument(*)

Construct the pendulum problem with a signature \((u, \dot u)\) / and an unused second argument.