(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

I'm trying to make a Newton's method procedure in Maple, but I can't figure out what's wrong.

2. Relevant equations

Code (Text):

newton := proc (func, iterations, guess)

f := unapply(func, x);

fprimej := diff(f(x), x);

fprime := unapply(fprimej, x);

for i from 1 to iterations do:

value := evalf(guess-f(guess)/fprime(guess));

printf("Iteration %d: %a\n", i, value);

guess := value;

end do;

end proc;

3. The attempt at a solution

Something is going wrong when I assign "guess" to "value" because it works fine if I hard code a "guess" value in. What's the correct (and error free) way of assigning "guess" to "value?" Thank you.

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Maple loop troubles

**Physics Forums | Science Articles, Homework Help, Discussion**