Math 2250 Lab 4 Name/Unid: 1. (35 points) Leslie Leroy Irvin bails out of an airplane at the altitude of 16,000 ft, falls freely for 20 s, then opens his parachute. Assuming linear air resistance ρv ft/s 2, taking ρ=0.18 without the parachute and ρ= 1.8 with the parachute. (a) Write down the ODE that describes the velocity v before he opens the parachute and solve the IVP. (b) Find the velocity v at time 1 s, the velocity when he just opens the parachute and the terminal velocity. (c) Find the height y(t) when he opens the parachute. (d) Write down the ODE describing the velocity after he opens the parachute, write the new initial condition and solve the IVP. (e) Write down the equation for the height depending of time, use the new initial condition for the height. (f) How long will it take him to reach the ground (from the moment he bails out of the plane)? You may want to solve for t using some software. Solution: (a) Before opening the parachute, the differential equation is given by: dv dt = 32 0.18v v(0) = 0 Solving the ODE by integrating factor and using the initial condition, we get: P (t) = 0.18 (1) Q(t) = 32 (2) ρ(t) = e 0.18dt = e 0.18t (3) e 0.18t (v (t) + 0.2v) = 32e 0.18t (4) (v(t)e 0.18t ) = 32e 0.18t (5) v(t)e 0.18t = 177.77e 0.18t + C (6) v(0) = 0 = C = 177.77 (7) v(t) = 177.77(e 0.18t 1) (8)
(b) Then, we can evaluate v(t) at time t=1 and t=20 (20s is when the man opens the parachute) and t (for the terminal velocity) v(1) = 29.2840ft/s, v(20) = 172.16ft/s, v termi = 177.77ft/s (c) For finding the height, integrate v(t) so we get: y(t) = 987.61e 0.18t 177.77t + c Using the initial condition y(0)=16,000 ft. c= 16987.61. Thus He opens the parachute at t=20s y(t) = 987.61e 0.18t 177.77t + 16, 987.61 y(20) = 13405.22f t (d) After opening the parachute, the differential equation change to: dv = 32 1.8v dt v(0) = 172.16 (e) Solving again by integrating factor and using the initial condition, we get: Integrating v(t) for getting the height, v(t) = 17.7e 1.8t 154.46 y(t) = 9.83e 1.8t 154.46t + c Using the initial condition y(0) = 13, 416.43, the equation for the height is: y(t) = 9.83e 1.8t 154.46t + 13406.6 (f) To reach the ground means y = 0 Thus solving the last equation for t, y = 0 when t = 86.83s The total of time descending is t = 20 + 86.83 = 106.83s. Page 2
2. (25 points) Consider the same IVP as in problem 1 (part a) Apply the following methods to approximate the solution function on the time interval 0 t 1. Do these computations by hand (using a calculator or other technology to do each step, but not using programmed code). You may wish to use programmed code (numericswn.m) to check your work before you hand it in. (a) Euler Method: use step size h = 0.5, i.e. 2 time steps. (b) Improved Euler Method: use step size h = 0.5 again. (c) Runge Kutta Method: use step size h = 1.0, i.e. just 1 time step. (d) Compare these approximations for v(1) with the exact solution at t = 1 and comment about the relative accuracy of the three techniques, by computing the relative errors v approx v exact v exact in each case.(the step sizes are so large that you don t expect any of the techniques to be extremely accurate.) Solution: h=1, time interval [0,3], v(0) = 0 (a) Euler Method, v n+1 = v n + h f(t n, v n ) v 0 = 0 = k = 32 0.18 0 = 32 = v 1 = v 0 + 32h = 16 v 1 = 16 = k = 0 + 32 0.18 ( 16) = 29.12 = v 2 = 16 + 29.12h = 30.56 (b) Improved Euler. step 1: v 0 = 0 = k 1 = 32, k 2 = 29.1200 = v 1 = 0 + 1 ( 32 29.12) = 15.2800 4 step 2: v 1 = 15.2800 = k 1 = 29.2496 k 2 = 26.6171 = v 2 = 29.2467 (c) R K Method k 1 = f(x n, y n )k 2 = f(x n + h 2, y n + h 2 k 1)k 3 = f(x n + h 2, y n + h 2 k 2)k 4 = f(x n+1, y n + hk 3 )v n+1 1 step only: v 0 = 0 = k1 = 32 k2 = 29.1200 k3 = 29.3792 k4 = 26.7117 = v 1 = v 0 + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ) = 29.2850 Page 3
(d) Results: Using part b) on problem 1, the exact velocity at time t = 1 is v(1) = 29.2840. The relative accuracies for the three methods are 30.56 + 29.2840 Eulers: = = 0.04357 29.2840 29.2467 + 29.2840 Improved Euler s: = = 0.001274 29.2840 29.2850 + 29.2840 Runge-Kutta: = = 0.00003415 29.2840 Conclusion: Runge-Kutta is much more accurate. 3. (40 points) If we drop a package from a helicopter with a parachute attached, the wind resistance provided by the parachute is not really linear, assume for a certain type of parachute the acceleration equation is modeled by (Assume velocity in ft/s) v (t) = 32 0.18v 0.16v 1.6 v(0) = 0 (a) What is the terminal velocity in this model? Notice that the slope function 32 0.18v 0.16v 1.6 is decreasing function of v for v > 0 that its value is 32 when v=0, and that its limit as v is. Thus the slope function has exactly one root and you can find it with the Matlab (or other software) solve command. (b) This is a differential equation which does NOT have an elementary solution. Use numericswn.m (You may modify the Matlab code according your need)to estimate the solution values at t=3 and t=6 seconds with the methods Euler, Improved Euler and Runge Kutta with step sizes h=0.3 and h=0.03. Write the approximate solution for each method with each h and each time t=3 and t=6. Plot your results and comment about apparent accuracy of the three methods with these different choices of time step size. (c) Since we don t know the exact solution function in this problem, there is not a quick direct way to see how accurate our numerical approximate solutions are. There are error estimates that some of you will learn in later numerical analysis classes (analogous to error estimates you may have learned for Taylor series), but for the purposes of this lab undertake the following crude test: Compare the numerical approximations for velocity at t = 3 and t = 6, for Runge-Kutta with h = 0.3 and h = 0.03. If these approximations are close (and the approximate solution graphs appear to line up exactly), then it s likely that they are also close to the exact solution. Page 4
(d) Based on your work above, approximately what fraction of the terminal velocity is attained at t = 3 and t = 6 seconds? (e) What does the asymptote on the plot mean? What happen if you change the initial condition to v(0)= 5 and v(0)= 40? Solution: (a) The terminal velocity is found by calculating the root of the right hand side (acceleration equals to zero), using a software, with Maple solve code ( solve(32.2 v.15 v 1.5 = 0, v); ) you get 24.95136652 ft/s. Alternatively, computing the Runge Kutta at h = 0.01 for 20 seconds predicts the stable velocity. (b) Plot of the methods: Euler, Improved Euler and RK for h=0.3 30 Numerical Solution. h=0.3 25 v 20 15 Euler method Improved Euler Runge Kutta method 10 5 0 0 2 4 6 8 t For h=0.3 the values of v on t=3 are the following: Euler v(3)=24.9422 Improved Euler v(3)=24.7922 RK v(3)= 24.8459 For h=0.3 the values of v on t=6 are the following: Euler v(6)=24.9514 Improved Euler v(6)=24.9506 RK v(6)=24.9511 Plot of the methods: Euler, Improved Euler and RK for h=0.03 Page 5
30 Numerical Solution. h=0.03 25 v 20 15 10 Euler method Improved Euler Runge Kutta method 5 0 0 2 4 6 8 t For h=0.03 the values of v on t=3 are the following: Euler v(3)=24.8615 Improved Euler v(3)=24.8463 RK v(3)=24.8466 For h=0.03 the values of v on t=6 are the following: Euler v(6)=24.9511 Improved Euler v(6)=24.9511 RK v(6)=24.9511 We can see that on our second graph the three methods give us similar numerical solutions. (c) At t = 3 for Runge-Kutta with h = 0.3 and h = 0.03 the values of the velocity are v(3) = 24.8459 and v(3) = 24.8466 respectively. At t = 6 for Runge-Kutta with h = 0.3 and h = 0.03 the values of the velocity are v(6) = 24.9511 and v(6) = 24.9511 respectively. Notice these values are very closed to each other, so it is likely that they are also close to the exact solution. (d) At t = 3, 99.58% of the terminal velocity is attained. At t = 6, 99.99% of the terminal velocity is attained. (e) The asymptote on the plot represents the terminal velocity, if we change the initial condition to v(0)= 5 the graph of the velocity is increasing until attain the terminal velocity and if v(0)= 40 then the graph of the velocity is decreasing until attain the terminal velocity. Page 6