{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw3_solutions

# hw3_solutions - MAE 107 Computational Methods in...

This preview shows pages 1–3. Sign up to view the full content.

MAE 107 Computational Methods in Engineering Spring 2007 Homework #3 Solutions

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Problem 2: Problem 7.12 on page 184 of the textbook. As shown in section 7.2.1 in the textbook, the maximum error E n after n iterations is ) ( ) 2 ( n n x E = φ In which x ( n ) is the length of the interval at the n th iteration. Since each iteration reduces the length of the interval by a factor of 1/ φ, the length of the interval at the n th iteration is given by n n x x φ ) 0 ( ) ( = in which x (0) is the initial length of the search interval. If we want E n to be less than some specified error E , then from the previous two equations we must require φ φ φ φ log ) 2 ( log ) 2 ( ) 0 ( ) 0 ( E x n x E n Below is a Matlab script that uses the Matlab function M-file goldmin_n.m to find the minimum of the function defined in example 7.2 in the text. Goldmin_n.m uses the golden section search to find the minimum of a function, using the number of iterations given by the above formula
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}