Download as pdf
Download as pdf
You are on page 1of 6
PROBLEMS. PROBLEMS 131 Ox? 42.2 J Determine the real roots of f(x) = (a) Graphically (b) Using the quadratie formula, (6) Using three iterations of the bisection method to determine the highest root. Employ initial guesses of xj =5 and ay = 10. Compute the estimated error é, and the true ermore; after each iteration. 5.2 Deterinine the real roots of fix) (a) Graphically. (b) Using bisection to locate the lowest root. Employ initial guesses of x =0 and x= 1 and iterate until the estimated error falls below a level of €, = 10% 5.3 Determine the real roots of f(x) = —26 + 82.31 — 88 ASAx — 9x4 + 0.6535 (@) Graphically (b) Using bisection to determine the highest root w 2, = 10%. Employ initial guesses of xy = 0.5 and x, = 1.0 (©) Perform the same computation as in (b) but use the Zalse- position method and e, = 0.15% Sat Determine the real roots of f(x (a) Graphically (b) Using the false-position method with a value of 6, corre- sponding to three significant figures to determine the lowest 10 85 Locate the first nontrivial root of sin «=. where x is in radians, Use a graphical technique and bisection with the initial imerval from 0.5 |, Perform the computation until ¢, is less than #6, = 2%. Also perform an error check by substituting your final ‘answer into the original equation, 5.6 Determine the real ro! of In. (a) Graphically (b) Using three iterations of the bisection method, with initial guesses of x = 05 and x, = 2. (©) Using three iterations of the false-position method, with the sate initial guesses as in (b) 8.7 Determine the real root of fix) = (0.9 = Ota)/x (a) Analytically. (b) Graphically (e) Using three iterations of the false-position method and initial guesses of 1 and 3, Compute the approximate error ¢, and the tue error ¢; after euch iteration. 58 Find the postive square root of 15 using the False-posi method to within e, = 0.5%. Employ initial guesses of x) = 4. ‘5.9 Find the smallest positive root of the function (x isin radians) '|sin | =5 using the fase-position method. To locate the region in which the root lies first plot this funetion for values of 247-52 +68 On: between 0 and 5, Perform the computation until ¢, falls below 6, = 1%. Check your final answer by substituting it into the origi- nal function 5.10 Find the positive real root of fix) = x4 — 8x’ — 36x + 462x — 1010) using the false-position method. Use a plot to make your intial ‘guess, and perform the computation to within e, = 1.0%, AL Deterinine the real root of x9 = 79; (a) Analytically (b) With the false-position method to within s, = 0.1%, Use initial guesses of 3.0 and 4.0, The velocity » ofa falling para th ewinny where ¢=9.8. For a parachutist with @ drag coetficient c= 14 kg/S, compute the mass m so that the velocity is » = 35 mis at 17s, Use the false-position method to determine m to/a level of 5 = 0.14% 5.13 The saturation concentration of dissolved oxygen in freshwva ter can be calculated withthe equation (APH, 1992) 75701 x 10° z, 6.642308 x 10" | 1.243800 x 10" 8.621049 x 10" a ‘where 0,7 = the saturation concentration of dissolved oxygen in freshwater at I stm (mg/L) and Z, = absolute temperature (K), Remember that T,= + 273.15, where T= temperature (°C) According to this equation, saturation deezeases with increasing temperature. For typical natural waters in temperate climates, the equation can be used to determine that oxygen concentration ranges from 14.621 mg/L at 0°C to 6.949 mail. at 35°C, Given a valuc of oxygen concentration, this formula and the bisection method can he used to solve for temperature in °C. (a) Ifthe initial guesses are set as 0 and 35°C, how many biseetion iterations would be required to determine temperature ro an ab- solute error of 0.05°C? (b) Based on (a), develop and test a Disection program to deter nine Tusa function of« given oxygen eonceatation. Test your program for oy = 8, 10, and 14 mg/L. Check your results. 4 Integrate the algorithm outlined in Fig. 5.10 int a complete, user fiendly bisection subprogram. Among other things (a) Place documentation statements throughout the subprograum to identify what each section is intended to accomplish (b) Label the input and output. ‘nutistis given by em © 1 139.3441 + PROBLEMS ze s 157 Solution, First compute the partial derivatives and evaluate them at the initial guesses of rand y au dug = = Ls ax a ADyonwiip vp cue So = 14 Oxy = 1+ 6(1.5)8.5) ax ay Thus, the determinant of the Jacobian for the first iteration is 6.5(32.5) — 1.5(36.75) 56.125 The Values of the functions can be evaluated at the initial guesses as uy = (1.5) +1.5(3.5) — 10 = -2.5 ty = 3.5 +3(1.5)(3.5)° — 57 625 These values can be substituted into Eq. (6.21) to give xei5e 2.5(32.5) — 1.625(1.5) 03603 156.125 35 — 1:625(6.5) 2.5)36.75) _ > srg 156.125 Thus, the results are converging to the true values of x= 2 and y = 3. The computation can be repeated until an acceptable accuracy is obtained, Just as with fixed-point iteration, the Newton-Raphson approach will often diverge if PROBLEMS 6.1 Use simple fixed-point iteration to locate the root of f(x) = sini Je) — x Use an initial guess of xp 6.2 Use (a) fixed-point iteration and (b) the Newton-Raphson ‘method to determine a root of f(x) 0 =5. Perform the computation until 6, is less than 2; = 0.01%, 5 and iterate until 2, 0.01%. the initial guesses are not sufficiently close to the true roots. Whereas graphical methods, could be employed to derive good guesses for the single-equation case, no such simple pro- cedure is available for the multiequation version. Although there are some advanced ap- proaches for obtaining acceptable first estimates, often the initial guesses must be obtained ‘on the basis of trial and error and knowledge of the physical system being modeled The two-equation Newton-Raphson approach can be generalized to solve n simulta~ cous equations, Because the most efficient way to do this involves matrix algebra and the solution of simultaneous linear equations, we will defer discussion of the general approach to Part Three, 6.3 Determine the real roots of fix) = —2.0-+ 6x — 4x? + 0.5r" (@) graphically and (b) using the Newton-Raphson method to within e, = 0.01%. 6.4 Employ the Newion-Raphson method to determine a real root for f(x) = ~2.0 + Gx ~ 4x? + 0.x” using initial guesses of (a) 4.2 and (b) 4.43, Discuss and use graphical and analytical methods to explain any peculiatties in your results. 09x? + 17x using Also perform an error check of your final answer. 158 OPEN METHODS 65 Determine the Iowest real root of fx) =—11 = 22x + 172 ~ 2.Sx* (a) graphically and (b) using the secant method to a value of ¢, corresponding 1o three significant figures, 6.6 Locate the first positive root of fix) =Sin.x + cost +27) — where + i in radians. Use four iterations of the secant method with initial guesses of (a) t= 1.0 und 3; = 3.0, and (b) sj) = 1.5 ‘and 3; = 2.5, to locate the root. (¢) Use the graphical method to ex- plain your results 6.7 Determine the real root of x 79, with the modified secant method to within 6, = 0.1%. Try different values of 8 and discuss. your results. 6.8 Determine the highest real root of f(x) — 6P + Aly — 6.4 (a) Graphically. (b) Using the Newion-Raphson method (three iterations, x; = 3.5) (e) Using the secant method (three iterations, | =25 and x= 35). (d) Using the modified seeam method (three iterations, 1 = 3.5, = 0.02). 69 Determine the lowest positive root of fx) =7 sinwje® = 12 (a) Graphically (b) Using the Newton-Raphson method (three iterations, 1) = 0.3). (e) Using the secant method (three iterations, 5 and y= 04). = (a) Using the modified secant method (five iterations, 1 =05. 5 = 0.03) 6.10 The function x° + 2x? ~ Se-4-4 has a double root at x Use (a) the standard Newton-Raphson (Eq. (6.6)} (b) the modified. Newton-Raphson (Eq, (6.94)}, and (e) the modified Newton- Raphson (Eq, (6.13)] to solve for the root at x= 1. Compare and discuss the rate of convergence using x) 0. 6.L1 Determine the roots of the following simultaneous nonlinear ‘equations using (a) fixed-point iteration and (b) the Newton-Raph- son methoul xaytr—05 yaw? Sry Employ initial guesses of x = y = 1,0 and discuss the results. 6.12 Determine the roots of the simultaneous nonlinear equations w= HO) 16 ey Use a graphical approach to obtain your initial guesses. Determine refined estimates with the two-equation Newton-Raphson method described in See. 6.5.2. 13. Repeat Prob. 6.12 execpt for 6.14 A mass balance for a pollutant in a well-mixed lake can be written as W— Qc—AV. Given the parameter values 1x 10° mm, Q=1 x 10° wr W= 1 x 10° giyz, and k = 0.2 mg", use the modified secant method to solve for the steady-state concentration, Employ an initial guess of c= 4 g/m? and an 3 = 0.5. Perform two iterations and determine the percent relative crror alter the second iteration. 6.15 For Prob. 6.14, the root can be located with fixed-point iteration as (ae) ve Q Only one will work all the time for initial guesses of ¢> 1. Select the correct one and demonstrate why it will always work. 6.16 Develop a user-friendly subprogeam for the Newton-Raphson method based on Fig, 6.4 and Sec. 6.2.3, Test it by duplicating the computation from Example 6.3 6.417 Develop a user-friendly Subprogram for the secant method based on Fig. 6.4 and Sec. 6.3.2. Test it by duplicating the compu- tation from Example 6.6, 6.18 Develop a user-friendly subprogram for the modified secant rmcthod based on Fig. 6.4 and Sec. 6.3.2. Test it by duplicating the computation front Example 6.8. 6.19 Develop a user-iriendly. subprogram for the two-equation fewton-Raphson method based on Sec. 6.5. Test it by solving Example 6.10. 6.20 Use the subprogram you developed in Prob. 6.19 to solve Probs, 6.11 and 6.12 to within a tolerance ote, = 0.01%, 6.21 The “divide and average” method, an old-time method forap- proximating the square coot of any positive number a, can be for- mulated as Prove that this is equivalent to the Newton-Raphson algorithm. PROBLEMS. PROBLEMS 135 A Divide a polynomial see) by the monomial factor x — 2. Ix 7.2 Divide a polynomial fee) by the monomial factor ¥ — 2. Hox $0 2 Pe $12 7.3 Use Miller's method to determine the positive real root of @) fn ar—4 (b) flay =) - 052 + 4x -2 7.4 Use Milller’s method to determine the real and complex roots oF ) fis) =x — (b) fey = 24 + +8 (o) fla) = a4 = 20 + 6? = 2 +5 7.5 Use Bairstow’s method to determine the roots of (a) fis) =2 46.24 40.78 (b) fo) = 9.34 ~ 21.978 + 16.3% (©) fa) == 20 + Ge = 2 +5 7.6 Develop « subprogram to implement Milller’s method. Test it by duplicating Example 7.2 7.7. Use the suhprogram developed in Prob. 7.6 t0 determine the real roots of Prob. 7.4a, Construct a graph (by hand or with Excel for some other graphics package) to develop suitable starting guesses. 7.8 Develop « subprogram to implement Bairstow's method. Test iby duplicating Example 7.3. 7.9 Use the subprogram developed in Prob, 7.8 to determine the roots of the equations in Prob. 7.5, 7.10 Determine the real soot of °=79 with the Goal Seek capability of Excel or a library or package of your choice TAL The velocity of a falling parachutist w is given by 04 where g=9.8 mis*, For a parachutist with a drag coefficient «= 14 ka/s, compute the mass m so that the velocity is.» = 35 mis at 7's, Use the Goal Seek capability of Excel ora library or pack- age of your choice to determine m, 7.12 Determine the roots of the simultaneous nonlinear equa- Employ initial guesses of x = y = 1.2 and use the Solver tool from Excel or a library or package of your choice. 7.13 Determine the roots of the simultaneous nonlinear equations ye Use graphical approach to obtain your initial guesses. Determine refined estimates with the Solver tool from Excel or a library or package of your choice. 7.14 Perform the identical MATLAB operations as. those in Example 7.7 or use a library or package af your choice to find all the roots ofthe polynomial (2) = (+ DEE Oe = Te + 4)" — 8) 7.15 Use MATLAB or a library or package of your choice 10 determine the roots for the equations in Prob. 7.5. 7.16 Develop a subprogram to solve for the roots of a polynomial using the IMSL routine, ZREAL or a library or package of your choice. Test it by determining the roots of the equations from Probs. 7A and 75, 7.17 A two-dimensional circular cylinder is placed in a high-speed. uniform flow, Vortices shed from the cylinder at a constant fre= quency, ancl pressure sensors on the rear surface of the cylinder de. tect this frequency by calculating how often the pressure oscillites, Given three data points, use Miller's Method to find the time where the pressure was zero. 7.18 When trying to find the acidity of a solution of magnesium hydroxide in hydrochloric acid, we obtain the following equation AQ) = 2+ 3.60 —364 where. is the hydronium ion concentration. Find the hydronium jon concentration for a saturated solution (acidity equals zero) using 1wo different methods in MATLAB (for example, graphically and roots function). 7.19 Consider the following system with three unknowns a, #, und 2a-u=0 Solve for the unknowns using (a) The Excel Solver (b) A symbolic manipulator software package 7.20 In control systems analysis. transfer funetions are developed that mathematically relate the dynamics of a system's input to its PROBLEMS 203 ‘Thus, using the above results and Fig. 8.10. itis found that the proposed car desiga will behave ueceptubly for common drivi speeds. AC this point, the designer must be aware that the design would not meet suitability requirements at extremely high speeds (for ex- ample, racing). This design problem has presented an extremely simple example that has allowed us to obtain some analyti al results that were used to evaluate the accuracy of our numerical methods for finding roots. Real cases can quickly become so complicated that solutions can be obtained only by using numerical methods. PROBLEMS ‘Chemical/Bio Engineering 8.1 Perform the same computation as in Sec. 8.1, but for ethyl al- cohol (a = 12.02 and b = 0.08407) at a temperature of 375 K and pof20 atm. Compare your results with the ideal gas law. If possi ble, use your computer software to determine the molal volume, Otherwise, use any of the numerical methods discussed in Chaps. 5 ‘and 6 to perform the computation. Justify your cboice of technique. 8.2 In chemical engineering, plug flow reuctors (that is, those in which fluid flows from one end to the other with minimal mixing along the longitudinal axis) are often used to convert reactants into products, It has been determined that the efficiency of the conver- sion can sometimes be improved by recycling a portion ofthe prod- Ut stream so that it returns to the entrance for an additional pass through the reactor (Fig. P8.2). The recycle rate is defined as volume of fluid returned to entran ‘volume leaving the system ‘Suppose that we are processing a chemical A to generate a product BB. For the case where A forms B according to an autocatalyticre- action (ihat is, in which one of the products acts a8 a catalyst or stimulus forthe reaction, it can be shown that an optimal recycle rate must satisfy Lt RU =X) R41 "TRO = Kal RO FRO Fa) where Xiy=the fraction of reactant A that is converted to prod uct B. The optimal recyele rate corresponds to the minimum-sized reactor needed to attain the desired level of conversion. Use a Figure P8.2 Schematic tepreseriation of 6 plug flow re ctor with recy Food ———>-| Plug flow reactor Product numerical method 1o determine the recycle rativs needed to mini- mize reactor size for a fractional conversion of X4y= 0.9. 8.3 Inachemical engineering process, water vapor (H:0) is heated to sufficiently high temperatures that a significant portion of the ‘water dissociates, or splits apart, to form oxygen (2) and hydrogen (Hy) itis assumed that this is the only reaction involved, the mole frac- tion x of HyO that dissociates can he represented by [2e. (P83) eV 245 where K =the reaction equilibrium constant and’ p,= the total pressure of the mixture. Ifp,=3 atm and K = 0.05, determine the value of x that satisfies Eq. (P83). 8.4 The following equation pertains to the concentration of a chemical in a completely mixed reactor: 80) 4 ¢yerD08" c= ole and the inflow concentration If the initial concentration cy 6 = 10, compute the time required for ¢ 19 be 93 percent of cis 8.5 Areversible chemical reaction 2A+BSC can be characterized by the equilibrium relationship where the nomenclature ¢, represents the concentration of con- stituent N. Suppose that we define a variable x as representing the ‘umber of moles cf C that are produced, Conservation of mass ean ‘be used to reformulate the equilibrium relationship as ate) K (x0 2G 9) where the subscript 0 de constituent. If K = 0.01 pute x. ignates the initial concentration of each €20= 42, eno = 30, and ce 262 GAUSS ELIMINATION [a}ra} (Cl (6) [B] x [AT (9) (by @ 1A] x [C1 aD) 1/1 x [8] 9.3 Three matrices are defined as Pe 6 0 ta wi=|3 0) mi=[} ‘lie lege) = (a) Perform all possible muiplications that can be computed be- tween pars ofthese matrices {h) Use the method in Box PTS.2 wo justly why the remaining pairs cannot be multiplied. (©) Use the results of (a to illustrate why the onder of mukiphiae sions important ical method tosave Check your results hy substituting them baek into the equations. 95 Given the system of equation: 077s) Hay = 14.25 Loxy + L.7x2 = 20 (a) Solve graphically, (b) On the basis af the graphical solution, what do you expect re- ssirding the eondition of the system? (6) Solve by the elimination of unknowns. 9.6 For the set of equations 2y $55 3m +t =2 (a) Compute the determinant. (b) Use Cramer's rule to solve for the x's (c) Substitute your results back into the original equation to check our results 9.7. Given the equations 05x) — 0.26%, -95 05x: ==4.7 (a) Solve graphically (b) After scaling, compute the determinant. (©) On the basis of (a) and (b), what would you expect regarding, the system's condition? (d) Solve by the elimination of unknowns. (©) Solve again, but with ay; modified slightly to 0.55. Interpret your results in light of the discussion of ill-conditioning in See. 9.3.3, 9.8 Given the system (a) Solve by naive Gauss elimination, Show all steps of the com- putation. (b) Substitute your results into the original equation to check your answers, 9.9 Use Gauss elimination to solve: anti —e Sx bas $2u Ox tute Employ partial pivoting and check your answers by substituting them into the original equations. 9.10, Use Gauss-lordan elimination to solve: yy pay Sx; $20 426 3x) bas te Employ partial pivoting. Check your answers by substituting them into the original equations. 9.11 Solve sche —3 6xj +2 +2 Buy 4a tay 1 with (a) naive Gauss elimination, (b) Gauss elimination with par tial pivoting, (¢) naive Gauss-Jordan, (d) Gauss-Jordan with partial pivoting 9.12 Perform the same computation as in Example 9.11, but use five parachotists with the followin Mass, kg Drag Coefficient, kg/s 12 12 The parachutists have a velocity of 9 avs 9.13 Solve p2 ael-t

You might also like