NMaximize¶ Numerical global maximization with constraints using sampling and gradient refinement. $ wo 'NMaximize[-(x - 1)^2, x]' {0., {x -> 1.}}