User Tools

Site Tools


gibson:teaching:spring-2018:math445:lab7

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
gibson:teaching:spring-2018:math445:lab7 [2018/03/19 14:49]
gibson
gibson:teaching:spring-2018:math445:lab7 [2018/03/29 06:55] (current)
gibson
Line 18: Line 18:
 1. Use a ''​for''​ loop to perform the Newton-search iteration $x_{n+1} = x_n + \Delta x$. Take up to ten Newton-search iterations. 1. Use a ''​for''​ loop to perform the Newton-search iteration $x_{n+1} = x_n + \Delta x$. Take up to ten Newton-search iterations.
  
-2. Use an ''​if''​ statement inside the ''​for''​ loop to test if either $|f(x)| < \epsilon$ or $|\Delta x| < \epsilon$ for some specified tolerance $\epsilon$. +2. Use an ''​if''​ statement inside the ''​for''​ loop to test if either $|f(x)| < tol$ or $|\Delta x| < tol$ for some specified tolerance $tol$. 
  
-3. If either of those conditions is true, use a ''​break''​ statement to terminate the iteration and return from the function. For our purposes $\epsilon ​= 10^{-7}$ is a decent choice. ​+3. If either of those conditions is true, use a ''​break''​ statement to terminate the iteration and return from the function. For our purposes $tol = 10^{-13}$ is a decent choice. ​
  
 ---- ----
gibson/teaching/spring-2018/math445/lab7.txt ยท Last modified: 2018/03/29 06:55 by gibson