Ask Your Question

Revision history [back]

That is not the type of input that desolve_system_rk4 accepts. As written in the documentation and seen in the example, it accepts a list of right-hand sides of first-order differential equations, like this:

R = 5
g = 9.8
var('x,y,t')
de1 = y
de2 = -(g/R)*sin(x)
sol_points = desolve_system_rk4([de1,de2],[x,y],ics = [0,(20/180)*RR.pi(),0],ivar=t)
sol_points_xy = [(x,y) for (x,y,_) in sol_points]
list_plot(sol_points_xy, plotjoined=True)

sage rk4