Math 2250 Lab 4 Name/Unid:

Math 2250 Lab 4
Name/Unid:
1. (25 points) A man bails out of an airplane at the altitute of 12,000 ft, falls freely for
20 s, then opens his parachute. Assuming linear air resistance ρv ft/s2 , taking ρ=0.2
without the parachute and ρ= 2 with the parachute.
(a) Write down the ODE that describes the velocity v before he opens the parachute.
(b) Find the velocity at time 3 s and the velocity when he just opens the parachute.
(c) Find the height when he opens the parachute.
(d) Write down the ODE describing the velocity after he opens the parachute.
(e) Write down the equation for the height depending of time.
(f) How long will it take him to reach the ground (from the moment he bails out of the
plane)?
Solution:
(a) Before opening the parachute, the differential equation is given by:
dv
= −32 − 0.2v
dt
v(0) = 0
(b) Solving the ODE by integrating factor and using the initial condition, we get:
v(t) = 160(e−0.2t − 1)
Then, we can evaluate v(t) at time t=3 and t=20 (20s is when the man opens
the parachute)
v(3) = −72.1901f t/s, v(20) = −157.07f t/s
(c) For finding the height, integrate v(t) so we get:
y(t) = −800e−0.2t − 160t + c
Using the initial condition y(0)=12,000 ft. c= 12,800. Thus
y(t) = −800e−0.2t − 160t + 12, 800
He opens the parachute at t=20s
y(20) = 9585.35f t
(d) After opening the parachute, the differential equation change to:
dv
= −32 − 0.2v
dt
v(0) = −157.07
(e) Solving again by integrating factor and using the initial condition, we get:
v(t) = −16e−2t − 141.07
Integrating v(t) for getting the height,
y(t) = 8e−0.2t − 141.07t + c
Using the initial condition y(0) = 9585.35, the equation for the height is:
y(t) = 8e−0.2t − 16t + 9577.35
(f) To reach the ground means y = 0 Thus solving the last equation for t, y = 0
when t = 598.58s
The total of time descending is t = 20 + 598.58 = 618.58s.
Page 2
2. (35 points) For the problem 1, apply the following methods to the initial value problem.
Use step size h=1 on the time interval [0,3]. You have to compute this by hand (using
calculator, not programming)
(a)
(b)
(c)
(d)
Euler Method.
Improved Euler Method.
Runge Kutta Method.
Compare these solutions with the exact solution (part b, problem 1) and comment
your results.
Solution: h=1, time interval [0,3], v(0) = 0
(a) Euler Method, vn+1 = vn + h ∗ f (tn , vn )
v1 = 32
v2 = −57.6
v3 = −78.08
(b) Improved Euler.
n=0
k1 = f (t0 , v0 ) = f (v0 ) = −32
u1 = v0 + h ∗ k1 = −32
k2 = f (u1 ) = −25.6
1
v1 = v0 + h(k1 + k2 ) = −28.80
2
n=1
k1 = f (v1 ) = −26.24
u2 = v1 + h ∗ k1 = −55.04
k2 = f (u2 ) = −20.99
1
v2 = v1 + h(k1 + k2 ) = −52.41
2
n=2
k1 = f (v2 ) = −21.52
u3 = v2 + h ∗ k1 = −73.93
k2 = f (u3 ) = −17.21
1
v3 = v2 + h(k1 + k2 ) = −71.7811
2
Page 3
(c) R K Method
k1 = f (xn , yn )
h
h
k2 = f (xn + , yn + k1 )
2
2
h
h
k3 = f (xn + , yn + k2 )
2
2
k4 = f (xn+1 , yn + hk3 )
h
vn+1 = vn + (k1 + k2 + k3 + k4 )
6
n=0
k1 = −32
k2 = −28.80
k3 = −29.12
k4 = −26.18
v1 = −29.00
n=1
k1 = −26.20
k2 = −23.58
k3 = −23.84
k4 = −21.43
v1 = −52.75
n=2
k1 = −21.45
k2 = −19.30
k3 = −19.51
k4 = −17.54
v1 = −72.1893
Page 4
(d) Results: We can compare the three methods with the answer on problem 1,
part b), the exact solution is v(3)=78.19. Which Euler gives us v(3)=-78.08
with error e=5.8899, Improved Euler v(3)=-71.7811 with error e=0.409 and
Runge Kutta is v(3)= -72.1893. with error e= 0.0008. So clearly the best
approximation is given by Runge Kutta method, being Euler Method the least
accurate.
Page 5
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 0 (t) = 32 − 0.2v − 0.15v 1.5
v(0) = 0
(a) What is the terminal velocity in this model? Notice that the ”slope function”
32 − 0.2v − 0.15v 1.5 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
”numerics.m” to estimate the solution values at t=2 and t=5 seconds with the
methods Euler, Improved Euler and Runge Kutta with step sizes h=0.2 and h=0.02.
• Write the approximate solution for each method with each h and each time t=2
and t=5.
• Plot your result and comment about the accuracy of all the methods. Which of
the values of h you think is better, why?
(c) Numerical Observations:
• What does the asymptote on the plot mean? What happen if you change the
initial condition to v(0)= 5 and v(0)= 40?
• Plot these two different initial value problem for all the methods on the same
plot.(You can use h=0.2 and work on the time interval [0,6])
• What difference do you see on the plots of those initial value problems? What do
you think is the reason of the difference on the plots?
Solution:
(a) The terminal velocity is found by calculating the root of the right hand side
(acceleration equals to zero), using a software (Matlab) which is giving you
30.937 ft/s
(b) Plot of the methods: Euler, Improved Euler and RK for h=0.2
Page 6
35
30
Euler
Heun
RK
25
20
y
15
10
5
0
0
0.5
1
1.5
2
2.5
3
3.5
x
For h=0.2 the values of v on t=2 are the following:
Euler v(2)=29.454783
Improved Euler v(2)=28.636962
RK v(2)= 28.724095
For h=0.2 the values of v on t=5 are the following:
Euler v(5)=30.929166
Improved Euler v(5)=30.905564
RK v(5)=30.909052
Plot of the methods: Euler, Improved Euler and RK for h=0.02
35
30
Euler
Heun
RK
25
20
y
15
10
5
0
0
0.5
1
1.5
2
x
Page 7
2.5
3
3.5
For h=0.02 the values of v on t=2 are the following:
Euler v(2)=28.797724
Improved Euler v(2)=28.723791
RK v(2)=28.724521
For h=0.2 the values of v on t=5 are the following:
Euler v(5)=30.911767
Improved Euler v(5)=30.909039
RK v(5)=30.909067
We can see that on our second graph the three methods give us similar numerical
solutions. So h=0.02 is a better option than h=0.2
Page 8