Question: Trying to use Newton's Method within a tolerance, but output isn't spitting out number values?

Basically what I'm trying to do is use Newton's method to find the root of f(x)=sqrt(x)+ln(0.1x) starting at x0=5 within a tolerance of 0.001.

 

f := proc (x) options operator, arrow; sqrt(x)+ln(.1*x) end proc

> xk := 1.0;
print(`output redirected...`); # input placeholder
                              1.0
> for k to 6 do xk1 := xk-f(xk)/(D(f))(xk); xk := xk1 end do;
 

 

When I do that, Maple barfs out pages of nonsense when I'm looking for it to give numerical values. It seemed to work fine with a different function, so maybe that's part of the problem? But I need to do it with the function I asked about.

Please Wait...