This demo runs an example from Section 11.2.6 in Greenbaum & Chartier
using ODE
# declare the forcing function
function love(t,v)
dvdt = zeros(2)
dvdt[1] = -0.2*v[2]
dvdt[2] = 0.8*v[1]
return dvdt
end
# ode45 - forcing, initial, time-span
T,V = ode45(love,[2.,2.],[0.,60.])
V = hcat(V...)' # convert to matrix
using Plots; plotly();
plot(T,V[:,1],label="Romeo")
plot!(T,V[:,2],label="Juliet")
xlabel!("time")
ylabel!("affection")
title!("Love in time")