from sage.calculus.desolvers import desolve_system_rk4 x,y,t=var('x y t') P=desolve_system_rk4([y,-sin(x)],[x,y],ics=[0,0.1,2],step=0.01,ivar=t,end_points=20) Q=[[x,y] for t,x,y in P] movingpoints=[point((-sin(Q[50*k][0]),-cos(Q[50*k][0])),color='red',size=80) for k in range(0,40)] a = animate(movingpoints,xmin=-1,xmax=1,ymin=-1,ymax=1,aspect_ratio=1) a.show()