Lagrange Problem

No.14260009 ViewReplyOriginalReport
First off this is NOT a homework problem it was just a hypothetical example I came up with

Second how do I solve the Lagrange Equation in this region? I asked my professor this and we couldn't figure it out