For fluid flow in pipes, friction is described by a di-

1,000,000. Design the function so that it ensures that the ab- solute error in the result is E a,d 0.000005. 5.19 Mechanical engineers, as well as most other engineers, use thermodynamics extensively in their work. The following polynomial can be used to relate the zero-pressure specific heat of dry air c p kJkg K to temperature K: c p = 0.99403 + 1.671 × 10 −4 T + 9.7215 × 10 −8 T 2 −9.5838 × 10 −11 T 3 + 1.9520 × 10 −14 T 4 Develop a plot of c p versus a range of T = 0 to 1200 K, and then use bisection to determine the temperature that corre- sponds to a specific heat of 1.1 kJkg K. 5.20 The upward velocity of a rocket can be computed by the following formula: v = u ln m m − qt − gt where v = upward velocity, u = the velocity at which fuel is expelled relative to the rocket, m = the initial mass of the rocket at time t = 0, q = the fuel consumption rate, and g = the downward acceleration of gravity assumed constant = 9.81 ms 2 . If u = 1800 ms, m = 160,000 kg, and q = 2600 kgs, compute the time at which v = 750 ms. Hint: t is somewhere between 10 and 50 s. Determine your result so that it is within 1 of the true value. Check your answer. 5.21 Although we did not mention it in Sec. 5.6, Eq. 5.13 is an expression of electroneutrality—that is, that positive and negative charges must balance. This can be seen more clearly by expressing it as [H + ] = [HCO − 3 ] + 2[CO 2− 3 ] + [OH − ] In other words, the positive charges must equal the negative charges. Thus, when you compute the pH of a natural water body such as a lake, you must also account for other ions that may be present. For the case where these ions originate from nonreactive salts, the net negative minus positive charges due to these ions are lumped together in a quantity called alkalin- ity, and the equation is reformulated as Alk + [H + ] = [HCO − 3 ] + 2[CO 2− 3 ] + [OH − ] P5.21 where Alk = alkalinity eqL. For example, the alkalinity of Lake Superior is approximately 0.4 × 10 –3 eqL. Perform the same calculations as in Sec. 5.6 to compute the pH of Lake Superior in 2008. Assume that just like the raindrops, the lake is in equilibrium with atmospheric CO 2 but account for the alkalinity as in Eq. P5.21. 5.22 According to Archimedes’ principle, the buoyancy force is equal to the weight of fluid displaced by the submerged portion of the object. For the sphere depicted in Fig. P5.22, use bisection to determine the height, h, of the portion that is above water. Employ the following values for your computa- tion: r = 1 m, ρ s = density of sphere = 200 kgm 3 , and ρ w = density of water = 1,000 kgm 3 . Note that the volume of the above-water portion of the sphere can be computed with V = π h 2 3 3r − h

5.23 Perform the same computation as in Prob. 5.22, but for

the frustrum of a cone as depicted in Fig. P5.23. Employ the following values for your computation: r 1 = 0.5 m, r 2 = 1 m, h = 1 m, ρ f = frustrum density = 200 kgm 3 , and ρ w = water density = 1,000 kgm 3 . Note that the volume of a frustrum is given by V = π h 3 r 2 1 + r 2 2 + r 1 r 2 h r FIGURE P5.22 h 1 h r 2 r 1 FIGURE P5.23 151 6 Roots: Open Methods CHAPTER OBJECTIVES The primary objective of this chapter is to acquaint you with open methods for finding the root of a single nonlinear equation. Specific objectives and topics covered are • Recognizing the difference between bracketing and open methods for root location. • Understanding the fixed-point iteration method and how you can evaluate its convergence characteristics. • Knowing how to solve a roots problem with the Newton-Raphson method and appreciating the concept of quadratic convergence. • Knowing how to implement both the secant and the modified secant methods. • Understanding how Brent’s method combines reliable bracketing methods with fast open methods to locate roots in a robust and efficient manner. • Knowing how to use MATLAB’s fzero function to estimate roots. • Learning how to manipulate and determine the roots of polynomials with MATLAB. F or the bracketing methods in Chap. 5, the root is located within an interval prescribed by a lower and an upper bound. Repeated application of these methods always results in closer estimates of the true value of the root. Such methods are said to be conver- gent because they move closer to the truth as the computation progresses Fig. 6.1a. In contrast, the open methods described in this chapter require only a single starting value or two starting values that do not necessarily bracket the root. As such, they some- times diverge or move away from the true root as the computation progresses Fig. 6.1b. However, when the open methods converge Fig. 6.1c they usually do so much more quickly than the bracketing methods. We will begin our discussion of open techniques with a simple approach that is useful for illustrating their general form and also for demonstrat- ing the concept of convergence.