Solving The Nonlinear Equations with Two Unknowns Through

  • Slides: 6
Download presentation
Solving The Nonlinear Equations with Two Unknowns Through The Newton Method. Soon-Young Min Department

Solving The Nonlinear Equations with Two Unknowns Through The Newton Method. Soon-Young Min Department Of Physics Kangwon National University Newton’s method is used to find root of two equations. We use the linear method to solve the problem of nonlinear. The method is commonly used because of its simplicity and great speed.

Theory Newton’s method to solve equations of two variables. is root of . Using

Theory Newton’s method to solve equations of two variables. is root of . Using Taylor Series ** : Partial differential equation of . ** : initial value. Newton’s method is derived by assuming that since is small, the term involving so omission. is much smaller,

Transpose Solving for a, b gives And x, y gives Generates the sequence

Transpose Solving for a, b gives And x, y gives Generates the sequence

Algorism INPUT function F, G differentiated function Fx, Gx, Fy, Gy initial approximation x

Algorism INPUT function F, G differentiated function Fx, Gx, Fy, Gy initial approximation x 0, y 0 ; OUTPUT Step 1 tolerance approximation x , y do { Step 2 INPUT F , Fx , Fy ; G , Gx , Gy ; Step 3 Step 4 x 0 = x , } while Step 5 OUTPUT ( Result x , y ) STOP. y 0 = y ; ;

Programming with C language #include <stdio. h> do{ #include <math. h> F(); Fx(); Fy();

Programming with C language #include <stdio. h> do{ #include <math. h> F(); Fx(); Fy(); Gx(); Gy(); double x, y; double f, g, fx, gx, fy, gy; x 1 = x+((fy*g-f*gy)/(fx*gy-fy*gx)); y 1 = y+((f*gx-fx*g)/(fx*gy-fy*gx)); void F(); void Fx(); xtol = x 1 -x; void Fy(); ytol = y 1 -y; void G(); void Gx(); x = x 1; void Gy(); y = y 1; } void main() while( fabs(xtol)>tolerance || fabs(ytol)>tolerance ); { double tolerance; printf("n Result x, y = %lf, %lf n", x , y ); double x 1, y 1, xtol, ytol; getch(); } tolerance = 0. 00001; void F(){ f = x*x-y-2; } x = -3; void G(){ g = -(x*x)-y+1; } y = -7; void Fx(){ fx = 2*x; } void Gx(){ gx = -2*x; } void Fy(){ fy = -1; } void Gy(){ gy = -1; }

SUMMARY 1. Newton’s method is used to find root of simultaneous equations. 2. We

SUMMARY 1. Newton’s method is used to find root of simultaneous equations. 2. We use the linear method to solve the problem of nonlinear. 3. The method is commonly used because of its simplicity and great speed.