I am trying to maximise a function $f : \mathbb{R}^n \to \mathbb{R}$ with the restriction that an optimal point $x_0 \in \mathbb{R}^n$ is contained in some $n$-dimensional box in $\mathbb{R}^n$, i.e. $$ x_0 \in [a_1,b_1] \times [a_2,b_2] \times \cdots \times [a_n,b_n] $$ for real numbers $a_1 < b_1$ and $a_2 < b_2$ and $\cdots$ and $a_n < b_n$. Is there a smart way to reformulate this restriction in terms of a function $g : \mathbb{R}^n \to \mathbb{R}^c$ such that $g(x_0) = 0$ for the purpose of the Lagrange multiplier theorem? If you can see that it is impossible for some reason, it would be a delight to learn that too.
EDIT: The following is known as the Lagrange multiplier theorem[1].
Theorem Let $f : \mathbb{R}^n \to \mathbb{R}$ and $g:\mathbb {R} ^{n}\to \mathbb {R} ^{c}$ be differentiable functions. Let $x_0$ be global maximum of $f$ on $g^{-1}(\{0\})$ such that $\mathrm{rank} (Dg)(x_0) = c < n$. There exists unique $ \lambda \in \mathbb{R}^{c}$ such that $D f ( x_0 ) = λ^T D g ( x_0 )$.