CHEN 3201 Lecture 20: 2015_2_24 Recitation.pdf

9 views5 pages

Document Summary

Problem 1: use picard"s method to find the roots of for the initial guesses -0. 1, 0. 6, 1. 99, and 2. 01 we can factor it easily as. The function goes through a minimum --> that will cause some problems now using picard"s method; just add x to both sides. -> will monotonically converge this means x = 2 will cause it to diverge we need a while loop and pass some value of x into it count = 0. Print while error > 10^(-8) count = count + 1 x = x + residual(x) R = residual(x) error abs(r) if error > 100 fprintdoes not converge error = 0; end note: function out = residual(x) out = x^2 - 3*x+2; residual just calculates f(x) Problem 2: do same thing but with newton"s method. Chen3201_numericalmethods page 4 rem = remainder (like mod operator in java)

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers