Question: Question 2.(8 points) This problem is focused on optimization using open methods with convergence criteriabased on relative error. For this problem you are required to

Question 2.(8 points) This problem is focused on optimization using open methods with convergence criteriabased on relative error. For this problem you are required to build separate MATLAB functions for the secantmethod and Newton's method to approximate a root r satisfying f(r)=0 for a given function f.We will be applyingthese root finding algorithms to the derivative of the functions we seek to optimize.Build your open method root finding algorithms to have the structure[xr,fr]=secant(f,x0,x1,p,nmax)[xr,fr]=newton(f,x0,p,nmax)where both methods are iterated until either the sequence of approximations has converged top significantdigits OR the number of iterations has exceeded nmax.For the purposes of this problem, let G denote a "googol", that isa1 followed by100 zeroes:G=10100Next consider the function ?(()3)f(x)=10G(1-x-x22+G2eG-2x+G-1)Using tools from first-year calculus and both of your open root finding algorithms, locate and classify all localextreme points offx-coordinatef to8 significant digits. Note this may require that you chooseinitial guesses close enough to any local extreme points and an adequately large maximum number of iterations -there may be some "trial and error" involved! Then, use tools from calculus (e.g. first or second derivative test)toclassify the extreme points as local max, local min, or neither. Please help me with the code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!