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

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.

function [x, f, ea, iter] =newtmult (func, xo, es, maxit, varargin) &


Example 12.4

newtmult: Newton-Raphson root zeroes nonlinear systems [x, f, ea, iter] =newtmult (func,

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.

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

Step by Step Solution

3.47 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

ANSWER Here is the implementation of the NewtonRaphson method for nonlinear systems of e... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Applied Numerical Methods Questions!