# Mathlas repository

## analytical package

The analytical package contains three analytical function definitions commonly used for optimization algorithm testing: the humps, Branin, and Rosembrock functions.

All these functions present some difficulties for numerical optimization routines like maxima at definition boundaries, so they make good candidates for testing the algorithms.

### Humps function

The humps function is a one dimensional function with two maxima defined as: $$f(x) = \frac{1}{(x - 0.3)^2 + 0.01} + \frac{1}{(x - 0.9)^2 + 0.04} - 6$$

### Branin function

The Branin function is a two dimensional function defined for $$x_1 ∈ [-5, 10]$$, $$x_2 ∈ [0, 15]$$ with three local minima (of 0.397887) defined as: $$f(x_1, x_2) = \left(x_2 - \frac{5.1 x_1^2}{4\pi^2} + \frac{5 x_1}{\pi} - 6 \right) ^ 2 + 10 \left(1 - \frac{1}{8 \pi}\right) \cos(x_1) + 10$$

### Rosenbrock function

The Rosenbrock function is a two dimensional function with two parameters $$a$$, $$b$$ defined for $$x_1 ∈ [-5, 10]$$, $$x_2 ∈ [-5, 10]$$ with one minimum at $$(x_1, x_2) = (a, a^2)$$ defined as: $$f(x_1, x_2) = \left(a - x_1\right) ^ 2 + b \left(x_2 - x_1^2\right)^2$$

Our implementation defaults to $$a=1$$, $$b=100$$.