On the convexity of a particular discontinuous function.

Let $f:D\to\mathbb{R}$ be defined as follows:

$$f(\mathbf{x})=\frac{a-(\mathbf{x}_N\cdot\mathbf{x}_0+x_{n+1})}{\sqrt{\mathbf{x}_N^T\mathbf{A}\mathbf{x}_N}},$$

where $\mathbf{x}=(x_1,\cdots,x_n,x_{n+1})^T\in\mathbb{R}^{n+1}$, $\mathbf{x}_N=(x_1,\cdots,x_n)^T\in\mathbb{R}^n$, $\mathbf{x}_0=(x_{0,1},\cdots,x_{0,n})^T\in\mathbb{R}^n$, and $a\in\{\pm1\}$. The matrix $\mathbf{A}$ is symmetric and positive definite, i.e., $\mathbf{A}\in\mathbb{S}_{++}^n$. The domain of $f$ is defined as $D=\{\mathbf{x}\in\mathbb{R}^{n+1} \mid \mathbf{x}\neq(0,\cdots,0,x_{n+1}), x_{n+1}\in\mathbb{R}\}$, due the denominator $\sqrt{\mathbf{x}_N^T\mathbf{A}\mathbf{x}_N}$.

Please let me know if I am mistaken in something above.

We would like to study $f$ in terms of convexity. Let $\lambda\in[0,1]$ and

$$\mathbf{x} = (\mathbf{x}_N^T,x_{n+1})^T\in\mathbb{R}^{n+1}\\ \mathbf{y} = (\mathbf{y}_N^T,y_{n+1})^T\in\mathbb{R}^{n+1},$$

then we will see what is true about $f(\lambda\mathbf{x}+(1-\lambda)\mathbf{y})$. Having in mind the definition of $f$, we may write

$$f(\lambda\mathbf{x}+(1-\lambda)\mathbf{y}) = \frac{a-[[\lambda\mathbf{x}_N+(1-\lambda)\mathbf{y}_N]\cdot \mathbf{x}_0+\lambda x_{n+1}+(1-\lambda) y_{n+1}]}{\sqrt{[\lambda\mathbf{x}_N+(1-\lambda)\mathbf{y}_N]^T\mathbf{A}[\lambda\mathbf{x}_N+(1-\lambda)\mathbf{y}_N]}} = \frac{a-\lambda[\mathbf{x}_N\cdot\mathbf{x}_0+x_{n+1}]-(1-\lambda)[\mathbf{y}_N\cdot\mathbf{x}_0+y_{n+1}]}{\sqrt{\lambda^2\mathbf{x}_N^T\mathbf{A}\mathbf{x}_N +\lambda(1-\lambda)\mathbf{x}_N^T\mathbf{A}\mathbf{y}_N +\lambda(1-\lambda)\mathbf{y}_N^T\mathbf{A}\mathbf{x}_N + (1-\lambda)^2\mathbf{y}_N^T\mathbf{A}\mathbf{y}_N}} = \frac{a-\lambda[\mathbf{x}_N\cdot\mathbf{x}_0+x_{n+1}]-(1-\lambda)[\mathbf{y}_N\cdot\mathbf{x}_0+y_{n+1}]}{\sqrt{\lambda^2\mathbf{x}_N^T\mathbf{A}\mathbf{x}_N +2\lambda(1-\lambda)\mathbf{x}_N^T\mathbf{A}\mathbf{y}_N + (1-\lambda)^2\mathbf{y}_N^T\mathbf{A}\mathbf{y}_N}}.$$

If we could show that $f(\lambda\mathbf{x}+(1-\lambda)\mathbf{y}) \leq \lambda f(\mathbf{x})+(1-\lambda)f(\mathbf{y})$, then $f$ would be convex, while if could prove that $f(\lambda\mathbf{x}+(1-\lambda)\mathbf{y}) \leq \text{max}(f(\mathbf{x}),f(\mathbf{y}))$, then $f$ would be quasiconvex.

So far, I had better luck in working for the quasiconvex proof (I have not proven it, though), which is rather reasonable, as the convexity is stronger than quasiconvexity. However, I have not proven neither the convexity nor the quasiconvexity yet. Actually I believe that I am missing something here, and probably it concerns the domain of $f$; the continuousness of $f$. Could anyone give a hand on this, please? I would like to involve in a discussion on convexity and continoussness, but I am afraid that my knowledge on these issues is rather poor, though it would be great if I enriched it.

Edit: So far, what I have shown is that, when $a-(\mathbf{x}_N\cdot\mathbf{x}_0+x_{n+1}) \geq 0$ and $a-(\mathbf{y}_N\cdot\mathbf{y}_0+y_{n+1}) \geq 0$, it holds that

$$f(\lambda\mathbf{x}+(1-\lambda)\mathbf{y}) \leq f(\mathbf{x})+f(\mathbf{y}),$$

which is not what I want. If I could prove that

$$f(\lambda\mathbf{x}+(1-\lambda)\mathbf{y}) \leq \frac{1}{2}\left(f(\mathbf{x})+f(\mathbf{y})\right),$$

than $f$ would be quasiconvex, as $\frac{a+b}{2}\leq\text{max}(a,b)$, $\forall a,b\in\mathbb{R}$. But this is something I cannot prove. Maybe there is no way of doing so. Also, if $a-(\mathbf{x}_N\cdot\mathbf{x}_0+x_{n+1}) \leq 0$, $\forall \mathbf{x}\in\mathbb{R}^{n+1}$, then, similarly, $f$ could be proven to be quasiconcave.

Thanks a lot in advance! Feel free to start a discussion on whatever from the above!

-