472F16hw2 - Math 472 F 2016 Homework 2 Due Friday Sept 30...

• Homework Help
• 2

This preview shows page 1 - 2 out of 2 pages.

Math 472, F 2016 Homework 2 Due Friday Sept 30 at 4 pm Include a cover page Always clearly label all plots (title, x -label, y -label and legend) Use the subplot command from MATLAB when comparing 2 or more plots to make comparisons easier and to save paper. Include all of your MATLAB code. Place a comment at the top of each submited function or script including the name of the function or script, the date and MATH 472. (1) As described in class, write a MATLAB function file which uses N iterations of the bisection method to approximate the solution to the equation sin x - 0 . 5 = 0 in the interval a < x < b. The input for the MATLAB function should be a, b, N . With a = 0 , b = 1, let x N denote the N th iterate. Calculate the value of 6 x N when N = 20 and compare it to the exact answer π . Find the number of significant digits 6 x N gives π to, and explain why this is a reasonable expectation for the bisection method you have used. (2) As described in class, write a MATLAB function file which computes N iterations of the function g ( x ) = 3
• • • 