A rectangular box open at the top is to have volume of 32 cubic ft. Find the dimensions of the box requiring least material for
My Attempt: clc %clears the command window clear all %clears the workspace clear vars %clear all the variables in the workspace syms x y z t %declaring new variables surf = x*y + 2*x*z + 2*y*z %writing the surface area function vol = x*y*z - 32 %writing the volume function func = surf + t*vol %writing the lagrange multiplier theorem S = x*y + 64/y + 64/x %modifying the surface area equation dfx = diff(S,x); %differentiating the function wrt x dfy = diff(S,y); %differentiating the function wrt y eqns = [dfx,dfy]; %creating the eqns of dfx and dfy [vx,vy] = solve(eqns,[x y],'Real',true) %getting the real values of x and y r = diff(dfx,x); %getting the r value by differentiating t = diff(dfy,y); %getting the t value by differentiating s = diff(dfx,y); %getting the s value by differentiating check = r*t - s^2 if check > 0 disp('ac') end But unfortunately gives an error in the 'if' while checking whether check>0. The error is 'conversion to logical from sym is not possible' Concepts used to solve this question: Lagrange's Multiplier Theorem Any HELP, please!!!