New Semester
Started
Get
50% OFF
Study Help!
--h --m --s
Claim Now
Question Answers
Textbooks
Find textbooks, questions and answers
Oops, something went wrong!
Change your search query and then try again
S
Books
FREE
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Tutors
Online Tutors
Find a Tutor
Hire a Tutor
Become a Tutor
AI Tutor
AI Study Planner
NEW
Sell Books
Search
Search
Sign In
Register
study help
mathematics
applied numerical methods
Applied Numerical Methods With MATLAB For Engineers And Scientists 3rd Edition Steven C. Chapra - Solutions
Given (a) Estimate the step size required to maintain stability using the explicit Euler method.(b) If y(0) = 0, use the implicit Euler to obtain a solution from t = 0 to 2 using a step size of 0.1. dy dt -100,000y + 99,999e-¹
Develop an M-file to solve a single ODE with the midpoint method. Design the M-file so that it creates a plot of the results. Test your program by using it to solve for population as described in Prob. 22.5. Employ a step size of 5 years.Data From Problem 22.5Although the model in Prob. 22.4 works
Evaluate ∂f/∂x, ∂f / ∂y, and ∂f(∂ x ∂y) for the following function at x = y = 1 (a) Analytically and (b) Numerically Δx = Δy = 0.0001:f(x, y) = 3xy + 3x − x3 − 3y3
Develop an M-file to solve a single ODE with the fourth-order RK method. Design the M-file so that it creates a plot of the results. Test your program by using it to solve Prob. 22.2. Employ a step size of 0.1.Data From Problem 22.2Solve the following problem over the interval from x = 0 to 1
GivenIf y(0) = 0, use the implicit Euler to obtain a solution from t = 0 to 4 using a step size of 0.4. dy dt = 30(sin ty) + 3 cost
GivenIf x1(0) = x2(0) = 1, obtain a solution from t = 0 to 0.2 using a step size of 0.05 with the (a) Explicit and (b) Implicit Euler methods. dx1 dt dx2 dt = 999x1 + 1999x2 =-1000x₁2000x2 =
Develop an M-file to solve a system of ODEs with Euler’s method. Design the M-file so that it creates a plot of the results. Test your program by using it to solve Prob. 22.7 with a step size of 0.25.Data From Problem 22.7Solve the following pair of ODEs over the interval from t = 0 to 0.4
Solve the following differential equation from t = 0 to 2with the initial condition y(0) = 1. Use the following techniques to obtain your solutions: (a) Analytically, (b) The explicit Euler method, and (c) The implicit Euler method. For (b) and (c) use h = 0.1 and 0.2. Plot your
Repeat Prob. 23.11, but for the nonlinear pendulum described in Prob. 23.10.Data From Problem 23.11Employ the events option described in Section 23.1.2 to determine the period of a 1-m long, linear pendulum (see description in Prob. 23.10). Compute the period for the fol following initial
Use ode45 to integrate the differential equations for the system described in Prob. 23.19. Generate vertically stacked subplots of displacements (top) and velocities (bottom). Employ the fft function to compute the discrete Fourier transform (DFT) of the first mass’s displacement. Generate and
The following matrix is entered in MATLAB:>> A=[3 2 1;0:0.5:1;linspace(6, 8, 3)](a) Write out the resulting matrix.(b) Use colon notation to write a single-line MATLAB command to multiply the second row by the third column and assign the result to the variable C.
Use calculus to solve Eq. (1.21) for the case where the initial velocity is Equation (1.21)(a) Positive and (b) Negative. (c) Based on your results for (a) and (b), perform the same computation as in Example 1.1 but with an initial velocity of –40 m/s. Compute values of the
The following information is available for a bank account:The money earns interest which is computed as Interest = i Bi where i = the interest rate expressed as a fraction per month, and Bi the initial balance at the beginning of the month.(a) Use the conservation of cash to compute the
Repeat Example 1.2. Compute the velocity to t = 12 s, with a step size of (a) 1(b) 0.5 s. Can you make any statement regarding the errors of the calculation based on the results?Example 1.2 Problem Statement. Perform the same computation as in Example 1.1 but use Eq. (1.12) to compute velocity
Use calculus to verify that Eq. (1.9) is a solution of Eq. (1.8) for the initial condition ν(0) = 0.Equation (1.9)Equation (1.8) v(t) = gm Cd tanh 1 P38 gca m
Rather than the nonlinear relationship of Eq. (1.7), you might choose to model the upward force on the bungee jumper as a linear relationship:Equation (1.7)FU = −c′νwhere c′ = a first-order drag coefficient (kg/s).(a) Using calculus, obtain the closed-form solution for the case where the
For the free-falling bungee jumper with linear drag (Prob. 1.5), assume a first jumper is 70 kg and has a drag coefficient of 12 kg/s. If a second jumper has a drag coefficient of 15 kg/s and a mass of 80 kg, how long will it take her to reach the same velocity jumper 1 reached in 9 s?Data From
Figure P1.13 depicts the various ways in which an average man gains and loses water in one day. One liter is ingested as food, and the body metabolically produces 0.3 liters. In breathing air, the exchange is 0.05 liters while inhaling, and 0.4 liters while exhaling over a one-day period. The body
For the second-order drag model (Eq. 1.8), compute the velocity of a free-falling parachutist using Euler’s method for the case where m = 80 kg and cd = 0.25 kg/m. Perform the calculation from t = 0 to 20 s with a step size of 1 s. Use an initial condition that the parachutist has an upward
The amount of a uniformly distributed radioactive contaminant contained in a closed reactor is measured by its concentration c (becquerel/liter or Bq/L). The contaminant decreases at a decay rate proportional to its concentration; that isDecay rate = −kcwhere k is a constant with units of
For the same storage tank described in Prob. 1.9, suppose that the outflow is not constant but rather depends on the depth. For this case, the differential equation for depth can be written as Use Euler’s method to solve for the depth y from t = 0 to 10 d with a step size of 0.5 d. The
A fluid is pumped into the network shown in Fig. P1.16. If Q2 = 0.7, Q3 = 0.5, Q7 = 0.1, and Q8 = 0.3 m3/s, determine the other flows. Q₁ Q10 Q₂ Q3 Qg Q4 Q5 Q8 Q6 Q7
In our example of the free-falling bungee jumper, we assumed that the acceleration due to gravity was a constant value of 9.81 m/s2. Although this is a decent approximation when we are examining falling objects near the surface of the earth, the gravitational force decreases as we move above sea
Suppose that a spherical droplet of liquid evaporates at a rate that is proportional to its surface area.where V = volume (mm3), t = time (min), k = the evaporation rate (mm/min), and A = surface area (mm2). Use Euler’s method to compute the volume of the droplet from t = 0 to 10 min using a step
Use the linspace function to create vectors identical to the following created with colon notation:(a) t = 4:6:35(b) x = -4:2
Use colon notation to create vectors identical to the following created with the linspace function:(a) v = linspace (-2,1.5,8)(b) r = linspace (8,4.5,8)
The command linspace(a, b, n) generates a row vector of n equally spaced points between a and b. Use colon notation to write an alternative one-line command to generate the same vector. Test your formulation for a = −3, b = 5, n = 6.
The following equation can be used to compute values of y as a function of x:y = be−ax sin (bx) (0.012x4 − 0.15x3 + 0.075x2 + 2.5x)where a and b are parameters. Write the equation for implementation with MATLAB, where a = 2, b = 5, and x is a vector holding values from 0 to π/2 in
A simple electric circuit consisting of a resistor, a capacitor, and an inductor is depicted in Fig. P2.6. The charge on the capacitor q(t) as a function of time can be computed aswhere t = time, q0 = the initial charge, R = the resistance, L = inductance, and C = capacitance. Use MATLAB to
If a force F (N) is applied to compress a spring, its displacement x (m) can often be modeled by Hooke’s law:F = kxwhere k = the spring constant (N/m). The potential energy stored in the spring U (J) can then be computed asFive springs are tested and the following data compiled:Use MATLAB to
It is general practice in engineering and science that equations be plotted as lines and discrete data as symbols. Here are some data for concentration (c) versus time (t) for the photodegradation of aqueous bromine:These data can be described by the following function:c = 4.84e−0.034tUse MATLAB
The semilogy function operates in an identical fashion to the plot function except that a logarithmic (base-10) scale is used for the y axis. Use this function to plot the data and function as described in Prob. 2.11. Explain the results. 2.13 Here are some wind tunnel data for force (F) versus
Here are some wind tunnel data for force (F) versus velocity (ν):These data can be described by the following function:F = 0.2741ν1.9842Use MATLAB to create a plot displaying both the data (using circular magenta symbols) and the function (using a black dash-dotted line). Plot the function for v
The density of freshwater can be computed as a function of temperature with the following cubic equation:ρ = 5.5289 × 10−8T3C − 8.5016 × 10−6T2C + 6.5622 × 10−5 TC + 0.99987where ρ = density (g/cm3) and TC = temperature (°C). Use MATLAB to generate a vector of
The loglog function operates in an identical fashion to the plot function except that logarithmic scales are used for both the x and y axes. Use this function to plot the data and function as described in Prob. 2.13. Explain the results.Data From Problem 2.13Here are some wind tunnel data for force
The Maclaurin series expansion for the cosine isUse MATLAB to create a plot of the sine (solid line) along with a plot of the series expansion (black dashed line) up to and including the term x8/8!. Use the built-in function factorial in computing the series expansion. Make the range of the
The trajectory of an object can be modeled aswhere y = height (m), θ0 = initial angle (radians), x = horizontal distance (m), g = gravitational acceleration (= 9.81 m/s2), v0 = initial velocity (m/s), and y0 = initial height. Use MATLAB to find the trajectories for y0 = 0 and ν0 = 28 m/s for
You contact the jumpers used to generate the data in Table 2.1 and measure their frontal areas. The resulting values, which are ordered in the same sequence as the corresponding values in Table 2.1, are(a) If the air density is ρ = 1.223 kg/m3, use MATLAB to compute values of the dimensionless
The following parametric equations generate a conical helix.x = t cos(6t)y = t sin(6t)z = tCompute values of x, y, and z for t = 0 to 6π with Δt = π/64. Use subplot to generate a two-dimensional line plot (red solid line) of (x, y) in the top pane and a three dimensional line plot (cyan solid
Exactly what will be displayed after the followingMATLAB commands are typed?(a) >> x = 5;>> x ^ 3;>> y = 8 – x(b) >> q = 4:2:12;>> r = [7 8 4; 3 6 –5];>> sum(q) * r(2, 3)
The temperature dependence of chemical reactions can be computed with the Arrhenius equation:k = Ae−E/(RTa)where k = reaction rate (s−1), A = the preexponential (or frequency) factor, E = activation energy (J/mol), R = gas constant [8.314 J/(mole · K)], and Ta = absolute temperature (K). A
Figure P2.21a shows a uniform beam subject to a linearly increasing distributed load. As depicted in Fig. P2.21b, deflection y (m) can be computed withwhere E = the modulus of elasticity and I = the moment of inertia (m4). Employ this equation and calculus to generate MATLAB plots of the following
The butterfly curve is given by the following parametric equations:Generate values of x and y for values of t from 0 to 100 with Δt = 1/16. Construct plots of (a) x and y versus t and (b) y versus x. Use subplot to stack these plots vertically and make the plot in (b) square. Include titles and
The sine function can be evaluated by the following infinite series:Create an M-file to implement this formula so that it computes and displays the values of sin x as each term in the series is added. In other words, compute and display in sequence the values forsin x = xup to the order term of
Develop an M-file function that is passed a numeric grade from 0 to 100 and returns a letter grade according to the scheme:The first line of the function should befunction grade = lettergrade(score)Design the function so that it displays an error message and terminates in the event that the user
The butterfly curve from Prob. 2.22 can also be represented in polar coordinates as Generate values of r for values of θ from 0 to 8π withΔθ = π/32. Use the MATLAB function polar to generate the polar plot of the butterfly curve with a dashed red line. Employ the MATLAB Help to understand how
A simply supported beam is loaded as shown in Fig. P3.10. Using singularity functions, the displacement along the beam can be expressed by the equation:By definition, the singularity function can be expressed as follows:Develop an M-file that creates a plot of displacement (dashed line) versus
Develop an M-file to determine polar coordinates as described in Prob. 3.6. However, rather than designing the function to evaluate a single case, pass vectors of x and y. Have the function display the results as a table with columns for x, y, r, and . Test the program for the cases outlined in
Modify the function function odesimp developed at the end of Sec. 3.6 so that it can be passed the arguments of the passed function. Test it for the following case: >> dvdt=@ (v, m, cd) 9.81- (cd/m) *v^2; >>. odesimp (dvdt, 0.5, 0, 12, -10, 70,0.23)
Develop a vectorized version of the following code: tend=20; ni=8; tstart=0; t (1)=tstart; y (1) = 12 + 6*cos (2*pi*t (1) / (tend-tstart)); for i=2:ni+1 t(i)=t (1-1) + (tend-tstart) /ni; y (1) = 10 + 5*cos (2*pi*t (1) / .. (tend-tstart)); end
For the hypothetical base-10 computer in Example 4.2, prove that the machine epsilon is 0.05. Problem Statement. Suppose that we had a hypothetical base-10 computer with a 5-digit word size. Assume that one digit is used for the sign, two for the exponent, and two for the mantissa. For simplicity,
The following infinite series can be used to approximate ex:(a) Prove that this Maclaurin series expansion is a special case of the Taylor series expansion (Eq. 4.13) with xi = 0 and h = x.(b) Use the Taylor series to estimate f (x) = e−x at xi + 1 = 1 for xi = 0.25. Employ the zero-,
The “divide and average” method, an old-time method for approximating the square root of any positive number a, can be formulated asWrite a well-structured function to implement this algorithm based on the algorithm outlined in Fig. 4.2. = X x + a/x 2
The derivative of f (x) = 1/(1 − 3x2) is given byDo you expect to have difficulties evaluating this function at x = 0.577? Try it using 3- and 4-digit arithmetic with chopping. 6х (1 - 3x²)²
Develop an M-file function called rounder to round a number x to a specified number of decimal digits, n. The first line of the function should be set up asfunction xr = rounder(x, n)Test the program by rounding each of the following to 2 decimal digits: x = 477.9587, − 477.9587, 0.125, 0.135,
Develop an M-file function called rounder to round a number x to a specified number of decimal digits, n. The first line of the function should be set up as function nd = days(mo, da, leap) where mo = the month (1–12), da = the day (1–31), and leap = (0 for non–leap year and 1 for leap year).
Develop an M-file function to determine the elapsed days in a year. The first line of the function should be set up as function nd = days(mo, da, year) where mo = the month (1–12), da = the day (1–31), and year = the year. Test it for January 1, 1997, February 29, 2004, March 1, 2001, June 21,
A Cartesian vector can be thought of as representing magnitudes along the x-, y-, and z-axes multiplied by a unit vector (i, j, k). For such cases, the dot product of two of these vectors {a} and {b} corresponds to the product of their magnitudes and the cosine of the angle between their tails as
Develop a function function M-file that returns the difference between the passed function’s maximum and minimum value given a range of the independent variable. In addition, have the function generate a plot of the function for the range. Test it for the following cases:(a) f(t) =
Develop a script to produce a movie for the butterfly plot from Prob. 2.22. Use a particle located at the x-y coordinates to visualize how the plot evolves in time.Data From Problem 2.22Develop a function to produce an animation of a particle moving in a circle in Cartesian coordinates based
Based on Example 3.6, develop a script to produce an animation of a bouncing ball where ν0 = 5 m/s and θ0 = 50°. To do this, you must be able to predict exactly when the ball hits the ground. At this point, the direction changes (the new angle will equal the negative of the angle at impact),
Convert the following base-8 numbers to base 10:61,565 and 2.71.
In a fashion similar to Prob. 4.4, develop your own M-file to determine the smallest positive real number used in MATLAB. Base your algorithm on the notion that your computer will be unable to reliably distinguish between zero and a quantity that is smaller than this number. Note that the result
Convert the following base-2 numbers to base 10:(a) 1011001, (b) 0.01011, and (c) 110.01001.
Prove that Eq. (4.11) is exact for all values of x if f (x) =ax2 + bx + c.
Derive Eq. (4.30). hopt 38 M
Repeat Example 4.5, but for the forward divided difference (Eq. 4.21).Example 4.5 f'(x₁) = f(x₁+1) = f(xi) h + 0(h)
Repeat Example 4.5, but for f (x) = cos(x) at x = /6.Example 4.5 Problem Statement. In Example 4.4, we used a centered difference approximation of O(h²) to estimate the first derivative of the following function at x = 0.5, f(x) = -0.1x4 -0.15x³ – 0.5x² – 0.25x + 1.2 Perform the same
One common instance where subtractive cancellation occurs involves finding the roots of a parabola, ax2 + bx + c, with the quadratic formula:For cases where b2 >> 4ac, the difference in the numerator can be very small and roundoff errors can occur. In such cases, an alternative
Develop your own M-file for bisection in a similar fashion o Fig. 5.7. However, rather than using the maximum iterations and Eq. (5.5), employ Eq. (5.6) as your stopping criterion. Make sure to round the result of Eq. (5.6) up to the next highest integer. Test your function by solving Prob. 5.1
Use a centered difference approximation of O(h2) to estimate the second derivative of the function examined in Prob. 4.13. Perform the evaluation at x = 2 using step sizes of h = 0.2 and 0.1. Compare your estimates with the true value of the second derivative. Interpret your results on the basis of
You buy a $35,000 vehicle for nothing down at $8,500 per year for 7 years. Use the bisect function from Fig. 5.7 to determine the interest rate that you are paying. Employ initial guesses for the interest rate of 0.01 and 0.3 and a stopping criterion of 0.00005. The formula relating present worth
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: r1 = 0.5 m, r2 = 1 m, h = 1 m, ρf = frustrum density = 200 kg/m3, and ρw = water density = 1,000 kg/m3. Data From Problem
The Michaelis-Menten model describes the kinetics of enzyme mediated reactions:where S = substrate concentration (moles/L), νm = maximum uptake rate (moles/L/d), and ks = the half-saturation constant, which is the substrate level at which uptake is half of the maximum [moles/L]. If the
Repeat Prob. 5.1, but use the false-position method to obtain your solution.Data From Problem 5.1Use bisection to determine the drag coefficient needed so that an 80-kg bungee jumper has a velocity of 36 m/s after 4 s of free fall. The acceleration of gravity is 9.81 m/s2. Start with initial
Develop an M-file for the false-position method. Test it by solving Prob. 5.1.Data From Problem 5.1Use bisection to determine the drag coefficient needed so that an 80-kg bungee jumper has a velocity of 36 m/s after 4 s of free fall. The acceleration of gravity is 9.81 m/s2. Start with initial
Locate the first nontrivial root of sin(x) = x2 where x is in radians. Use a graphical technique and bisection with the initial interval from 0.5 to 1. Perform the computation until εa is less than εs = 2%.
The “divide and average” method, an old-time method for approximating the square root of any positive number a, can be formulated asProve that this formula is based on the Newton-Raphson algorithm. Xi+1 = xi + a/xi 2
Differentiate Eq. (E6.4.1) to get Eq. (E6.4.2).Equation (6.4.1) or (6.4.2) f(m) = gm Cd tanh gcdt-v(t) m
Real mechanical systems may involve the deflection of nonlinear springs. In Fig. P6.20, a block of mass m is released a distance h above a nonlinear spring. The resistance force F of the spring is given byF = −(k1d + k2d3/2)Conservation of energy can be used to show thatSolve for d, given the
Perform the identical MATLAB operations as those in Example 6.8 to manipulate and find all the roots of the polynomialf5(x) = (x + 2) (x + 5) (x − 6) (x − 4) (x − 8)Example 6.8 Using MATLAB to Manipulate Polynomials and Determine Their Roots Problem Statement. Use the following equation to
In control systems analysis, transfer functions are developed that mathematically relate the dynamics of a system’s input to its output. A transfer function for a robotic positioning system is given bywhere G(s) = system gain, C(s) = system output, N(s) = system input, and s = Laplace transform
Employ fixed-point iteration to locate the root of f(x) = sin (√x) − x.Use an initial guess of x0 = 0.5 and iterate until εa ≤ 0.01%. Verify that the process is linearly convergent as described at the end of Sec. 6.1.
Use (a) fixed-point iteration and (b) the Newton- Raphson method to determine a root of f(x) = −0.9x2 + 1.7x + 2.5 using x0 = 5. Perform the computation until εa is less than εs = 0.01%. Also check your final answer.
Determine the lowest positive root of f(x) = 7 sin(x)e−x − 1:(a) Graphically.(b) Using the Newton-Raphson method (three iterations, xi = 0.3).(c) Using the secant method (three iterations, xi − 1 = 0.5 and xi = 0.4.(d) Using the modified secant method (five iterations,
Use (a) the Newton-Raphson method and (b) the modified secant method (δ = 0.05) to determine a root of f(x) = x5 − 16.05x4 + 88.75x3 − 192.0375x2 + 116.35x + 31.6875 using an initial guess of x = 0.5825 and εs = 0.01%. Explain your results.
Employ the Newton-Raphson method to determine a real root for f (x) = −2 + 6x − 4x2 + 0.5x3, using an initial guess of (a) 4.5,(b) 4.43. Discuss and use graphical and analytical methods to explain any peculiarities in your results.
Perform three iterations of the Newton-Raphson method to determine the root of Eq. (E7.1.1). Use the parameter values from Example 7.1 along with an initial guess of t = 3 s.Equation (7.1.1)Example 7.1 dz dt e-(c/m)t Voe mg C (1 - e-(c/m)t)
Given the formula f(x) = −x2 + 8x − 12(a) Determine the maximum and the corresponding value of x for this function analytically (i.e., using differentiation).(b) Verify that Eq. (7.10) yields the same results based on initial guesses of x1 = 0, x2 = 2, and x3 = 6.Equation (7.10) X4 = x2 - 1
(a) Develop an M-file function to implement Brent’s root-location method. Base your function on Fig. 6.10, but with the beginning of the function changed to Make the appropriate modifications so that the function performs as outlined in the documentation statements. In addition, include error
An oscillating current in an electric circuit is described by I = 9e−t sin(2πt), where t is in seconds. Determine all values of t such that I = 3.5.
Develop a single script to (a) generate contour and mesh subplots of the following temperature field in a similar fashion to Example 7.4: T (x, y) = 2x2 + 3y2 − 4xy − y − 3x and (b) determine the minimum with f min search.Example 7.4 Visualizing a Two-Dimensional Function Problem Statement.
See if you can develop a foolproof function to compute the friction factor based on the Colebrook equation as described in Sec. 6.7. Your function should return a precise result for Reynolds number ranging from 4000 to 107 and for ε/D ranging from 0.00001 to 0.05.
As electric current moves through a wire (Fig. P7.14), heat generated by resistance is conducted through a layer of insulation and then convected to the surrounding air. The steady-state temperature of the wire can be computed asDetermine the thickness of insulation ri (m) that minimizes the
Use the Newton-Raphson method to find the root off(x) = e−0.5x (4 − x) − 2
Given f(x) = −2x6 − 1.5x4 + 10x + 2 Use a root-location technique to determine the maximum of this function. Perform iterations until the approximate relative error falls below 5%. If you use a bracketing method, use initial guesses of xl = 0 and xu = 1. If you use the
The head of a groundwater aquifer is described in Cartesian coordinates byDevelop a single script to (a) Generate contour and mesh subplots of the function in a similar fashion to Example 7.4, and (b) Determine the maximum with f min search.Example 7.4 h(x, y) = 1 1 + x² + y² + x + xy
Consider the following function: f(x) = 3 + 6x + 5x2 + 3x3 + 4x4Locate the minimum by finding the root of the derivative of this function. Use bisection with initial guesses of xl = −2 and xu = 1.
Three matrices are defined as(a) Perform all possible multiplications that can be computed between pairs of these matrices.(b) Justify why the remaining pairs cannot be multiplied.(c) Use the results of (a) to illustrate why the order of multiplication is important. [A]
Repeat Prob. 7.5, except use parabolic interpolation. Employ initial guesses of x1 = 0, x2 = 1, and x3 = 2, and perform three iterations.Data From Problem 7.5Solve for the value of x that maximizes f(x) in Prob. 7.4 using the golden-section search. Employ initial guesses of xl = 0 and
Showing 100 - 200
of 212
1
2
3
Step by Step Answers