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...
-
G. Menges developed the following econometric model for the West German economy: where Y = national income I = net capital formation C = personal consumption Q = profits P = cost of living index R =...
-
The online review service Yelp helps millions of consumers find the goods and services they seek. To help consumers make more-informed choices, Yelp includes over 120 million reviews. The file yelp...
-
Norge Company is an 80%-owned subsidiary of Victor Corporation. The separate income statements of the two companies for 2012 are as follows: The following facts apply to 2012: a. Norge Company sold...
-
Your team was just hired as strategic marketing consultants for a small company that specializes in website translation. The company, which is two years old, translates and localizes websites for...
-
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...
-
Companies around the globe have moved to, or are in the process of moving to, IFRS. Evidence has shown that it is preferable to adopt IFRS in its entirety, with no deviations from the standards. This...
-
0-1 2 1 0 3 0 0 1 Which of the following statements about the matrix M is true? Consider the matrix M: = Select one: a. M represents a rotation of -90, followed by a translation of vector (2, 3). b....
-
1. Suppose a monopolist Fp in the burgers market produces patties (p) at zero cost and the demand for patties is given by: = Qp-1-Pp-P where Qp is the quantity of patties demanded, P is the price of...
-
An object moving in a liquid experiences a linear drag force: B = (bv, direction opposite the motion), where b is a constant called the drag coefficient. For a sphere of radius R, the drag constant...
-
A standing wave is produced by a wave = (2.50 cm)cos [(3.34 cm )x - (2.33 st] moving to the right and a wave y = (2.50 cm)cos [(3.34 cm-)x+ (2.33 s-)] moving to the left. At what location on the...
-
15a. An electron is launched at a a=46.9 angle and speed of 4.17E+6m/s from the positive plate of the parallel plate capacitor shown. If the electron lands d=7.80cm away, what is the electric field...
-
Carmel Harrison runs Emerald Spa, a business providing women-only hairdressing, beauty, relaxation massage, and counseling services in a small tourist town. Ninety percent of the clients using the...
-
The activities listed in lines 2125 serve primarily as examples of A) Underappreciated dangers B) Intolerable risks C) Medical priorities D) Policy failures
-
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).
-
Hot water demand of a building is 5 0 Liperson / day and an average occupancy of the building is 5 0 people. The supplied cold water temperature is 2 0 oC and the hot water temperature at the storage...
-
4. The slab of thickness H in the figure below is at temperature T, when the electric heat and convection conditions are suddenly applied. Set up the proper differential equation and conditions. hoo,...
-
(1) A car is traveling at a constant speed of 5 m/s. If the snow is falling at 4.1 m/s with an angle of 36 degrees to the vertical line toward the windshield, determine the velocity of the snow as...
Study smarter with the SolutionInn App