Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1 Let f(x) = 1cosx x2 . 1a) Show that (Hint: Lhospital rule) lim h0f(h) = 1/2 1b) Find the rate of convergence of

Problem 1 Let f(x) = 1cosx x2 . 1a) Show that (Hint: Lhospital rule) lim h0f(h) = 1/2 1b) Find the rate of convergence of f(h) 1/2 as h 0. That is, find the constant such that lim h0 |f(h) 1/2| h is a nonzero constant. Hint: You may use the Taylor expansion of cosx at x = 0. 1c) Write a Matlab program to calculate the function value f(x) and error |f(x) 1/2| at x = 0.1,0.01, ,108. Fill the results in a table in the following format (by hand) x f(x) |f(x) 1/2| 101 4.9958e-01 4.1653e-04 102 . . . . . . use the command format short e to show the result in scientific notation . . . 1d) Does the error in c) converges to 0 as x 0? If yes, does it convergence at the rate shown in step c)? If no, explain why the result does not converge? Problem 2. Find an approximation to a root of x3 +x4 = 0. 2a) Show that x3 +x4 has at least one root in the interval [1,4]. 2b) Show that derivative of x3 + x 4 is strictly positive for all x R. 2c) Write Matlab programs for the two methods (Bisection method and Newton method) based on the model program given below. For Newtons methods, use the initial guess x0 = 1. Print out the approximation given after each iteration and the total number of iterations required by each method. Note that for these methods, we will assume we have satisfied the given accuracy requirement if two successive iterates agree to the given error tolerance, i.e., |xn+1 xn| 103. Problem 3. The iteration xn+1 = 2 (1 + c)xn + cx3n will converge to s =1for some values of c (provided x0 is chosen sufficiently close to s). Find the values of c for which this is true. For what values of c will the convergence be quadratic? Problem 4. Write a Matlab code for Newtons method to find a (nonzero) root of the system x x2y2 =0, yx2+y2 =0 starting with x0 = 0.5,y0 = 0.5. Use format long and stop when both components of two successive iterates agree to 14 decimal places. Display the approximations given and the size of the functions at each iteration. To solve the ensuing linear system, e.g. Ax = b, use the command x = A \ b; Problem 5. Solve the same problem using Matlabs fsolve routine. To run this program, type options = optimset(Display, iter); x0 = [0.5,0.5] [x,fval] = fsolve(@fcnns,x0,options) where fcnns is the name of the M-file defining the functions. Note that Matlab expects the functions to be defined as a vector. See the Matlab help page for further instructions.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions

Question

What is media access control, and why is it important?

Answered: 1 week ago