Question: Given vectors $\mathrm a, \bar{\mathrm x} \in \mathbb R^n$ and matrix $\mathrm P \in \mathbb S^n\_{++}$, how to deal with the absolute value in the objective function of this optimization problem in $\mathrm x \in \mathbb R^n$?

$$\begin{array}{ll} 
 \text{maximize} & | \mathrm a^{\top} \mathrm x - 1 |\\
 \text{subject to} & (\mathrm x- \bar{\mathrm x})^{\top} \mathrm P^{-1}(\mathrm x - \bar{\mathrm x}) \leq 1 
\end{array}$$

I can not write it in epigraph form because it is a maximisation of a convex function right?

Trying the KKT conditions for nonconvex problems will give me trouble since the absolute value is not differentiable everywhere. Geometrically, I think that the solution is at the boundary of the constraint set.

Answer: 
Since $f$ is convex, given $s < t < u$, we have 
$$ \frac{f(t) - f(s)}{t - s} \le \frac{f(u) - f(s)}{u - s} \le \frac{f(u) - f(t)}{u - t} $$

If $f$ is constant, the limits exist.

If not, suppose $f(s) < f(t)$. Letting $u \rightarrow + \infty$ in the first inequality, we get $\lim\_{x \rightarrow +\infty} f(x) = +\infty$.
Now, suppose $f(t) > f(u)$. Letting $s \rightarrow - \infty$ in the second inequality, we get $\lim\_{x \rightarrow -\infty} f(x) = +\infty$.

Now, assume both limits exist and are finite. Letting $u \rightarrow + \infty$ in the first inequality, we get $f(t) \le f(s)$ and letting $s \rightarrow - \infty$ in the second inequality, we get $f(t) \le f(u)$. So $f$ is both non-increasing and non-decreasing, i.e., constant.
For the first part, specifically, $\limsup\_{x\rightarrow\infty} f(x)=\liminf\_{x\rightarrow\infty}f(x)$. 

To see this, let $s\_n$ be the sequence of $x$ that achieves the sup and $m\_n$ be the one for inf. Then 

$$f(tm\_n+(1-t)m\_{n+1})\leq tf(m\_n)+(1-t)f(m\_{n+1}).$$

As both $m\_n,s\_n$ go to infinity, you can always find a subsequence $s\_{n\_k}$ which interlaces between infinitely many $m\_{n\_k},m\_{n\_{k+1}}$. It follows that $f(s\_{n\_k})\leq t\_{n\_k}f(m\_{n\_k})+(1-t\_{n\_k})f(m\_{n\_{k+1}})$. Take the limsup of both sides to conclude that $\limsup\_{x\rightarrow\infty}f(x)\leq\liminf\_{x\rightarrow\infty}f(x)$.