(a) Develop an M-file function to implement Brents root-location method. Base your function on Fig. 6.10, but...
Question:
(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 traps to ensure that the function’s three required arguments (f,xl,xu) are prescribed, and that the initial guesses bracket a root. (b) Test your function by using it to solve for the root of the function from Example 5.6 using
Example 5.6
Transcribed Image Text:
function b= fzerosimp (x1, xu) a = x1; b = xu; fa = f(a); fb = f(b); c = a; fc = fa; d = b = c; e = d; while (1) if fb == 0, break, end if sign (fa) == sign (fb) If needed, rearrange points a = c; fa = fc; d = b = c; e = d; end if abs (fa) < abs (fb) c = b; b = a; a = c; fc = fb; fb = fa; fa = fc; end m = 0.5* (a - b); Termination test and possible exit tol = 2 * eps if abs (m) = tol & abs (fc) > abs (fb) 8 = fb/fc; if a == c P = 2*m*s; q = 1 - s; else end q= fc/fa; r = fb/fa; P = 8 * (2*m*q q end else max (abs (b), 1); end else end if p > 0, q = -q; else p = -p; end; if 2*p < 3*m*q - abs (tol*q) & p < aba (0.5*e*g) e = d; d = p/q; d = m; e = m; d = m; e = m; *Secant method *Inverse quadratic interpolation (q 1) (r - 1) (8 - 1); (qr) (b- c) * (x - 1)); Bisection c = b; fc = fb; if abs (d) > tol, b=b+d; else b-b-sign (b-a) *tol; end fb = f(b);
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 58% (12 reviews)
Answered By
Diane Joyce Pastorin
Please accept my enthusiastic application to solutioninn. I would love the opportunity to be a hardworking, passionate member of your tutoring program. As soon as I read the description of the program, I knew I was a well-qualified candidate for the position.
I have extensive tutoring experience in a variety of fields. I have tutored in English as well as Calculus. I have helped students learn to analyze literature, write essays, understand historical events, and graph parabolas. Your program requires that tutors be able to assist students in multiple subjects, and my experience would allow me to do just that.
You also state in your job posting that you require tutors that can work with students of all ages. As a summer camp counselor, I have experience working with preschool and kindergarten-age students. I have also tutored middle school students in reading, as well as college and high school students. Through these tutoring and counseling positions, I have learned how to best teach each age group.
4.60+
2+ Reviews
10+ Question Solved
Related Book For
Applied Numerical Methods With MATLAB For Engineers And Scientists
ISBN: 9781259027437
3rd Edition
Authors: Steven C. Chapra
Question Posted:
Students also viewed these Mathematics questions
-
Write a literature review for your study. See below for an example of a literature review. Your literature review should provide both analysis and synthesis of previous studies as related to the...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
Create a class called Car that includes three instance variablesa model (type String), a year (type String), and a price (double). Provide a constructor that initializes the three instance variables....
-
The list of Best Small Companies in America features a group with strong earnings growth across industries. A business analyst wishes to determine the relationship between earnings per share growth...
-
The vertebra of the spinal column can support a maximum compressive stress of Ï max , before undergoing a compression fracture. Determine the smallest force P that can be applied to a vertebra,...
-
The average pressure and shear stress acting on the surface of the 1-m-square flat plate are as indicated in Fig. P9.4. Determine the lift and drag generated. Determine the lift and drag if the shear...
-
A retail coffee company is planning to open 100 new coffee outlets that are expected to generate, in total, $15 million in free cash flows per year, with a growth rate of 3% in perpetuity. If the...
-
The operating revenues and expenses of Panawin Enterprises for 2 0 2 1 are below:There are four additional transactions that impact the income statement: Machinery with a balance sheet ( book ) value...
-
An oscillating current in an electric circuit is described by I = 9e t sin(2t), where t is in seconds. Determine all values of t such that I = 3.5.
-
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...
-
Sergey SpA has net cash provided by operating activities of 1,200,000. Its average current liabilities for the period are 1,000,000, and its average total liabilities are 1,500,000. Comment on the...
-
Problem Statement Given below is a case study of a fictitious fintech start-up followed by questions for you to answer based on your learnings from the course. Company Background: XYZ is a fintech...
-
1. Why didnt my portfolio beat the SP500. EXPLAIN 2. Compute the treynor or sharpe measure for this portfolio 8/1/2023 Market - Buy TM 59 MKT 171.26 EQUITIES USD 32d8fd1b-3428-4b71-...
-
A CUSMA Certificate of Origin has now been provided and the importer requests that you submit a refund request on their behalf. Using the information from the CASE ONE B3 that you may have already...
-
Performance Products Corporation makes two products, titanium Rims and Posts. Data regarding the two products follow Direct Labor- Hours per unit Rims Posts 0.40 0.70 Annual Production 18,000 units...
-
Mallory Company uses the product cost method of applying the cost-plus approach to product pricing. It produces and sells Product X at a total cost of $35 per unit, of which $28 is product cost and...
-
In Canada there are two official languages, French and English. Some Canadian corporations are headquartered in Quebec where French is the official language. Most however are headquartered outside...
-
Accounting policies and practices that are most important to the portrayal of the companys financial condition and results, and require managements most difficult, subjective, or complex judgments...
-
To calculate a planets space coordinate, we have to solve the function f(x) = x 1 0.5 sin x Let the base point be = xi = /2 on the interval [0, ]. Determine the highest-order Taylor series...
-
Consider the function (x) = x 3 2x + 4 on the interval [2, 2] with h = 0.25. Use the forward, backward, and centered finite difference approximations for the first and second derivatives so as to...
-
Determine the real roots of (x) = 0.5x 2 + 2.5x + 4.5: (a) Graphically. (b) Using the quadratic formula. (c) Using the iteration of the bisection method to determine the highest root. Employ initial...
-
Find the derivative of y with respect to the given independent variable. y=log 36ex-log6 x dy dx 11
-
Differentiate the function. 9 g(x) = x 6x + 19 4 - g'(x) = X
-
Find g'(4) given that f(4) = -3 and f'(4) = 2 (a) For g(x)=3x - 5f(x) g'(4) = (b) For g(x) = 2x+1 f(x) g'(4) =
Study smarter with the SolutionInn App