Develop your own M-file function for the Newton- Raphson method for nonlinear systems of equations based on
Question:
Develop your own M-file function for the Newton- Raphson method for nonlinear systems of equations based on Fig. 12.4. Test it by solving Example 12.4 and then use it to solve Prob. 12.8.
Example 12.4
Data Form Problem 12.8
Determine the solution of the simultaneous nonlinear equations
y = −x2 + x + 0.5
y + 5xy = x2
Use the Newton-Raphson method and employ initial guesses of x = y = 1.2.
Transcribed Image Text:
function [x, f, ea, iter] =newtmult (func, xo, es, maxit, varargin) & newtmult: Newton-Raphson root zeroes nonlinear systems [x, f, ea, iter] =newtmult (func, xo, es, maxit, p1, p2, ...): 8 8 uses the Newton-Raphson method to find the roots of a system of nonlinear equations 8 & input: 8 func = name of function that returns f and J 8 xo initial guess es = desired percent relative error (default = 0.0001%) maxit = maximum allowable iterations (default = 50) p1, p2,... = additional parameters used by function & output: & & 8 8 f 8 & x = vector of roots f = vector of functions evaluated at roots ea = approximate percent relative error (%) iter = number of iterations if nargin<2, error (at least 2 input arguments required'), end if nargin<3|isempty (es), es=0.0001; end if nargin<4|isempty (maxit), maxit=50; end iter = 0; X=X0; while (1) [J, f]=func (x, varargin{:}); dx=J\f; x=x-dx; iter = iter + 1; ea=100*max (abs (dx./x)); if iter>=maxit | ea<=es, break, end end
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 77% (9 reviews)
ANSWER Here is the implementation of the NewtonRaphson method for nonlinear systems of e...View the full answer
Answered By
Churchil Mino
I have been a tutor for 2 years and have experience working with students of all ages and abilities. I am comfortable working with students one-on-one or in small groups, and am able to adapt my teaching style to meet the needs of each individual. I am patient and supportive, and my goal is to help my students succeed.
I have a strong background in math and science, and have tutored students in these subjects at all levels, from elementary school to college. I have also helped students prepare for standardized tests such as the SAT and ACT. In addition to academic tutoring, I have also worked as a swim coach and a camp counselor, and have experience working with children with special needs.
0.00
0 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
-
Minimise subject to Z = 2x1 + x2 x1 + x2 6 |x1x 2 x1 0, 0. (a) Is the problem an LP problem in its current form? Explain your answer. (b) Sketch the feasible region. (c) Convert the optimization...
-
4. Identify the stereochemistry of the following compound a Also, write the IUPAC name of the compound usine R&s Configuration. Hum Br fum H 1 and 3 1 and 4 2 and 3 2 and 4 3 and 4 BY b) -OH H H-...
-
Develop a user-friendly program for the two-equation Newton-Raphson method based on Sec. 6.6.2. Test it by solving Example 6.12.
-
Why is it so difficult to assess whether a firm is properly valued?
-
When people make estimates, they are influenced by anchors to their estimates. A study was conducted in which students were asked to estimate the number of calories in a cheeseburger. One group was...
-
What is the last step in the calculation of (oX) 2? a. Square each score. b. Add the scores. c. Square the sum of the scores d. Add the squared scores.
-
Taxes. The Retirement Living Information Center compiled data on projected combined state and local taxes as a percentage of income for each of the 50 states for 2007. The table below gives the...
-
Hybrid cars are touted as a green alternative; however, the financial aspects of hybrid ownership are not as clear. Consider the 2010 Lexus RX 450h, which had a list price of $5,565 (including tax...
-
Biff Titan, a student at UWO, plans to open a hot dog stand inside UWOs football stadium during home games. There are eight (8) home games scheduled for the upcoming season. He must pay the UWO...
-
On average, the surface area A of human beings is related to weight W and height H. Measurements on a number of individuals of height 180 cm and different weights (kg) give values of A (m 2 ) in the...
-
As displayed in Fig. P13.6, an LC circuit can be modeled by the following system of differential equations: where L = inductance (H), t = time (s), i = current (A), and C = capacitance (F). Assuming...
-
A systems analyst attended a week-long workshop on structured analysis. When she returned to her job, she told her boss that structured analysis was not worth the time to learn and use on the job....
-
Part 2 One Stop Electrical Shop are merchandisers of household fixtures & fittings. The business began the last quarter of 2020 (October to December) with 25 Starburst Wall Clocks at a total cost of...
-
A species of butterfly has three subspecies A, B, and C. A scientist is trying to classify observed. specimens into these subspecies based on the color of their wings, which can be blue, green, pink,...
-
Stock during the year were sold for $8 per share. On December 31 , Portland had no remaining treasury stock. Required: Prepare the necessary journal entries to record any transactions associated with...
-
2) 20 pts. A 2-kg block rests on a wedge that has a coefficient of friction between the wedge and block of 0.3. The system accelerated to the right. Determine the maximum acceleration of the system...
-
ABC Ltd. is concerning about its poor performance and considering whether or not dropping the production and sells of product R, which incurs losses of Birr 4000. Additional information: The salaries...
-
A concrete wall with a surface area of 20 m 2 and a thickness of 0.30 m separates conditioned room air from ambient air. The temperature of the inner surface of the wall (T 1 ) is maintained at 25C....
-
Classify each of the following as direct costs or indirect costs of operating the Pediatrics ward for children at the Cleveland Clinic: a. Wi-Fi covering the entire hospital campus b. Net cost of...
-
Solve the following initial-value problem from t = 1.5 to t = 2.5 dy/dt = -2y/1 + t Use the fourth-order Adams method. Employ a step size of 0.5 and the fourth-order RK method to predict the start...
-
Develop a program for the implicit Euler method for a single linear ODE. Test it by duplicating Prob. 26.1b.
-
Develop a program for the implicit Euler method for a pair of linear ODEs. Test it by solving Eq. (26.6).
-
Comfort Golf Products is considering whether to upgrade its equipment Managers are considering two options. Equipment manufactured by Stenback Inc. costs $1,000,000 and will last five years and have...
-
Weaver Corporation had the following stock issued and outstanding at January 1, Year 1: 71,000 shares of $10 par common stock. 8,500 shares of $60 par, 6 percent, noncumulative preferred stock. On...
-
Read the following case and then answer questions On 1 January 2016 a company purchased a machine at a cost of $3,000. Its useful life is estimated to be 10 years and then it has a residual value of...
Study smarter with the SolutionInn App