channelflow.org

Site Tools

gibson:teaching:fall-2014:math445:lab4

Differences

This shows you the differences between two versions of the page.

 gibson:teaching:fall-2014:math445:lab4 [2014/10/21 10:56]gibson gibson:teaching:fall-2014:math445:lab4 [2014/10/25 05:01] (current)gibson Both sides previous revision Previous revision 2014/10/25 05:01 gibson 2014/10/21 10:56 gibson 2014/10/21 10:55 gibson 2014/10/21 07:53 gibson 2014/10/20 11:00 gibson 2014/10/20 10:59 gibson 2014/10/20 10:58 gibson created 2014/10/25 05:01 gibson 2014/10/21 10:56 gibson 2014/10/21 10:55 gibson 2014/10/21 07:53 gibson 2014/10/20 11:00 gibson 2014/10/20 10:59 gibson 2014/10/20 10:58 gibson created Line 2: Line 2: - Use a ''​for''​ loop to perform the Newton-search iteration. Take up to ten Newton steps. - Use a ''​for''​ loop to perform the Newton-search iteration. Take up to ten Newton steps. - - Use a ''​if''​ statement inside the ''​for''​ loop to test if either $|f(x)| < \epsilon$ or $|dx| < \epsilon$. If so, use a ''​break''​ statement to terminate the iteration and return from the function. For our purposes ''​1e-07''​ is a decent choice for the value of tolerance $\epsilon$. ​ + - Use a ''​if''​ statement inside the ''​for''​ loop to test if either $|f(x)| < 2 \epsilon$ or $|dx| < \epsilon$. If so, use a ''​break''​ statement to terminate the iteration and return from the function. For our purposes ''​1e-07''​ is a decent choice for the value of tolerance $\epsilon$. ​ ​ ​