Let $a,b \in \mathbb R$, $R \ge 0$, and $c > 0$. Define $C := \{(x,y) \in \mathbb R^2 \mid x^2 + y^2 \le 1,\,x^2 + c y^2 \le R^2\}$, and set


$$
\alpha := \sup\_{(x,y) \in C} ax + b y.
$$



> 
> **Question.** In terms of $a,b,c,R$, is there an analytic formula for $\alpha$ ?
> 
> 
> 


Some special cases
------------------


* If $c=1$, then $C = \{z \in \mathbb R^2 \mid \|z\|\_2 \le R'\}$, where $R' := \min(1,R)$. Thus, $\alpha = R'\sqrt{a^2+b^2}$.
* If $a=0$, then we are maximizing $yb$ over $[-1,1] \cap [-R/\sqrt c,R/\sqrt c]$, and so $\alpha = |b|\min(1,R/\sqrt c)$.
* $\lim\_{c \to \infty} \alpha = |b|R'$. This is because the domain $C$ is shrunk to the interval $[-R',R'] \times \{0\}$.



Analytic value of $\alpha := \sup_{(x,y) \in C} ax+by$, where $C := \{(x,y) \in \mathbb R^2 \mid x^2 + y^2 \le 1,\,x^2 + c y^2 \le R^2\}$
We have
$$\alpha = \left\{\begin{array}{ll}
 \sqrt{a^2 + b^2} & \mathrm{if} ~ (a^2 + b^2)R^2 \ge a^2 + cb^2, \\[6pt]
 R\sqrt{a^2 + b^2/c}& \mathrm{if} ~ a^2c^2 + b^2c \ge (a^2c^2 + b^2)R^2, \\[6pt]
 |a|\sqrt{\frac{c-R^2}{c-1}}
 + |b|\sqrt{\frac{R^2 - 1}{c-1}} & \mathrm{otherwise}.
\end{array}
\right.$$


**Proof**:


If $a^2 + b^2 = 0$, it is easy. In the following, assume that $a^2 + b^2 > 0$.


We split into three cases:


**Case 1**: $(a^2 + b^2)R^2 \ge a^2 + cb^2$


By Cauchy-Bunyakovsky-Schwarz inequality, we have
$(ax + by)^2 \le (a^2 + b^2)(x^2 + y^2) \le a^2 + b^2$.


On the other hand, letting
$x = \frac{a}{\sqrt{a^2+b^2}}$
and $y = \frac{b}{\sqrt{a^2+b^2}}$, we have
$x^2 + y^2 = 1$ and $x^2 + cy^2 \le R^2$ and
$ax + by = \sqrt{a^2 + b^2}$.
The desired result follows.


**Case 2**: $a^2c^2 + b^2c \ge (a^2c^2 + b^2)R^2$,


By Cauchy-Bunyakovsky-Schwarz inequality, we have
$(ax + by)^2 \le (a^2 + b^2/c)(x^2 + cy^2) \le R^2(a^2 + b^2/c)$.


On the other hand, letting
$x = \frac{acR}{\sqrt{a^2c^2 + b^2c}}$ and $y = \frac{bR}{\sqrt{a^2c^2 + b^2c}}$, we have
$x^2 + y^2 \le 1$ and $x^2 + cy^2 = R^2$ and
$ax + by = R\sqrt{a^2 + b^2/c}$.
The desired result follows.


**Case 3**: $(a^2 + b^2)R^2 < a^2 + cb^2$
and $a^2c^2 + b^2c < (a^2c^2 + b^2)R^2$


Clearly, $c \ne 1$. It is easy to prove that
$$\alpha = \sup\_{0 \le y \le \min(1, R/\sqrt c)} |a|\min(\sqrt{1-y^2}, ~ \sqrt{R^2 - cy^2}) + |b| y.$$


(i) If $c > 1$, from $(a^2 + b^2)R^2 < a^2 + cb^2$
and $a^2c^2 + b^2c < (a^2c^2 + b^2)R^2$, we have $R > 1$ and $c > R^2$ and
$$\frac{|b|R}{\sqrt{a^2c^2 + b^2c}} < \sqrt{\frac{R^2-1}{c-1}} < \frac{|b|}{\sqrt{a^2+b^2}} . \tag{1}$$


We have
$$\alpha = \sup\_{0 \le y \le R/\sqrt c} |a|\min(\sqrt{1-y^2}, ~ \sqrt{R^2 - cy^2}) + |b| y
= \max(\alpha\_1, ~ \alpha\_2)$$
where
$$\alpha\_1 = \sup\_{0 \le y \le \sqrt{(R^2-1)/(c-1)}} |a|\sqrt{1-y^2} + |b| y$$
and
$$\alpha\_2 = \sup\_{ \sqrt{(R^2-1)/(c-1)} \le y \le R/\sqrt c} |a|\sqrt{R^2 - cy^2} + |b| y.$$


Using (1), it is not difficult to prove that
$$\alpha\_1 = \alpha\_2 = |a|\sqrt{\frac{c-R^2}{c-1}}
+ |b|\sqrt{\frac{R^2 - 1}{c-1}}.$$
(*Note*: For example, consider $\alpha\_1$. Let $f(y) = |a|\sqrt{1-y^2} + |b| y$.
Using $\frac{|b|}{\sqrt{a^2 + b^2}} > \sqrt{(R^2-1)/(c-1)}$, we have $f'(y) = - \frac{|a| y}{\sqrt{1 - y^2}} + |b| > 0$
on $[0, \sqrt{(R^2-1)/(c-1)}]$.
Thus, $\alpha\_1 = f(\sqrt{(R^2-1)/(c-1)}) = |a|\sqrt{\frac{c-R^2}{c-1}}
+ |b|\sqrt{\frac{R^2 - 1}{c-1}}$.)


The desired result follows.


(ii) If $0 < c < 1$, from $(a^2 + b^2)R^2 < a^2 + cb^2$
and $a^2c^2 + b^2c < (a^2c^2 + b^2)R^2$, we have $R < 1$ and $R^2 > c$ and
$$\frac{|b|R}{\sqrt{a^2c^2 + b^2c}} > \sqrt{\frac{R^2-1}{c-1}} > \frac{|b|}{\sqrt{a^2+b^2}} . \tag{2}$$


We have
$$\alpha = \sup\_{0 \le y \le 1} |a|\min(\sqrt{1-y^2}, ~ \sqrt{R^2 - cy^2}) + |b| y = \max(\alpha\_3, ~ \alpha\_4)$$
where
$$\alpha\_3 = \sup\_{0 \le y \le \sqrt{(1-R^2)/(1-c)}} |a|\sqrt{R^2 - cy^2} + |b| y,$$
and
$$\alpha\_4 = \sup\_{\sqrt{(1-R^2)/(1-c)} \le y \le 1} |a|\sqrt{1-y^2} + |b| y$$


Using (2), it is not difficult to prove that
$$\alpha\_3 = \alpha\_4 = |a|\sqrt{\frac{c-R^2}{c-1}}
+ |b|\sqrt{\frac{R^2 - 1}{c-1}}.$$


The desired result follows.


$\phantom{2}$


We are done.


