WLJS LogoWLJS Notebook

FindMaximum

FindMaximum[f, {x, x0}] searches for a local maximum in f, starting from the point x=x0.

Examples

Find local maximum:

FindMaximum[-x^2 + 4x + 5, {x, 0}]
(* {9., {x -> 2.}} *)

With constraints:

FindMaximum[{x + y, x^2 + y^2 <= 1}, {{x, 0.5}, {y, 0.5}}]
(* {1.414, {x -> 0.707, y -> 0.707}} *)

Please visit the official Wolfram Language Reference for more details.

On this page