Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168703
Image: ubuntu2004
def f(t,y): return 3*cos(t)-2*y y=[0.0] t=[0.0] a=t[0]; b=0.4 h=0.1 m=(b-a)/h for i in range(0,m): x=y[i]+ f(t[i],y[i])*h s=t[i]+ h y.append(x) t.append(s) for i in range(0,m+1): print y[i]
0.000000000000000 0.300000000000000 0.538501249583408 0.724820973019099 0.866457725152961
def f(t,y): return 3*cos(t)-2*y y=[0.0] t=[0.0] a=t[0]; b=0.4 h=0.05 m=(b-a)/h for i in range(0,m): x=y[i]+ f(t[i],y[i])*h s=t[i]+ h y.append(x) t.append(s) for i in range(0,m+1): if i%2==0: print y[i]
0.000000000000000 0.284812539059245 0.513339380640928 0.693450749584316 0.831571440122360
def f(t,y): return 3*cos(t)-2*y y=[0.0] t=[0.0] a=t[0]; b=0.4 h=0.025 m=(b-a)/h for i in range(0,m): x=y[i]+ f(t[i],y[i])*h s=t[i]+ h y.append(x) t.append(s) for i in range(0,m+1): if i%4==0: print y[i]
0.000000000000000 0.277919591169469 0.501812930541769 0.678949387911564 0.815302127542951