I am trying to do some Newton's method-type stuff in Mathematica.(adsbygoogle = window.adsbygoogle || []).push({});

I want to build a While loop that does the following:

- Take input r.

- Compute some quantity f(r).

-Update the value of r to f(r).

- Repeat until |g(r)| < C for some fixed constant C.

The third (boldfaced) step is the one I'm having trouble with. I don't know how to do this. Can someone help?

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

Dismiss Notice

Join Physics Forums Today!

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

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

# While loops in Mathematica

Loading...

Similar Threads for While loops Mathematica |
---|

Mathematica Storing Mathematica output |

Mathematica Looping through vectorized functions for a piecewise solution |

Mathematica Mathematica to MATLAB |

Mathematica Cannot do the integral of the Hyper-geometric function? |

Mathematica While Loop in Mathematica |

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