Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(7 Points) Fixed-Point iteration is a root-finding technique where determine the value of x that makes a function f(x) have a target value of g.

(7 Points) Fixed-Point iteration is a root-finding technique where determine the value of x that makes a function f(x) have a target value of g. the function you are solving is re-arranged so that x is on the left side of the equation and the next guess of the root is found by evaluating g at the current guess of the root Iteration continues until the relative error epsilon: gets less than a tolerance (e.g., 1e-6). Write a function with the header function s = myFixedPoint(f, targetValue, x, tol) which solves for the value of x that will make f(x) the target value. You should ensure any while-loops have an iteration counter which prevents infinite loops. (Should be a maximum of 1000.)

image text in transcribed

image text in transcribed

Problem 2: (7 Points) Fixed-Point iteration is a root-finding technique where determine the value of x that makes a function fx) have a target value of g. the function you are solving is re-arranged so that x is on the left side of the equation g f(x) g+x x =f(x) + x =f(x) + x-g and the next guess of the root is found by evaluating g at the current guess of the root xi+1-f(xi) + xi - g Iteration continues until the relative error epsilon: xi+1 gets less than a tolerance (e.g.. le-6) Write a function with the header functions myFixedPoint (f, targe tValue, x, tol) which solves for the value of x that will make f(x) the target value. You should ensure any while-loops have an iteration counter which prevents infinite loops. (Should be a maximum of 1000.) >> f1 @(x) exp (-x) -x; >myFixedPoint (fl, 0, 1, .00001) x0.367879, relErr x0.692201, relErr x0.500474, relErr- x0.606244, relErr x0.545396, relErr 1.72 0.47 0.38 0.17 0.11 Problem 2: (7 Points) Fixed-Point iteration is a root-finding technique where determine the value of x that makes a function fx) have a target value of g. the function you are solving is re-arranged so that x is on the left side of the equation g f(x) g+x x =f(x) + x =f(x) + x-g and the next guess of the root is found by evaluating g at the current guess of the root xi+1-f(xi) + xi - g Iteration continues until the relative error epsilon: xi+1 gets less than a tolerance (e.g.. le-6) Write a function with the header functions myFixedPoint (f, targe tValue, x, tol) which solves for the value of x that will make f(x) the target value. You should ensure any while-loops have an iteration counter which prevents infinite loops. (Should be a maximum of 1000.) >> f1 @(x) exp (-x) -x; >myFixedPoint (fl, 0, 1, .00001) x0.367879, relErr x0.692201, relErr x0.500474, relErr- x0.606244, relErr x0.545396, relErr 1.72 0.47 0.38 0.17 0.11

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

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

How much time should be spent in mental training?

Answered: 1 week ago