Thank you so much Ahmed, very nice comment.
Sure UB = [Lambda] UN not [Lambda]UN (I don't use
I agree with you, that's a very good way to minimize the loss function. The idea was to show intermediate steps for teaching purposes.
Let me ask you a question, why did you include [[2]] in the following expression:
p/.FullSimplify[Minimize[{L,\[Lambda]<1},p]][[2]]
Best,
Jamel