If I maximize $x^3/3-3y^2/2+2x \;$ subject to $x-y=0$ by using the Lagrangean method and confirm the bordered Hessian condition, I get that no solution exists. This can also be seen by looking at the graph.
However, if I substitute the constraint into the objective function and treat it as an unconstrained optimization problem, then I get (1,1) as the maximum and (2,2) as the minimum. Clearly, this is incorrect, as it doesn't agree with the graph.
In this context, I want to ask when does substitution work and when does it not? Should we never simplify a problem using substitution?