Find the minimum of the function fx y exp5x exp2y 32x 10
Find the minimum of the function f(x, y) = exp(5x) + exp(2y) - 32x - 100y + 100y^2 + 42x^2 with the constraint that -1 lessthanorequalto x lessthanorequalto 1 and - 1 lessthanorequalto y lessthanorequalto 1. What are the x and y values that return the minimum?
Solution
clc
clear;
x=-1:0.001:1;
y=-1:0.001:1;
f=exp(5*x)+exp(2*y)-32*x-100*y+100*y.^2+42*x.^2;
fmin=min(f)
result:
fmin =
-21.0366
>>
