Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB ONLY We mentioned in class that Newton's method can work very slowly when finding minima of certain functions. The problem arises when more than

MATLAB ONLY

image text in transcribed

We mentioned in class that Newton's method can work very slowly when finding minima of certain functions. The problem arises when more than one derivative vanishes at the minimum Remember that if r* is the minimum of f(x), then f'(x*) is zero. If F"(x*) is also zero, then Newton's method will take longer to converge. If f"(x*) and f'(x*) are both zero, then Newton's method will take longer still. We will explore this phenomenon in the following problem In all of the problems that follow, you should use a tolerance of 10-8 and an initial guess of X = 2. 1. The function f(x) = x2 has a minimum at r* = 0. It is easy to check that f'(0 = 0 but that f"0 +0. Use Newton's method to approximate this minimum. Count how many iterations the method took to converge (the initial guess does not count, but every other guess counts as one iteration) and save this value in a variable named ans1 2. The function f(x) = r also has a minimum at x* = 0. It is easy to check that both f'(0 and "0) are zero. Use Newton's method to approximate this minimum. Count how many iterations the method took to converge (the initial guess does not count, but every other guess counts as one iteration) and save this value in a variable named ans2. 3. Repeat the process above with f (x) = xlo f (x) = x100 S (x) = 2500 and f(x) = x1000 Save the number of iterations each problem took in ans3, ans4, ans5 and ans6, respectively 4. Now use the golden section search method to find the minimum of f(x) = x1000 between a=-2 and b= 2. Count the number of iterations required and save it in ans7. (There isn't really an initial guess in section search, so you should count every time you calculate a new x and/or y as an iteration. If you are using the code we wrote in class, we did one iteration before the loop began, and then one more every time through the loop.) We mentioned in class that Newton's method can work very slowly when finding minima of certain functions. The problem arises when more than one derivative vanishes at the minimum Remember that if r* is the minimum of f(x), then f'(x*) is zero. If F"(x*) is also zero, then Newton's method will take longer to converge. If f"(x*) and f'(x*) are both zero, then Newton's method will take longer still. We will explore this phenomenon in the following problem In all of the problems that follow, you should use a tolerance of 10-8 and an initial guess of X = 2. 1. The function f(x) = x2 has a minimum at r* = 0. It is easy to check that f'(0 = 0 but that f"0 +0. Use Newton's method to approximate this minimum. Count how many iterations the method took to converge (the initial guess does not count, but every other guess counts as one iteration) and save this value in a variable named ans1 2. The function f(x) = r also has a minimum at x* = 0. It is easy to check that both f'(0 and "0) are zero. Use Newton's method to approximate this minimum. Count how many iterations the method took to converge (the initial guess does not count, but every other guess counts as one iteration) and save this value in a variable named ans2. 3. Repeat the process above with f (x) = xlo f (x) = x100 S (x) = 2500 and f(x) = x1000 Save the number of iterations each problem took in ans3, ans4, ans5 and ans6, respectively 4. Now use the golden section search method to find the minimum of f(x) = x1000 between a=-2 and b= 2. Count the number of iterations required and save it in ans7. (There isn't really an initial guess in section search, so you should count every time you calculate a new x and/or y as an iteration. If you are using the code we wrote in class, we did one iteration before the loop began, and then one more every time through the loop.)

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_2

Step: 3

blur-text-image_step3

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

More Books

Students also viewed these Databases questions

Question

How is bond refunding like a capital budgeting project?

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago

Question

3. Identify the methods used within each of the three approaches.

Answered: 1 week ago