Previous Up Next

4.3.4  Approximate solution of y’=f(t,y) : odesolve

Input :

odesolve(sin(t*y),[t,y],[0,1],2)

or :

odesolve(sin(t*y),t=0..2,y,1)

or :

odesolve(0..2,(t,y)->sin(t*y),1)

or define the function :

f(t,y):=sin(t*y)

and input :

odesolve(0..2,f,1)

Output :

[1.82241255675]

Input :

odesolve(0..2,f,1,tstep=0.3)

Output :

[1.82241255675]

Input :

odesolve(sin(t*y),t=0..2,y,1,tstep=0.5)

Output :

[1.82241255675]

Input :

odesolve(sin(t*y),t=0..2,y,1,tstep=0.5,curve)

Output :

[[0.760963063136,[1.30972370515]],[1.39334557388,[1.86417104853]]]

Previous Up Next