Why with deSolveDiffEq I am not receiving all the solutions of the system, as can be seen in the examples?
I only get these results
19:42:41->>retcode: Default
Interpolation: 1st order linear
t: 2-element view(::Array{Float64,2}, :, 1) with eltype Float64:
0.0
50.0
u: 2-element Array{Array{Float64,1},1}:
[0.0, 0.66]
[-33.0, 15.510000000000002]
### Examples
using DifferentialEquations
using Plots; gr()
function integrate_ODE!(du,u,t)
du[1] = -0.4*u[1] - u[2]
du[2] = u[1] + 0.45*u[2]
end
u0 = [0.0,0.66]
tspan = (0.0,50.0)
prob = ODEProblem(integrate_ODE!,u0,tspan)
sol = solve(prob)# Euler ImplicitEuler
plot(sol,linewidth=2,xaxis="t",layout=(2,1))
plot(sol,vars=(1,2), lw=1)
#
using OrdinaryDiffEq
prob = ODEProblem(integrate_ODE!,u0,tspan)
OrdinaryDiffEq.solve(prob, ImplicitEuler())
plot(sol,linewidth=2,xaxis="t",layout=(2,1))
plot(sol,vars=(1,2), lw=1)
#
A=[-0.4 -1.0
1.0 0.45]
u0 = [0.0; 0.66]
tspan = (0.0,50.0)
f(u,p,t)=A*u
prob = ODEProblem(f,u0,tspan)
sol=solve(prob)
plot(sol,linewidth=2,xaxis="t",layout=(2,1))
plot(sol,vars=(1,2), lw=1)
#
using deSolveDiffEq
u0 = [0.0;0.66]
tspan = (0.0,50.0)
prob = ODEProblem(integrate_ODE!,u0,tspan)
sol = solve(prob,deSolveDiffEq.euler())
#