BoundaryValueDiffEq.jl is a component package in the DifferentialEquations ecosystem. It holds the boundary value problem solvers and utilities. While completely independent and usable on its own, users interested in using this functionality should check out DifferentialEquations.jl.
BoundaryValueDiffEq.jl is part of the JuliaDiffEq common interface, but can be used independently of DifferentialEquations.jl. The only requirement is that the user passes a BoundaryValueDiffEq.jl algorithm to solve. For example, we can solve the BVP tutorial from the documentation using the MIRK4()
algorithm:
using BoundaryValueDiffEq
tspan = (0.0, pi / 2)
function simplependulum!(du, u, p, t)
θ = u[1]
dθ = u[2]
du[1] = dθ
du[2] = -9.81 * sin(θ)
end
function bc!(residual, u, p, t)
residual[1] = u[end ÷ 2][1] + pi / 2
residual[2] = u[end][1] - pi / 2
end
prob = BVProblem(simplependulum!, bc!, [pi / 2, pi / 2], tspan)
sol = solve(prob, MIRK4(), dt = 0.05)
For the list of available solvers, please refer to the DifferentialEquations.jl BVP Solvers page. For options for the solve
command, see the common solver options page.