Answer
The solution is in the following image:
Work Step by Step
Calculate the exact values of $v$ and $x$ using equation $(1.10)$ and $\operatorname{Eq}(1)$ from part (a). Use the code below, written in GNU Octave to obtain the results and plot.
please see the image below:
____________________________
now we continue the solution
t=0:2:10;
v(1)=0;
x(1)=0;
for k=2:6
v(k)=v(k-1)+(9.81-12.5/68.1 * v(k-1))*2;
x(k)=x(k-1)+v(k-1)*2;
end
disp(v)
%output
0.00000 19.62000 32.03736 39.89621 44.87003 48.01792
disp(x)
%output
0.00000 0.00000 39.24000 103.31471 183.10714 272.84719
te=0:0.1:10;
for k=1:101
xe(k)=9.81*68.1/12.5*(te(k)+68.1/12.5*exp(-12.5/68.1*te(k)))-9.81*68.1*68.1/(12.5*12.5);
ve(k)=9.81*68.1/12.5*(1-exp(-12.5/68.1*te(k)));
end
plot(t,x)
hold on
plot(te,xe)
xlabel('t')
ylabel('x')
hold off
plot(t,v)
hold on
plot(te,ve)
xlabel('t')
ylabel('v')