M M M M
SOLUTIONS
, SOLUTION MANUAL M
NUMERICAL AND ANALYTICAL METHODS WITH
M M M M
MATLAB
Table of Contents
M M
Page
ChapterM2 1
ChapterM3 46
ChapterM4 58
ChapterM5 98
ChapterM6 107
ChapterM7 176
ChapterM8 180
ChapterM9 188
ChapterM10 214
ChapterM11 271
ChapterM12 303
ChapterM13 309
ChapterM14 339
@
@SS
eeisis
mmiciicsis
oolala
titoionn
, CHAPTERM2
P2.1.MTaylorMseriesMexpansionMofM fM(Mx)M aboutMxM=M0Mis:
fM'M'M( 2 fM'M'M'M( 3 fM1 4
fM(Mx)MM fM(0)MM fM'M(0 xM x M V xM M...
)MxM 0)M 0)M3
4!
2! !
For fM(Mx)MMcosM(M fM(0)MM1,
x)M,
fM(Mx)MMMsin(Mx),M fM'M(0)MM0,
fM'M'M(Mx)MM cos(Mx),M fM'M'M(0)MMM1,
fM'M'M'M(Mx)MM Msin(Mx),M fM'M'M'M(0)MM0,
fM1VM(Mx)MMMcos(Mx),M fM1VM(0)MM1
WeMcanMseeMthat
x x4
2 M xM6 8
cos(Mx)M1MM xM MMM
4! 6! ...M8!
M
2!
andMthat
xM2
termM(k)MMMtermM(kMM
1)M 2MkM(2MkM
1)
TheMfollowingMprogramMevaluatesM cos(Mx)MbyMbothManMarithmeticMstatementMandMbyMt
heMaboveMseriesMforM-πM≤MxM≤MπMinMstepMofM0.1MM.
%Mcosf.m
%MThisMprogramMevaluatesMcos(x)MbyMbothMarithmeticMstatementMandMby
%MseriesMforM-πM≤MxM≤MπM inMstepsMofM0.1Mπ
clear;Mclc;
xi=-
pi;Mdx=0.1*pi;MforMj=
@ 1iciicsisoolalatitoionn
@SSeeisismm
, 1:21
x(j)=xi+(j-1)*dx;
cos_arith(j)=Mcos(x(j));
@ 2iciicsisoolalatitoionn
@SSeeisismm