clc; clear; g=9.8;//m/s^2; acceleration due to gravity m=68.1;//kg c=12.5;//kg/sec; drag coefficient function v=f(t) v=g*m*(1-exp(-c*t/m))/c endfunction tval=289.43515;//m a=0; b=10; fa=f(a); fb=f(b); for i=10:10:20 n=i; h=(b-a)/n; disp(i,"No. of segments=") disp(h,"Segment size=") j=a+h; s=0; while j