Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This needs to be solved using Python, please :) Section B- Minimize the following function instead: f(x, y) = 3x2 + 5y2 +5x3 1) Define
This needs to be solved using Python, please :)
Section B- Minimize the following function instead: f(x, y) = 3x2 + 5y2 +5x3 1) Define the function and its analytical gradient in Jupyter notebook. ( 2 marks) 2) Implement a steepest gradient algorithm. Use Xo = 2, yo = 20 as starting points. You can consider that the algorithm has converged to a solution if f(x,y) is within 0.0001 of its optimal value. (4 marks). 3) BONUS (2 marks): Plot the value of f(x,y), x, and y. For example: MECH203 - Mathematical and Computational Tools for Mechanical Engineers II Second landscape V 12 -0.2 0.0 0.2 0.4 0.6 0.8 10 (you should insert better labels and legends.) 4) Use the CG and BFGS algorithms available in the SciPy.optimize.minimize module. Use Xo = 2, yo = 20 as starting points. (4 marks). 5) How many minima does this function have? (2 marks) 6) Can the computer find them all? (2 marks) 7) Are they local or global? (2 marks) Section B- Minimize the following function instead: f(x, y) = 3x2 + 5y2 +5x3 1) Define the function and its analytical gradient in Jupyter notebook. ( 2 marks) 2) Implement a steepest gradient algorithm. Use Xo = 2, yo = 20 as starting points. You can consider that the algorithm has converged to a solution if f(x,y) is within 0.0001 of its optimal value. (4 marks). 3) BONUS (2 marks): Plot the value of f(x,y), x, and y. For example: MECH203 - Mathematical and Computational Tools for Mechanical Engineers II Second landscape V 12 -0.2 0.0 0.2 0.4 0.6 0.8 10 (you should insert better labels and legends.) 4) Use the CG and BFGS algorithms available in the SciPy.optimize.minimize module. Use Xo = 2, yo = 20 as starting points. (4 marks). 5) How many minima does this function have? (2 marks) 6) Can the computer find them all? (2 marks) 7) Are they local or global? (2 marks)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started