# numeric_maximize function

The maximum of an expression found numerically, with the point where it is reached.

## How to write it

### numeric_maximize(expr, variables)

In a bounded region the search is global; a note says when it stopped before proving it.

**expr**

The objective, or the objective first and then its conditions, in brackets. Takes an expression, or a list.

**variables**

A variable, or a list of variables such as \[x, y\]. Takes a variable, or a list of variables.

## Examples

- $\displaystyle \operatorname{numeric\_maximize}(\left[ x \sin(x), x \ge 0, x \le 20 \right], x) \approx \left[ 18.258905014552553, \left[ x \to 20.0 \right] \right]$

  `numeric_maximize([x*sin(x), x >= 0, x <= 20], x)`

  In the solver, `numeric_maximize([x*sin(x), x >= 0, x <= 20], x)` gives `[18.258905014552553, [x -> 20.0]]`.

  [Open in the solver](https://hilberon.com/?q=numeric_maximize%28%5Bx*sin%28x%29%2C%20x%20%3E%3D%200%2C%20x%20%3C%3D%2020%5D%2C%20x%29)

## Functions its examples use

- [sin](https://hilberon.com/library/sin)

  Sine of an angle in radians.

## Related functions

- [maximize](https://hilberon.com/library/maximize)

  The maximum of an expression and the point where it is reached.
- [numeric_minimize](https://hilberon.com/library/numeric_minimize)

  The minimum of an expression found numerically, with the point where it is reached.
- [minimize](https://hilberon.com/library/minimize)

  The minimum of an expression and the point where it is reached.
- [max_value](https://hilberon.com/library/max_value)

  The maximum value of an expression.
- [min_value](https://hilberon.com/library/min_value)

  The minimum value of an expression.

---
Source: https://hilberon.com/library/numeric_maximize
