Getting started with Differential Equations

I am trying to port a simple example from Python to Julia, but already the first example from the Tutorial fails:

using DifferentialEquations

function lorenz(t, u, du)
    du[1] = 10.0(u[2]-u[1])
    du[2] = u[1]*(28.0-u[3]) - u[2]
    du[3] = u[1]*u[2] - (8/3)*u[3]

u0 = [1.0; 0.0; 0.0]
tspan = (0.0, 100.0)
prob = ODEProblem(lorenz, u0, tspan)
sol = solve(prob)


julia> include("src/RadauTether.jl")
ERROR: LoadError: Parameters were indexed but the parameters are `nothing`. You likely forgot to pass in parameters to the DEProblem!
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] getindex(#unused#::SciMLBase.NullParameters, i::Int64)
    @ SciMLBase ~/.julia/packages/SciMLBase/XuLdB/src/problems/problem_utils.jl:140

Any idea?

To answer myself: The example was from an outdated version of the documentation.

The latest documentation (Ordinary Differential Equations · DifferentialEquations.jl) is correct:

using DifferentialEquations

function lorenz!(du,u,p,t)
    du[1] = 10.0*(u[2]-u[1])
    du[2] = u[1]*(28.0-u[3]) - u[2]
    du[3] = u[1]*u[2] - (8/3)*u[3]

u0 = [1.0; 0.0; 0.0]
tspan = (0.0, 100.0)
prob = ODEProblem(lorenz!, u0, tspan)
sol = solve(prob)

Anything we can do to make the old version of the docs less likely to show up?

The old docs at least give you a big javascript popup box saying it’s the old version.

Well, if I google: “ordinary differential equations julia” the first hit is:

And if I go to the examples I end up here:

And this doesn’t work. And no popup box (well, perhaps Firefox is blocking it?)

Which version is the currently stable version?

You don’t get that box?


Actually, now I also see the box. But it is in the lower right corner and I have a widescreen monitor, so I did not see it first.

@pfitzseb getting that comment again.

To be fair, it’s just a hack that @pfitzseb put into our docs to try and fix this problem. It’s a major issue with Documenter.jl and everyone should spam:

It’s now been the #1 issue with Documenter.jl for four years so, hopefully someone comes up with a built in solution.