Solutions Manualk
to kaccompany
Applied Numerical Methods
k k
With MATLAB for Engineers and Scientists
k k k k k
,Steven kC. kChapra
Tufts kUniversity
,CHAPTER k1
1.1 You kare kgiven kthe kfollowing kdifferential kequation kwith kthe kinitial kcondition, kv(t k= k0) k= k0,
dv k cd
k g k k k
vk2
dt m
Multiply kboth ksides kby km/cd
m k dv m k g k kv k2
k
c
cd k k dt d
Define k a k mg / cd
m k dv k
ka k2 k kvk2
cd k k dt
Integrate kby kseparation kof kvariables,
dv cd k
kak k kvk kmk
k
2 2
dt
A ktable kof kintegrals kcan kbe kconsulted kto kfind kthat
dx 1k x
k tanh1 k
kak k kxk
2 2
a a
Therefore, kthe kintegration kyields
1k vk c
tanh k1 k k d k
t k kC
a a m
If kv k= k0 kat kt k= k0, kthen kbecause ktanh–1(0) k= k0, kthe kconstant kof kintegration kC k= k0
kand kthe ksolution kis
1k vk c
tanh k1 k k d k
t
a a m
This kresult kcan kthen kbe krearranged kto kyield
gm gc
v k tanh d
t
m
cd
1.2 This kis ka ktransient kcomputation. kFor kthe kperiod kfrom kending kJune k1:
1
, Balance k= kPrevious kBalance k+ kDeposits k–
kWithdrawals kBalance k= k1512.33 k+ k220.13 k–
k327.26 k= k1405.20
The kbalances kfor kthe kremainder kof kthe kperiods kcan kbe kcomputed kin ka ksimilar kfashion
kas ktabulated kbelow:
Date Deposit Withdrawal Balance
1-May $
k 1512.33
$ k 220.13 $ k 327.26
1-Jun $
k 1405.20
$ k 216.80 $ k 378.61
1-Jul $
k 1243.39
$ k 350.25 $ k 106.80
1-Aug $
k 1586.84
$ k 127.31 $ k 450.61
1-Sep $
k 1363.54
1.3 At kt k= k12 ks, kthe kanalytical ksolution kis k50.6175 k(Example k1.1). kThe knumerical kresults kare:
absolute
step v(12) krelative
kerror
2 51.6008 1.94%
1 51.2008 1.15%
0.5 50.9259 0.61%
where kthe krelative kerror kis kcalculated kwith
analytical numerical
absolute krelative kerror k 100%
analytical
The kerror kversus kstep ksize kcan kbe kplotted kas
2.0%
1.0%
relative error
0.0%
0 0.5 1 1.5 2 2.5
2
to kaccompany
Applied Numerical Methods
k k
With MATLAB for Engineers and Scientists
k k k k k
,Steven kC. kChapra
Tufts kUniversity
,CHAPTER k1
1.1 You kare kgiven kthe kfollowing kdifferential kequation kwith kthe kinitial kcondition, kv(t k= k0) k= k0,
dv k cd
k g k k k
vk2
dt m
Multiply kboth ksides kby km/cd
m k dv m k g k kv k2
k
c
cd k k dt d
Define k a k mg / cd
m k dv k
ka k2 k kvk2
cd k k dt
Integrate kby kseparation kof kvariables,
dv cd k
kak k kvk kmk
k
2 2
dt
A ktable kof kintegrals kcan kbe kconsulted kto kfind kthat
dx 1k x
k tanh1 k
kak k kxk
2 2
a a
Therefore, kthe kintegration kyields
1k vk c
tanh k1 k k d k
t k kC
a a m
If kv k= k0 kat kt k= k0, kthen kbecause ktanh–1(0) k= k0, kthe kconstant kof kintegration kC k= k0
kand kthe ksolution kis
1k vk c
tanh k1 k k d k
t
a a m
This kresult kcan kthen kbe krearranged kto kyield
gm gc
v k tanh d
t
m
cd
1.2 This kis ka ktransient kcomputation. kFor kthe kperiod kfrom kending kJune k1:
1
, Balance k= kPrevious kBalance k+ kDeposits k–
kWithdrawals kBalance k= k1512.33 k+ k220.13 k–
k327.26 k= k1405.20
The kbalances kfor kthe kremainder kof kthe kperiods kcan kbe kcomputed kin ka ksimilar kfashion
kas ktabulated kbelow:
Date Deposit Withdrawal Balance
1-May $
k 1512.33
$ k 220.13 $ k 327.26
1-Jun $
k 1405.20
$ k 216.80 $ k 378.61
1-Jul $
k 1243.39
$ k 350.25 $ k 106.80
1-Aug $
k 1586.84
$ k 127.31 $ k 450.61
1-Sep $
k 1363.54
1.3 At kt k= k12 ks, kthe kanalytical ksolution kis k50.6175 k(Example k1.1). kThe knumerical kresults kare:
absolute
step v(12) krelative
kerror
2 51.6008 1.94%
1 51.2008 1.15%
0.5 50.9259 0.61%
where kthe krelative kerror kis kcalculated kwith
analytical numerical
absolute krelative kerror k 100%
analytical
The kerror kversus kstep ksize kcan kbe kplotted kas
2.0%
1.0%
relative error
0.0%
0 0.5 1 1.5 2 2.5
2