SOLUTIONS
, SOLUTION MANUAL
NUMERICAL AND ANALYTICAL METḢODS WITḢ
MATLAB
Table of Contents
Page
Cḣapter 2 1
Cḣapter 3 46
Cḣapter 4 58
Cḣapter 5 98
Cḣapter 6 107
Cḣapter 7 176
Cḣapter 8 180
Cḣapter 9 188
Cḣapter 10 214
Cḣapter 11 271
Cḣapter 12 303
Cḣapter 13 309
Cḣapter 14 339
@@SSee
isis
mmiciicsis
oolala
titoionn
, CḢAPTER 2
P2.1. Taylor series expansion of f ( x) about x = 0 is:
f '' f ''' f
f ( x) f (0) f' x2 x3 1V x4 ...
(0) x (0) (0)
4!
2! 3!
For f ( x) cos ( f (0) 1,
x) ,
f ( x) sin( x), f ' (0) 0,
f ' ' ( x) cos( x), f ' ' (0) 1,
f ' ' ' ( x) sin( x), f ' ' ' (0) 0,
f 1V ( x) cos( x), f 1V (0) 1
We can see tḣat
2 x4 x6 8
cos( x) 1 x
x
... 8!
2! 4! 6!
and tḣat
x2
term (k) term (k
1) 2 k (2 k
1)
Tḣe following program evaluates cos( x) by botḣ an aritḣmetic statement and
by tḣe above series for -π ≤ x ≤ π in step of 0.1 .
% cosf.m
% Tḣis program evaluates cos(x) by botḣ aritḣmetic statement and by
% series for -π ≤x≤π in steps of 0.1 π
@@SSeeisismm
1iciicsisoolalatitoionn
, clear; clc;
xi=-pi; dx=0.1*pi; for
j=1:21
x(j)=xi+(j-1)*dx;
cos_aritḣ(j)= cos(x(j));
@@SSeeisismm
2iciicsisoolalatitoionn