DifferentialEquations.jl is a metapackage for solving differential equations in Julia. The basic workflow is:
The API between different types of differential equations is unified through multiple dispatch.
using DifferentialEquations # Define a problem p = (1.0,2.0,1.5,1.25) # a,b,c,d f = function (du,u,p,t) # Define f as an in-place update into du a,b,c,d = p du = a*u - b*u*u du = -c*u+ d*u*u end u0 = [1.0;1.0]; tspan = (0.0,10.0) prob = ODEProblem(f,u0,tspan,p);
# Solve the problem sol = solve(prob);
# Plot the solution using the plot recipe using Plots; gr() # Using the Plotly Backend plot(sol,title="All Plots.jl Attributes are Available")