For which values of $\theta \in \mathbb R$ is the set $$S = \{x\in \mathbb R^n: |x-a| \leq \theta|x-b|\}$$ convex?
It's very simple to show that $S$ is convex for $\theta \leq 0$.
Now suppose $\theta > 0$, and let $x,y \in S, t \in [0, 1]$.
Then $|tx+(1-t)y-a| = |tx-ta+ta+y-a-ty+ta-ta| =|tx-ta+y-a-ty+ta|\\ \leq|tx-ta|+|y-a|+|-ty+ta|=t|x-a|+|y-a|+t|y-a|\leq \theta(t|x-b|+(1+t)|y-b|)$
Now, we want to find for which values of theta, $\theta(t|x-b|+(1+t)|y-b|) \leq \theta|tx+(1-t)y-b|$
But theta cancels out, so this is either true for all positive theta or it's false for all positive theta.
I am unsure how to continue now.
I think we can look at a specific example, like $S_1 = \{x\in \mathbb R^n: |x-a|\leq|x-b|\}$.
How do we show this set is / isn't convex?
The answer is $0\le\theta \le 1$. The reason should be evident if you understand the geometric interpretation.
When $\theta < 0$, the set is empty (assuming $a \neq b$). It is usually not considered convex.
When $\theta = 0$, the set is $\{a\}$ and is convex.
When $\theta=1$, the set is a half plane with border bisecting the line segment between $a$ and $b$. The set is clearly convex.
We now focus on the case of $0 < \theta < 1.$
$$ \{x\in \mathbb R^n: |x-a| \leq \theta|x-b|\}$$ $$ \Leftrightarrow \{x\in \mathbb R^n: {(\vert x-a\vert)}^2 \leq \theta^2{(\vert x-b\vert)}^2\} $$ $$ \Leftrightarrow \{x\in \mathbb R^n: (1-\theta^2)x^Tx -2(a^T-\theta^2 b^T)x \le \theta^2b^Tb-a^Ta\} $$ $$ \Leftrightarrow \{x\in \mathbb R^n: x^Tx -2\frac{(a^T-\theta^2 b^T)}{(1-\theta^2)}x \le \frac{\theta^2b^Tb-a^Ta}{(1-\theta^2)}\} $$ $$ \Leftrightarrow \{x\in \mathbb R^n: {\left(x -\frac{(a-\theta^2 b)}{(1-\theta^2)}\right)}^T{\left(x -\frac{(a-\theta^2 b)}{(1-\theta^2)}\right)} \le \theta^2\frac{a^Ta + b^Tb-2a^Tb}{(1-\theta^2)^2}\} $$ $$ \Leftrightarrow \{x\in \mathbb R^n: {\left\vert x -\frac{a-\theta^2 b}{1-\theta^2} \right\vert}^2 \le {\left(\theta\frac{\vert a- b \vert}{1-\theta^2}\right)}^2\} $$ $$ \Leftrightarrow \{x\in \mathbb R^n: {\left\vert x -\frac{a-\theta^2 b}{1-\theta^2} \right\vert} \le \theta\frac{\vert a- b \vert}{1-\theta^2}\} $$
It is now obvious that the set is a n-dimensional ball. Hence it is convex.
When $\theta > 1$, following almost the same line of arguments of the above (with $\theta$ becoming $1/\theta$, and roles of $a$, $b$ swapped), we can show that its complement set is a n-dimensional ball. Hence the set of concern (complement of a n-dimensional ball) is NOT convex.
We have completed the proof that the answer is $0 \le \theta \le 1$.