Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 4 fuera de 558 páginas
Examen

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

Document preview thumbnail
Vista previa 4 fuera de 558 páginas

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.

Vista previa del contenido

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

Libro relacionado
 image
Editorial: 2023 ISBN: 9781003813798 Edición: Desconocido

Información del documento

Subido en
17 de mayo de 2026
Número de páginas
558
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$22.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
PremiumExamBank
4.8
(1055)
Vendido
423
Seguidores
70
Artículos
6760
Última venta
5 horas hace


Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes