Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

t_span in ode_solver

The definition of the first time in t_span has no effect : [t_0,t_1] has the same effect than [0,t_1]. See the code below.

What to do ?


def f(t,y): return[y[0],y[1]] T = ode_solver() T.function=f T.ode_solve(y_0=[1,1],t_span=[-1,0.5],num_points=100) sx=[j[1][0] for j in T.solution] sy=[j[1][1] for j in T.solution] p=line(zip(sx,sy)) p.show(xmin=-3,xmax=3,ymax=3,ymin=-3)

t_span in ode_solver

The definition of the first time in t_span has no effect : [t_0,t_1] has the same effect than [0,t_1]. See the code below.

What to do ?


def f(t,y): return[y[0],y[1]]
T = ode_solver()
T.function=f
T.ode_solve(y_0=[1,1],t_span=[-1,0.5],num_points=100)
sx=[j[1][0] for j in T.solution]
sy=[j[1][1] for j in T.solution]
p=line(zip(sx,sy))
p.show(xmin=-3,xmax=3,ymax=3,ymin=-3)

p.show(xmin=-3,xmax=3,ymax=3,ymin=-3)