12.07.2015 Views

Principles of Linear Algebra With Maple The Newton–Raphson ...

Principles of Linear Algebra With Maple The Newton–Raphson ...

Principles of Linear Algebra With Maple The Newton–Raphson ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.1 Newton-Raphson for Two Equations in Two Unknowns 23> G:= unapply(convert(simplify(evalm(vector([x, y]) - jacobian(F(x,y),[x,y])ˆ(-1)&*F(x, y))), list), x, y);[ 1G := (x,y) →2− 1 2> G(-.25+.433*I,.433-.75*I);41x 2 y −137x 2 +5599y−96y 2 −43039,41xy −137x−323y+611−41xy 2 +323y 2 +200x 2 −10391x+10917341xy−137x−323y+611[−35.67946232+9.764850390I,−92.91549690+40.44912122I]> n:= 6:> newt[0]:= [-2., 20]:> for i from 1 to n donewt[i]:= G(newt[i-1][1], newt[i-1][2]);od:> seq(newt[i-1],i=1..n+1);[−2.,20],[−2.305821206,20.28794179],[−2.302041868,20.28440766],[−2.302041289,20.28440713],[−2.302041292,20.28440712],[−2.302041294,20.28440712],[−2.302041294,20.28440712]> root1 := newt[6];root1 := [−2.302041294,20.28440712]]Sothe root<strong>of</strong>the system<strong>of</strong>equationsclosestto the point (−2,20)is newt[6]which we have called root1. We also check this root using fsolve where we musttell it where to look in order to get back just this single root.After each computation <strong>of</strong> the table newt we will unassign it so that it iscleared to be used again without worrying that if we change n to a smallervalue we may get leftover values in newt from its previous use. You can clearnewt using the unassign command or by saying “newt:= ‘newt’;”.> fsolve({f(x,y) = 0, g(x,y) = 0}, {x, y}, {x=-3..0,y=15..25});> unassign(’newt’);> n:= 7:> newt[0]:= [20., 13]:> for i from 1 to n do{x = −2.302041291,y= 20.28440712}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!