rovandam_r_n_2

5 Reputation

One Badge

12 years, 89 days

MaplePrimes Activity


These are replies submitted by rovandam_r_n_2

this is not a homework, i have done it before with another problem but i can not do it with this the one that i did is 

x0 := 1; v0 := 5; t0 := 0; tf := .6; h := .2; printf("Euler Method with time step h = %a over the interval t = %a to %a seconds.\n", h, t0, tf); NumOfSteps := (tf-t0)/h; xn := x0; vn := v0; tn := t0; printf("(x%a,v%a,t%a) = (%a,%a,%a)\n", 0, 0, 0, xn, vn, tn); for k to NumOfSteps do xnplus1 := xn+vn*h; vnplus1 := vn+(10*tn-10*vn-5*xn)*h; tnplus1 := tn+h; xn := xnplus1; vn := vnplus1; tn := tnplus1; printf("(x%a,v%a,t%a) = (%a,%a,%a)\n", k, k, k, xn, vn, tn) end do

this is not a homework, i have done it before with another problem but i can not do it with this the one that i did is 

x0 := 1; v0 := 5; t0 := 0; tf := .6; h := .2; printf("Euler Method with time step h = %a over the interval t = %a to %a seconds.\n", h, t0, tf); NumOfSteps := (tf-t0)/h; xn := x0; vn := v0; tn := t0; printf("(x%a,v%a,t%a) = (%a,%a,%a)\n", 0, 0, 0, xn, vn, tn); for k to NumOfSteps do xnplus1 := xn+vn*h; vnplus1 := vn+(10*tn-10*vn-5*xn)*h; tnplus1 := tn+h; xn := xnplus1; vn := vnplus1; tn := tnplus1; printf("(x%a,v%a,t%a) = (%a,%a,%a)\n", k, k, k, xn, vn, tn) end do

Page 1 of 1