syms x y lamf = 2*x^4-x^2+3*y^2g = x^2+y^2+3*y-9fx = diff(f,x)fy = diff(f,y)gx = diff(g,x)gy = diff(g,y)[alam ax ay] = solve( fx-lam*gx, fy-lam*gy)[bx by] = solve( gx,gy )T = [ ax ay subs(g,{x y},{ax ay}) subs(f,{x y}, {ax ay })({bx by}) subs(g,{x y},{bx by}) subs(f,{x y}{bx by})]double(T)double(T([1,2,3,4,7,8],[1,2,3,5]))
MATLAB: I keep getting the message: Unbalanced or unexpected parenthesis or bracket. How to fix it? I’m trying to solve for the maximum and minimum with a function and it’s constraint.
absolute maximum minimum
Best Answer