# How to switch ODE from DifferentialEquations to OrdinaryDiffEq?

**URL:** <https://discourse.julialang.org/t/how-to-switch-ode-from-differentialequations-to-ordinarydiffeq/40460>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [May 30, 2020, 6:38am UTC](https://discourse.julialang.org/t/how-to-switch-ode-from-differentialequations-to-ordinarydiffeq/40460 "2020-05-30T06:38:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luigi\_Marongiu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/luigi_marongiu/32/7909_2.png) [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Post date:** [May 30, 2020, 6:38am UTC](https://discourse.julialang.org/t/how-to-switch-ode-from-differentialequations-to-ordinarydiffeq/40460/1 "2020-05-30T06:38:07Z")

</div>

Hello,  
I am using a ChromeBook and I can’t install DifferentialEquations; but I can run OrdinaryDiffEq.  
I set a function and the solver based on the DifferentialEquations’s syntax but:

```julia
julia> prob = ODEProblem(sird!, u0, tspan, p)
ODEProblem with uType Array{Float64,1} and tType Float64. In-place: true
timespan: (0.0, 200.0)
u0: [83299.0, 1.0, 0.0, 0.0]
julia> soln = solve(prob)
ERROR: Default algorithm choices require DifferentialEquations.jl. Please specify an algorithm or import DifferentialEquations directly.
Stacktrace:

 [1] error(::String) at ./error.jl:33
 [2] __solve(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(sird!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}, ::Nothing; default_set::Bool, second_time::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/marongiuluigi/.julia/packages/DiffEqBase/wBR51/src/solve.jl:190
 [3] __solve(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(sird!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}; default_set::Bool, second_time::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/marongiuluigi/.julia/packages/DiffEqBase/wBR51/src/solve.jl:194
 [4] __solve(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(sird!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}) at /home/marongiuluigi/.julia/packages/DiffEqBase/wBR51/src/solve.jl:189
 [5] (::DiffEqBase.var"#442#443"{ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(sird!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tuple{}})() at /home/marongiuluigi/.julia/packages/DiffEqBase/wBR51/src/solve.jl:49
 [6] maybe_with_logger(::DiffEqBase.var"#442#443"{ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(sird!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tuple{}}, ::Nothing) at /home/marongiuluigi/.julia/packages/DiffEqBase/wBR51/src/utils.jl:259
 [7] solve_call(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(sird!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}; merge_callbacks::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/marongiuluigi/.julia/packages/DiffEqBase/wBR51/src/solve.jl:48
 [8] solve_call(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(sird!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}) at /home/marongiuluigi/.julia/packages/DiffEqBase/wBR51/src/solve.jl:37
 [9] solve(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(sird!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/marongiuluigi/.julia/packages/DiffEqBase/wBR51/src/solve.jl:70
 [10] solve(::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},ODEFunction{true,typeof(sird!),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem}) at /home/marongiuluigi/.julia/packages/DiffEqBase/wBR51/src/solve.jl:54
 [11] top-level scope at none:0

```

What is the correct syntax for OrdinaryDiffEq?

---

<div class="post-metadata">

**Author:** ![asinghvi17](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asinghvi17/32/8272_2.png) [@asinghvi17](https://discourse.julialang.org/u/asinghvi17)\
**Post date:** [May 30, 2020, 6:48am UTC](https://discourse.julialang.org/t/how-to-switch-ode-from-differentialequations-to-ordinarydiffeq/40460/2 "2020-05-30T06:48:10Z")

</div>

You need to explicitly provide a solver, as the error message suggests. You could try `solve(prob, Tsit5())` for a basic solver, and look at the solvers page in the documentation for all available solvers.
