Why isn't the code working properly?

October 28 2009 by Jabz 433
false
Maple

0


restart:
 NEWTON_RAPH:= proc(f,z,M)
   local x,A:
    x := z:
    for A to M do:
      x :=  ( x - ( f ( x ) / D ( f ) ( x ) )  - ( ( ( ( D@@2 ) ( f ) ) * ( ( f( x ) ) ^ 2 ) n ) / ( 2 * ( D ( f ) ( x) ) ^3 ) ) )
       end do:
    evalf(x):
  end proc:
 f:= x-> x ^ 2 - 5:
 NEWTON_RAPH(f,1,10);
                                     1.

 

please someone help me i did each line of code seperately and they work fine but when i put it all together it just gives me one

 
Loading Comments & Answers

You must be logged into your MaplePrimes account in order to post a comment. If you don't have an account, you can create an account here.

     

Forgot Your Password? Create an Account