Apply the Newton-Raphson's method xn+1 = xn – f '(xn) / f ''(xn) to develop a function double findMinMax(…) that returns a solution that is either a minimum value or a maximum value for z. The program finds a local minimum or a local maximum when the difference between the new solution and the previous one is smaller than 0.00001 within 10000 iterations. Otherwise, it shows Infinity as output. Let function z = x4+2y6 – xy – x + 2. Show the post-conditions for z. The preconditions for x and y are shown as below. Feel free to choose an arbitrary initial guess values x0 and y0 that meet the following precondition. |x| ≤ 6 and |y| ≤ 5
Apply the Newton-Raphson's method xn+1 = xn – f '(xn) / f ''(xn) to develop a function double findMinMax(…) that returns a solution that is either a minimum value or a maximum value for z. The program finds a
-
- Let function z = x4+2y6 – xy – x + 2. Show the post-conditions for z.
The preconditions for x and y are shown as below. Feel free to choose an arbitrary initial guess values x0 and y0 that meet the following precondition.
-
- |x| ≤ 6 and |y| ≤ 5
As per the question, we have to construct a function findMinMax(…) which will return the maximum/minimum value of the given 2d function.
Then we have to test this function using the given example :
z = x4 +2y6 – xy – x + 2
With initial values of x,y such that : |x| ≤ 6 & |y| ≤ 5
Here we will take : x0 = y0 = 1
Trending now
This is a popular solution!
Step by step
Solved in 2 steps