Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 558 pages
Exam (elaborations)

Solution Manual for Numerical Methods for Engineers 8th Edition by Chapra

Document preview thumbnail
Preview 4 out of 558 pages

Complete Solutions Manual - Numerical Methods for Engineers (8th Edition) by Steven C. Chapra and Raymond P. Canale. This comprehensive instructor's solution manual provides fully worked-out solutions to all end-of-chapter problems, including programming exercises in VBA, Fortran 90, MATLAB, and Excel applications.

Content preview

Allg31gChaptersgCover
ed




SOLUTIONgMANUAL

,CHAPTERg2
2.1
IFg xg <g 10g THEN
gIFg xg <g 5g TH
EN
xg =g 5gE
LSE
PRINTg x
gENDg IF
ELSE
DO
IFg xg <g 50g EXIT
xg =g xg -
g 5gENDg DO
ENDg IF

2.2
Stepg1:gStart
Stepg2:gInitializegsumgandgcountgtogzer
ogStepg3:gExaminegtopgcard.
Stepg4:gIfgitgsaysg“endgofgdata”gproceedgtogstepg9;gotherwise,gproceedgtognext
gstep.gStepg5:gAddgvaluegfromgtopgcardgtogsum.
Stepg6:gIncreasegcountgby
g1.gStepg7:gDiscardgtopgc
ardgStepg8:gReturngtogSte
pg3.
Stepg9:gIsgthegcountggreatergthangzero?
Ifgyes,gproceedgtogstepg1
0.gIfgno,gproceedgtogste
pg11.
Stepg10:gCalculategaverageg=gsum/count
Stepg11:gEnd

2.3
start


sumg=g0
countg=g
0



ggT
countg>g
INPUT 0
value
F
averageg=gsum/coun
t
valueg=g “ T
endgofgdata”


F end
sumg=gsumg+gval
ueg countg=gcoun
tg+g1

,2.4
Studentsgcouldgimplementgthegsubprogramginganygnumbergofglanguages.gThegfollowing
g Fortrang90gprogramgisgonegexample.gItgshouldgbegnotedgthatgthegavailabilitygofgcomp
lexgvariablesgingFortrang90,gwouldgallowgthisgsubroutinegtogbegmadegevengmoregconcis
e.g However,gwegdidgnotgexploitgthisgfeature,gingordergtogmakegthegcodegmoregcompat
iblegwithgVisualgBASIC,gMATLAB,getc.

PROGRAMg Rootfind
g IMPLICITg NONEg I
NTEGER::ier
REAL::a,g b,g c,g r1,g i1,g r2,g i2
DATAg a,b,c/1.,5.,2./
CALLg Roots(a,g b,g c,g ier,g r1,g i1,g r2,g
i2)g IFg (ierg .EQ.g 0)g THEN
PRINTg *,g r1,i1,"g i"
PRINTg *,g r2,i2,"g i"
g ELSE
PRINTg *,g "Nog roots"
g ENDg IF
END

SUBROUTINEg Roots(a,g b,g c,g ier,g r1,g i1,g r2,g i2)g IMP
LICITg NONE
INTEGER::ier
REAL::a,gb,gc,gd,gr1,gi1,gr2,gi2
g r1=0.
r2=0.
g i1=
0.g i
2=0.
IFg (ag .EQ.g 0.)g TH
ENg IFg (bg <>g 0)g
THEN
r1g =g -
c/bg ELSE
ierg =g 1g
ENDg IF
ELSE
dg =g b**2g -
g 4.*a*cg IFg (dg >
=g 0)g THEN
r1g =g (-bg +g SQRT(d))/(2*a)
r2g =g (-bg -
g SQRT(d))/(2*a)g ELSE
r1g =g -
b/(2*a)g r2g =g
r1
i1g =g SQRT(ABS(d))/(2*a)
i2g =g -
i1g ENDg IF
ENDg IF
g END


Theganswersgforgtheg3gtestgcasesgare:g(a)g0.438,g-
4.56;g(b)g0.5;g(c)g1.25g+g2.33i;g1.25g
2.33i.

Severalgfeaturesgofgthisgsubroutinegbeargmention:
 Thegsubroutinegdoesgnotginvolveginputgorgoutput.gRather,ginformationgisgpassedging
andgoutgviagthegarguments.gThisgisgoftengthegpreferredgstyle,gbecausegthegI/Ogisgle
ftgtogtheg discretiongofgthegprogrammergwithingthegcallinggprogram.
 Notegthatgangerrorgcodegisgpassedg(IERg=g1)gforgthegcasegwheregnogrootsgaregpossible.

, 2.5gThegdevelopmentgofgthegalgorithmghingesgongrecognizinggthatgthegseriesgapproximation
gofgthegsinegcangbegrepresentedgconciselygbygthegsummation,

n
xg2ig1
g
g (2igg1)!
i1


whereg ig =g theg orderg ofg theg approximation.g Theg followingg algorithmg implementsg
thisgsummation:

Stepg1:gStart
Stepg2:gInputgvaluegtogbegevaluatedgxgandgmaximumgor
dergngStepg3:gSetgorderg(i)gequalgtogone
Stepg4:gSetgaccumulatorgforgapproximationg(approx)gtogzer
og Stepg5:gSetgaccumulatorgforgfactorialgproductg(fact)gequ
algtogonegStepg6:gCalculategtruegvaluegofgsin(x)
Stepg7:gIfgordergisggreatergthangngthengproceedgtog
stepg13gOtherwise,gproceedgtognextgstep
Stepg8:gCalculategthegapproximationgwithgthegformula
x2i-
approxggapproxgg( i-1
1g fact
1)
or
Stepg9:gDeterminegthegerror
truegapproxg
%errorg 100
 %g
true
Stepg10:gIncrementgthegordergbygone
Stepg11:gDeterminegthegfactorialgforgthegnextgiteration
factorg gfactorgg(2ggigg2)gg(2ggigg1)
Stepg12:gReturngtogstepg7
Stepg13:gEnd

Connected book
 image
Publisher: 2023 ISBN: 9781003813798 Edition: Unknown

Document information

Uploaded on
May 17, 2026
Number of pages
558
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$22.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
PremiumExamBank
4.8
(1055)
Sold
423
Followers
70
Items
6760
Last sold
2 hours ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions