Newton-Raphson Method

Chapter Two

Newton-Raphson Method

There's a specialist from your university waiting to help you with that essay.
Tell us what you need to have done now!


order now

( 2.1 )Introduction

Newton-Raphson method is besides an iterative method to happen root of a non-linear map. The basic thought of this method is to see merely one initial conjecture value Ten0( alternatively of two terminal values of an interval as used in bisection and false place methods ) and so to better it to obtain the new conjecture Xa by utilizing the relation Xa = X0-f ( X0) /( Ten0) . In every measure of betterment, Xa of earlier measure is considered as Ten0for the present measure. When the new conjecture value Xa does non differ from the old conjecture value Ten0so it coincides with the exact root Xr.

( 2.1.1 ) Definition

Linear and Nonlinear Equation

See the map y=f ( x ) , f ( ten ) is a additive map, if the dependant variable Y alterations in direct proportion to the alteration in independent variable ten.

For illustration y=3x+5 is a additive map.

On the other manus, degree Fahrenheit ( ten ) is said to be nonlinear, if the response of the dependant variable Y is non in direct or exact proportion to the alterations in the independent variable ten.

For illustration y=x2+1 is a nonlinear map.

( 2.2 ) Derivation of formula for root

The above expression for Xa can be derived from the Taylor ‘s series of degree Fahrenheit ( X ) about Ten0, if Xa is the right root and Xa = X0+ H, so degree Fahrenheit () = degree Fahrenheit ( X0+h ) = 0. Using utilizing Taylor series we can compose.

Neglecting 2nd and higher order footings in measure size H we have.

Hence new estimate of root is obtained by replacing for H in Xa =+ H as

( 2.2.1 )

This is the needed Newton-Raphson method expression for new conjecture to obtain the root of a given map degree Fahrenheit ( ten )

( 2.3 ) Geometrical reading

Letbe a point near the root of the equation degree Fahrenheit ( x ) = 0, ( fig.2.1 ) . Then the equation of the tangent at

A0[, degree Fahrenheit ( ten0) ] is y – degree Fahrenheit ( ten0) = degree Fahrenheit ‘ ( x0) ( x-x0) .

It cuts the ten – axis at

Fig. ( 2.1 )

Which is a first estimate to the root, if A1is the point matching to x1on the curve, so the tangent at A1, will cut the x-axis of ten2which is nearer toand is, hence, a 2nd estimate to the root. Repeating this procedure, we approach to the rootrather quickly. Hence the method consists in replacing the portion of the curve between the point Angstrom0and the x-axis by agencies of the tangent to the curve at A0.

( 2.4 ) Convergence of Newton-Raphson Method

Let xNbe an estimation of a root of the map degree Fahrenheit ( ten ) . If tenNand xn+1are close to each other, so utilizing Taylor ‘s series enlargement, we can province.

Where R lies someplace in the interval tenNto xn+1and 3rd and higher order have been dropped.

Let us presume that the exact root of degree Fahrenheit ( ten ) is tenR. Then xn+1= tenRTherefore degree Fahrenheit ( tenn+1) = 0 and replacing these values in equation ( 2.4.1 ) we get

We know that the Newton ‘s iterative expression is given by

Rearranging the footings, we get

Substituting this for degree Fahrenheit ( tenN) in Eq. ( 2.4.1 ) outputs.

We know that the mistake in the estimation tenn+1is given by

Similarly,

Now, equation ( 2.4.3 ) can be expressed in footings of these mistakes as

( 2.4.4 )

Rearranging the footings we get,

( 2.4.5 )

Equation ( 2.4.5 ) shows that the mistake is approximately relative to the square of the mistake in the old loop. Therefore, the Newton-Raphson method is said to hold quadratic convergence.

( 2.5 ) Guess standards

The method requires an initial conjecture non of the interval [ Ten1, Ten2] but of individual value of X which must be near the existent root. Such value of X can be found by graphical study of given map against X. The X value of the point where map curve intersects or crosses X-axis is the root. The initial conjecture value Ten0can be on either side of this intersection X value. The conjecture of followingis obtained from Ten0with the aid of expression.

( 2.6 ) Termination standards

One can go on the procedure of happening new conjecture of root till the new conjecture of root satisfies f ( ten ) = 0 precisely. Many times to get at this state of affairs 100s of stairss will be required or the state of affairs may non be arrived at all due to restriction of preciseness in figure representation on the computing machine. Hence the iterative procedure of happening new conjecture is stopped whensome specified boundor mistake betweenand X0is less than some specified bound which can be tested by look intoing if comparative mistake in root is less than specified bound vitamin E.

i.evitamin E

The iterative procedure will be stopped by eitheror

( Xa – X0) /Xavitamin E which of all time is satisfied earlier.

An extra state of affairs that has to be taken into consideration is the 1 when degree Fahrenheit ‘ ( ten ) is really little, about about nothing. In such instances next new conjecture becomes infinite. Therefore iterative procedure must be stopped if magnitude of degree Fahrenheit ‘ ( x ) less than or equal to some little value.

( 2.7 ) Computational attempt

It is usually measured in footings of figure of ratings of map values ( if being most clip devouring operation ) In this method there are two map value ratings in one iterative measure one of the map and one for its derivative and therefore the method is with more computational attempt.

The demand for computation of derivative is displeasure of the method. In instances where closed signifier look of derivative is available, the looks may be long and much computational attempt may be required to happen its value. When closed signifier look of derived function is non available 1 has to happen it by numerical methods, which will take to extra numerical mistake.

( 2.8 ) Rate of convergence

The thought about the speed of the method to get to the root or speed of decrease in the mistake in the approximative consequence is provided by the rate of convergence. It is the largest whole number K such that.

Where M is a finite figure, for a procedure with rate of convergence K, mistake E in any measure is relative to kth power of mistake in the old measure.

Let the consecutive conjecture values of roots be XI= TenR+ vitamin EIand XI + 1= TenR+ vitamin Ei+ 1with vitamin EIand vitamin Ei+ 1as mistakes. In Newton-Raphson method these are related by

Since degree Fahrenheit ( tenR) = 0, therefor

Ifis finite and non- nothing so comparing of bound of above equation with the equation specifying order of convergence we get k=2, physically this leads to duplicating of important figures in estimate during each loop.

( 2.9 ) Stability

To prove stableness of Newton-Raphson 1 must look into the certainty of convergence in the method. In the graphical representation consecutive estimates in Newton-Raphson method are indicated by point P0, P1, P2, … etc. on the map curve with X values X0, Ten1, Ten2, … etc, severally, as shown in ( fig 2.2 ) . The exact root is shown by point R. It is clear that the consecutive estimate.

Fig. ( 2.2 )

Points to near R and initial root conjecture Ten0attacks the exact root value TenR. Every measure of the method brings the approximative root closer to the exact root and indicates convergence of the method.

( 2.10 ) Restrictions

There are certain restrictions of Newton-Raphson method. Some of them are given below:

( a ) If the value of gradient at guess point is really little so even a really little alteration in the gradient value of map has really big consequence on the following value of conjecture and the following conjecture may be taken off from the exact root.

( B ) ( Fig.2.3 ) shows graphical representation of Newton-Raphson method for another map and it indicates non-convergence. If P0is selected as initial conjecture point with Ten0as initial conjecture root, the following conjecture root value is X ‘ which is more off from Ten1than Tens0and hence the loop is divergent.

( degree Celsius ) Another state of affairs of non-convergence is besides shown in fig. ( 2.3 ) If P1is used as initial conjecture point so the following conjecture point is P2whose following conjecture point is once more P1and the procedure becomes oscillating in nature. It leads to endless rhythm of fluctuations between P1and P2without convergence. Hence if there is a alteration in mark of gradient at guess point and gradient at root point so Newton-Raphson method fails.

The above treatment indicates that Newton-Raphson method, in general, provides on warrant of convergence if initial conjecture is non appropriate. Stability of the method depends on the initial conjecture.

Fig. ( 2.3 )

( 2.11 ) Absolute, Relative and per centum Mistakes

In numerical calculations mistakes are bound to happen and it is indispensable to see whether the obtained consequence is within a bound of tolerable mistakes or non. Hence cognition about different steps of mistake is necessary. The three basic steps of mistakes are absolute mistake, comparative mistake and per centum mistake. These mistakes can be defined as follows:

Ifis an- estimate tosoabsolute mistakeis defined as absolute value of difference between

And, i.e.

EP =

Ifdadis an estimate toandis non equal to 0 sorelationmistakeis defined as absolute value of the ratio of difference between P andwith, i.e.

RP =

Percentage mistakeis 100 times the comparative mistake. PP = 100 ten RP. If dad is an estimate to p and p is non equal to 0 so per centum mistake can be expressed as

PP=* 100

To exemplify the above types of mistakes we consider three different sets of exact and approximative values. In every instances absolute mistake, comparative mistake and per centum mistake are calculated. Further it is discussed which estimate is the best 1.

( a ) Let= 3.14592 and= 3.l4 so

Ex ===0.00592

Rx === 0.00507

Px = Rx* 100 = 0.00507* 100 = 0.507 %

( B ) Let y = 1000000 and= 999996

Ey === 4

Ry=== 0.000004

Py= Ry * 100 =0.000004 * 100 = 0.0004 %

( degree Celsius ) Let z =0.000012 and za=0.000009 so

Ez === 0.000003

Rz === 0.25

Pz = Rz* 100=0.25*100=25 %

Analysis of the mistakes, in above illustrations, lead us to the undermentioned decisions:

Case ( a ) Difference between absolute mistake ( Ex ) and comparative mistake ( Rx ) is really little and either could be used to find the truth of the approximative value Xa.

Case ( B ) The value of Y is of order l06. The absolute mistake is larger than the comparative mistake. Here we could most likely call Ya as a good approximate to y.

Case ( degree Celsius ) The magnitude of Z is of the order of 10-6the absolute mistake Ez is the smallest of all three instances, but the comparative mistake is the largest. Therefore in this instance Za is a bad estimate of Z.

( 2.12 ) Newton – Raphson Algorithm

Possibly the most widely used of all methods for happening roots in the Newton–Raphson method. [ Algorithm 2.1 ] describes the stairss for implementing Newton – Raphson method iteratively.

Newton-Raphson method.

1 ) Assign an initial value to x, state.

2 ) Evaluate degree Fahrenheit ( ten0) and f ‘ ( x0) .

3 ) Find the improved estimation of.

4 ) Check for truth of the latest estimation

Compare comparative mistake to a predefined value E. if

Stop. Otherwise continue.

5 ) Replace tenOby ten1and reiterate stairss 3 and 4. [ Algorithm 2.1 ]

// Program ( 2.12.1 ) Find root of a map by Newton-Raphson method

// Variables used in the plan

// Ten: initial conjecture for the root

// XA: following approximate root

// Yttrium: map value

// YD: map derivative value

// ER: mistake with approximative root

// EPS: mistake bound for convergence

// I: current loop figure

// N: Limit of loop figure

// — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

# include & lt ; iostream.h & gt ;

# include & lt ; stdlib.h & gt ;

# include & lt ; conio.h & gt ;

# include & lt ; math.h & gt ;

dual merriment ( dual ten, int KOD )

{

dual V ;

5 = x*x-3*x+2 ; // Given map whose roots are to be determined.

if ( KOD == 1 )

return V ;

else if ( KOD == 2 )

{

cout & lt ; & lt ; “

Entered map is F ( x ) = x*x – 3*x +2 ” ;

cout & lt ; & lt ; “

If look is to be changed so do rectification in map fun. “ ;

}

return V ;

}

dual dfun ( dual ten, int KOD )

{

dual dfun ;

dfun = 2*x-3 ; // Derivative of given map

if ( KOD == 1 )

return dfun ;

else if ( KOD == 2 )

{

cout & lt ; & lt ; “

Derivative of map is ( dF ( x ) /dx ) = 2*x-3 ” ; cout & lt ; & lt ; “

If Derivative is incorrect so correct it. ” ;

}

return dfun ;

}

nothingness chief ( )

{

dual silent person ;

dual XA, X, Y, ER, EPS, YD ;

int I, N, DKOD ;

// clrscr ( ) ;

cout & lt ; & lt ; “
Find root of a map by Newton ‘s Raphson method.
” ;

cout & lt ; & lt ; “
Enter 1 for Standard informations
” ;

cout & lt ; & lt ; “ 2 for New informations
” ;

cin & gt ; & gt ; DKOD ;

if ( DKOD ==1 )

{

X = 0.6 ; N = 10 ; EPS =.01 ;

silent person = merriment ( 0.0, 2 ) ;

silent person = dfun ( 0.0,2 ) ;

cout & lt ; & lt ; “

Initial value for solution X = “ & lt ; & lt ; X ;

cout & lt ; & lt ; “
Number of loops N = “ & lt ; & lt ; N ;

cout & lt ; & lt ; “
Error bound for convergence EPS = “ & lt ; & lt ; EPS ;

cout & lt ; & lt ; endl ;

}

elseif ( DKOD == 2 )

{

silent person = merriment ( 0.0, 2 ) ;

silent person = dfun ( 0.0,2 ) ;

cout & lt ; & lt ; “

Initial value for solution X = “ ;

cin & gt ; & gt ; X ;

cout & lt ; & lt ; “ Number of loops N = “ ;

cin & gt ; & gt ; N ;

cout & lt ; & lt ; “ Error bound for convergence EPS = “ ;

cin & gt ; & gt ; EPS ;

cout & lt ; & lt ; endl ;

}

I= 0 ;

XA = X ;

YD = dfun ( X, 1 ) ;

if ( fabs ( YD ) & lt ; .0001 )

{

cout & lt ; & lt ; “ Get downing gradient excessively little “ ;

cout & lt ; & lt ; endl & lt ; & lt ; “ Press any cardinal. . . “ ;

getch ( ) ;

issue ( -1 ) ;

}

ER = ( 3/2 ) *EPS ;

make

{

I = I+1 ;

Ten = XA ;

Y = merriment ( X, 1 ) ;

YD = dfun ( X,1 ) ;

XA = X-Y/YD ;

ER = ( XA-X ) /XA ;

if ( ER & lt ; 0 ) ER = -ER ;

// cout & lt ; & lt ; endl & lt ; & lt ; X & lt ; & lt ; “ “ & lt ; & lt ; XA & lt ; & lt ; “ “ & lt ; & lt ; ER ;

} while ( ER & gt ; EPS & A ; & amp ; I & lt ; =N ) ;

// Output of consequences

cout & lt ; & lt ; endl ;

if ( I & gt ; = N )

{ cout & lt ; & lt ; “ Approximate root = “ & lt ; & lt ; XA ;

cout & lt ; & lt ; “ with mistake = “ & lt ; & lt ; ER ;

cout & lt ; & lt ; endl & lt ; & lt ; “ No convergence ” ;

}

else

{ cout & lt ; & lt ; “

Root = “ & lt ; & lt ; XA & lt ; & lt ; “ with mistake = “ & lt ; & lt ; ER ;

cout & lt ; & lt ; “

Convergence reached in “ & lt ; & lt ; I-1 & lt ; & lt ; “ loops. ” ;

}

cout & lt ; & lt ; endl & lt ; & lt ; “ Press any cardinal “ ;

getch ( ) ;

}

( 2.13 ) System OF NONLINEAR EQUATIONS

When one considers two non-linear equations in X and Y as degree Fahrenheit ( X, Y ) =0 and g ( X, Y ) =0, the usual methods ( either riddance type or iterative type ) are non suited to work out them. Here for one value of Y there can be one or more values of Ten that satisfy degree Fahrenheit ( X, Y ) =0. Hence needfully there will be figure of braces of ( X, Y ) that will fulfill degree Fahrenheit ( X, Y ) =0 and will be its solutions. This means that there is a contour in X, Y plane formed by the solutions of degree Fahrenheit ( X, Y ) =0. Similarly there will be another a contour in X, Y plane for g ( X, Y ) =0. The brace of ( X, Y ) which will fulfill both equations is a brace that corresponds to intersection of both the contours as shown in fig. ( 2.4 ) .

To follow the above process to happen intersection brace, one must choose many values of Y and happen the corresponding values of Ten by work outing degree Fahrenheit ( X, Y ) =0 as a nonnatural equation in X. This will demand repeated usage of the method of work outing nonnatural equation. Since the same thing is to be repeated for g ( X, Y ) =0 the figure for which the method of work outing nonnatural equation is used, becomes really big and the procedure becomes clip devouring. Since the scopes of variables X and Y in which solutions of given job exist are non known, the procedure becomes hard. The job becomes farther complicated as the figure of variables addition.

Fig. ( 2.4 )

( 2.14 ) Newton-Raphson method for nonlinear equations

There is no good general method for work outing set of nonlinear coincident equations. However, Newton-Raphson method is one, which is used widely but it has a major drawback that is uncertainness of convergence. While work outing set of nonlinear equations maximal information ‘s available from natural philosophies or mechanism of the job, must be used to command divergency.

The set of n nonlinear equations in n terra incognitas

… … … … … … … … ..

… … … … … … … … …

Can be solved by Newton-Raphson iterative method extended to many variables.

( 2.15 ) Derivation of the expression

To acquire the look for happening new conjecture of X vector from old X vector, Taylor series must be used but with a signifier of n independent variables.

Taylor ‘s series of maps atin footings of map value at old Ten, i.e.maintaining merely the footings up to first order derived functions, are.

… … … … … … … … … … … … … … … …

… … … … … … … … … … … … … … … … .

since the maps are expected to hold zero value at the new Ten valuesand the values of different derived functions of the maps are known atthe above Taylor series look become set of n coincident additive equations in n terra incognitas,as

for one = 1, 2, … N

Where=

Solving the above set of coincident additive dealingss we can happen alterations in thedenoted by () Therefore the new conjecture values are.

( 2.16 ) Formulae for two nonlinear equations

If we have two equations f ( x, y ) = 0 and g ( x, y ) =0 in two terra incognitas X and Y andandare alterations in them so to acquire new conjecture from old conjecture we use the additive equations.

Where degree Fahrenheit, g,,,,represent maps and their derived functions at initial values of X and Y, i.e. Ten0and Y0. Solving the equations we get the values of unknown as

The new values of X and Y are X=X0+and Y = Y0+

( 2.17 ) Convergence Standard

Convergence of the iterative process in this method is tested with the aid or comparative difference between consecutive values of TenIcomputed in consecutive loops. When maximal value of such differences among all TensIis less than specified value EPS the loop procedure is stopped.

Stairss of the method:

  1. Read input informations.
  2. Define map and their derived functions.
  3. Calculate maps degree Fahrenheit and g and their derived functions,,,.

4 ) Calculate correctionsandin present value of terra incognitas by

( 5 ) cipher new values of terra incognitas and mistake.

i- ten

ii-y

( 6 ) if mistake is greater than specified bound so travel to step 3 else out set the consequence.

( 2.18 ) Algorithm:

In written the algorithm ten0and Y0are considered as initial conjecture values and ten1and Y1the conjecture values during 1th loop, of the solutions two coincident nonlinear equations.Every loop consists of thinking the new conjecture values of solutions and look intoing for the needed convergence. Since ab initio the conjecture values are already known from input, the portion of thinking the root value is avoided in the first loop. The iterative process is stopped by look intoing the maximal value of comparative mistake in the deliberate value of x and y during the Ith loop and eps is taken as the bound of this mistake.The algorithm, besides, makes the commissariats of

a ) halting the iterative process if figure of loops exceed some figure ( state N ) , and

B ) printing root value with is possible mistake and warning of “ no convergence “ if figure of loops becomes equal to N.

The values x0, Y0, eps and N are the inputs.

// Program ( 2.18.1 ) Find solutions of two non-linear equations

// X0, Y0: present conjecture of solution

// XA, YA: new conjecture of solution

// F, G: given map value at X, Y

// DFDX, DGD, DFDY, DGDY ( map derived function values at X, Y

// ER: mistake with approximative root

// EPS: ( mistake bound for convergence

// I: current loop figure

// N: Limit of loop figure

// — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

# include & lt ; iostream.h & gt ;

# include & lt ; conio.h & gt ;

# include & lt ; math.h & gt ;

# define FUNF ( X, Y ) X*X+X*Y-10 // Given map degree Fahrenheit ( X, Y ) ;

# define FUNG ( X, Y ) 3*X*Y*Y+Y-57 // Given map g ( X, Y )

# define DFDX ( X, Y ) 2*X+Y // Deri. of degree Fahrenheit ( X, Y ) w.r.t. Ten

# define DGDX ( X, Y ) 3*Y*Y // Deri. of g ( X, Y ) w.r.t. Ten

# define DFDY ( X, Y ) X // Deri. of degree Fahrenheit ( X, Y ) w.r.t. Yttrium

# define DGDY ( X, Y ) 6*X*Y +1 // Deri. of g ( X, Y ) w.r.t. Yttrium

nothingness chief ( )

{

int N, I ;

float X, Y, X0, Y0, EPS, XA, YA, ER, ERX, ERY ;

float F, G, FX, GX, FY, GY, D, HX, HY ;

cout & lt ; & lt ; “ Find solutions of two non-linear equations

” ;

cout & lt ; & lt ; “ Enter the inputs X0, Y0, EPS and N: “ ;

cin & gt ; & gt ; X0 & gt ; & gt ; Y0 & gt ; & gt ; EPS & gt ; & gt ; N ; // Read input informations

cout & lt ; & lt ; endl & lt ; & lt ; endl ;

XA = X0 ; YA = Y0 ; ER = float ( 1.5* EPS ) ; I = 0 ;

make

{

I = I +1 ;

Ten = XA ;

Y = YA ;

F = FUNF ( X, Y ) ;

G = FUNG ( X, Y ) ;

FX = DFDX ( X, Y ) ;

GX = DGDX ( X, Y ) ;

FY = DFDY ( X, Y ) ;

GY = DGDY ( X, Y ) ;

D = FX*GY – GX*FY ;

HX = ( G*FY – F*GY ) / D ;

HY = ( F*GX – G*FX ) / D ;

XA = X + HX ;

YA = Y + HY ;

ERX = float ( fabs ( HX/XA ) ) ;

ERY = float ( fabs ( HY/XA ) ) ;

ER = ERX ;

if ( ER & lt ; ERY ) ER = ERY ;

cout & lt ; & lt ; X & lt ; & lt ; “ “ & lt ; & lt ; Y & lt ; & lt ; “ “ & lt ; & lt ; ER & lt ; & lt ; “ “ & lt ; & lt ; I & lt ; & lt ; endl ;

} while ( ( ER & gt ; EPS ) & A ; & A ; ( I & lt ; = N ) ) ;

cout & lt ; & lt ; endl & lt ; & lt ; “ Solutions are = “ & lt ; & lt ; X & lt ; & lt ; “ “ & lt ; & lt ; Y ;

cout & lt ; & lt ; endl & lt ; & lt ; “ With mistake = “ & lt ; & lt ; ER ;

if ( I & gt ; N )

cout & lt ; & lt ; endl & lt ; & lt ; “ No convergence “ ;

else

cout & lt ; & lt ; endl & lt ; & lt ; “ Convergence reached “ ;

// getch ( ) ;

}

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Free Essays
Bullying and People Essay

Bullying- everyone knows about it, but a lot of people don’t realize why it’s serious. Bullying can be defined as unwanted, aggressive behavior among school aged children that involve a real or perceived power imbalance. About 30% of teens in the U.S have been involved in bullying. People should care …

Free Essays
Most difficult aspects of learning English Essay

I studied English language at school and in university, but when I started to work in Russian-American it-company I met several difficulties with my English. I understood that my English wasn’t perfect and I need study more to build my career,, because in this company and generally you have to …

Free Essays
Cell Phone Essay

Many kids these days have cell phones. You often see teenagers talking on their phones, or, just as often, texting. It has become a part of everyday life, and a part of our society. It is encouraged socially, especially among teenagers, to have a phone. Cell phones can be very …

x

Hi!
I'm Terry

Would you like to get such a paper? How about receiving a customized one?

Check it out