An object of mass m falls from rest at a point near the earth\'s surface. If the
ID: 3161114 • Letter: A
Question
An object of mass m falls from rest at a point near the earth's surface. If the air resistance is proportional to the velocity v^2, the differential equation for the velocity as a function of time is given by: m dV/dt = mg - cV^2, V(t = 0) = 0 Derive the exact solution. For the given parameters g = 9.81 m/s^2, m = 45 kg, and c = 1.3 kg/m, plot the exact and numerical solutions for V(t) obtained from the 4th-order Runge-Kutta method using an interval of delta t = 0.25 s in the domain of 0 lessthanorequalto 1 lessthanorequalto 10 s. Print the velocity' of the object at 6 seconds and compare the exact solution and your Runge-Kutta solution from part (b). How does this compare with the results of the MATLAB ode45 function?Explanation / Answer
(b) assume dy/dt = 9.81- 0.029 y2
for each iteration calculations are
k1 =0.25(9.81-(1.3/45)y2) substitute 0 first for y
k2 =0.25 f(k1/2) replace y with k1
k3 = 0.25 f(k2/2) replace y with k2
k4=0.25 f(k3) replace y with k3
then find k = 1/6*(k1+2k2+2k3+k4); and we get velocity as k continue the iterations
from continuing we get f(y1) and
we get y2 so on
(c)
% constants
a= 9.81;
b= 0.029;
%function decleration
fR = @(t,R) a-b*R;
t(1) = 0;
R(1) = 0;
h= 0.25;
tfinal = 10;
N = ceil(tfinal/h);
for i =1 : N
t(i+1) = t(i)+h;
k1R = fR(t(i) , R(i));
k2R = fR(t(i)+h/2, R(i)+h/2*k1R);
k3R = fR(t(i)+h/2, R(i)+h/2*k2R);
k4R = fR(t(i)+h, R(i)+h*k3R);
R(i+1) = R(i)+h/6*(k1R+2*k2R+2*k3R+k4R);
end
plot( t,R);
fprintf('time %f and velocity %f', t(6), R(6));
time 1.250000 and velocity 12.042904
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.