Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An alternative way to compute stationary points of a function f is the brute-force global minimum and global maximum search method of Lab 3 .

image text in transcribed

An alternative way to compute stationary points of a function f is the "brute-force" global minimum and global maximum search method of Lab 3 . 3. (9 pt) Implement a function that computes, using the global minimum and global maximum search method, an approximation of the local minimum (stationary point) of an arbitrary function f(x). We assume that the search interval is such that it contains one stationary point (local minimum or maximum) and that that local minimum/maximum is the global minimum/maximum. - The arguments of the 'global minimum/maximum search function' should receive a given search interval, the names of the python functions implementing f and its derivative f (both defined for a single input argument x, single return value f(x) or f(x) ), the tolerance for verifying the value of the derivative, and a maximum number of iterations. - Adapt the method of Lab 3 such that the number n of sub-domains is doubled if the absolute value of the derivative at the approximate stationary point (minimum or maximum) does not yet satisfy the given tolerance. The first iteration should evaluate the midpoint of the initial search interval (n=1). - The function should return the same quantities as the bisection function, i.e., the root (position of minimum), the value of f at this root, the number of iterations and the number of function evaluations (which should be the sum of the evaluations of the function f and its derivative f). - Test your implementation of the brute-force method to find the minimum of f(x)=exp(x2), on a non-symmetric interval of search around 0

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

More Books

Students also viewed these Databases questions

Question

3. Are our bosses always right? If not, what should we do?

Answered: 1 week ago

Question

2. What, according to Sergey, was strange at this meeting?

Answered: 1 week ago