Applied Numerical Methods with Python for Engineers and Scientists 1E Steven Chapra
Chapters 1-24
Chapter 1
1.1 Use calculus to verify that Eq. (1.9) is a solution of Eq. (1.8) for the initial condition v(0) = 0.
==========================================
You are given the following differential equation with the initial condition, v(0) = 0,
dv c
g d v2
dt m
Multiply both sides by m/cd
m dv m
g v2
cd dt cd
Define a mg / cd
m dv
a2 v2
cd dt
Integrate by separation of variables,
cd
a m dt
dv
2
v 2
A table of integrals can be consulted to find that
a
dx 1 x
tanh 1
2
x 2
a a
Therefore, the integration yields
1 v c
tanh 1 d t C
a a m
If v = 0 at t = 0, then because tanh–1(0) = 0, the constant of integration C = 0 and the solution is
1 v c
tanh 1 d t
a a m
This result can then be rearranged to yield
gm gcd
v tanh
m
t
cd
,1.2 Use calculus to solve Eq. (1.21) for the case where the initial velocity is (a) positive and (b) negative.
(c) Based on your results for (a) and (b), perform the same computation as in Example 1.1 but with an
initial velocity of −40 m/s. Compute values of the velocity from t = 0 to 12 s at intervals of 2 s. Note that
for this case, the zero velocity occurs at t = 3.470239 s.
==========================================
(a) For the case where the initial velocity is positive (downward), Eq. (1.21) is
dv c
g d v2
dt m
Multiply both sides by m/cd
m dv m
g v2
cd dt cd
Define a mg / cd
m dv
a2 v2
cd dt
Integrate by separation of variables,
cd
a m dt
dv
2
v 2
A table of integrals can be consulted to find that
a
dx 1 x
tanh 1
2
x 2
a a
Therefore, the integration yields
1 v c
tanh 1 d t C
a a m
If v = +v0 at t = 0, then
1 v
C tanh 1 0
a a
Substitute back into the solution
1 v c 1 v
tanh 1 d t tanh 1 0
a a m a a
Multiply both sides by a, taking the hyperbolic tangent of each side and substituting a gives,
mg gcd cd
v tanh t tanh 1 v0 (1)
cd mg
m
(b) For the case where the initial velocity is negative (upward), Eq. (1.21) is
dv c
g d v2
dt m
Multiplying both sides of Eq. (1.8) by m/cd and defining a mg / cd yields
,m dv
a2 v2
cd dt
Integrate by separation of variables,
cd
a m dt
dv
2
v 2
A table of integrals can be consulted to find that
a
dx 1 x
tan 1
2
x 2
a a
Therefore, the integration yields
1 v c
tan 1 d t C
a a m
The initial condition, v(0) = v0 gives
1 v
C tan 1 0
a a
Substituting this result back into the solution yields
1 1 v cd 1 v
tan t tan 1 0
a a m a a
Multiplying both sides by a and taking the tangent gives
c v
v a tan a d t tan 1 0
m a
or substituting the values for a and simplifying gives
mg gcd cd
v tan t tan 1 v0 (2)
cd m mg
(c) We use Eq. (2) until the velocity reaches zero. Inspection of Eq. (2) indicates that this occurs when the
argument of the tangent is zero. That is, when
gcd cd
t zero tan 1 v0 0
m mg
The time of zero velocity can then be computed as
m cd
t zero tan 1 v0
gcd mg
Thereafter, the velocities can then be computed with Eq. (1.9),
mg gcd
v tanh (t t zero ) (3)
cd
m
Here are the results for the parameters from Example 1.2, with an initial velocity of –40 m/s.
, 68.1 0.25
t zero tan 1 (40) 3.470239 s
9.81(0.25) 68.1(9.81)
Therefore, for t = 2, we can use Eq. (2) to compute
68.1(9.81) 9.81(0.25) 0.25 m
v tan (2) tan 1 ( 40) 14.8093
0.25 68.1 68.1(9.81) s
For t = 4, the jumper is now heading downward and Eq. (3) applies
68.1(9.81) 9.81(0.25) m
v tanh (4 3.470239) 5.17952
0.25 68.1 s
The same equation is then used to compute the remaining values. The results for the entire calculation are
summarized in the following table and plot:
t (s) v (m/s)
0 -40
2 -14.8093
3.470239 0
4 5.17952
6 23.07118
8 35.98203
10 43.69242
12 47.78758
60
40
20
0
-20 0 4 8 12
-40