How to test the quasi-convexity of a piecewise defined function? For $\alpha, \beta$ define $f_{\alpha, \beta}$: $\mathbb{R} \rightarrow \mathbb{R}$ by 


*

*$f_{\alpha, \beta} (x) = \alpha x + \beta$ if $x < -2$

*$f_{\alpha, \beta} (x) = 2x^2 + x + 3$ if $x \geq -2$


Give all $\alpha \in \mathbb{R}$, and $\beta \in \mathbb{R}$ for which $f_{\alpha, \beta}$ is convex. 
Give all $\alpha \in \mathbb{R}$, and $\beta \in \mathbb{R}$ for which  $f_{\alpha, \beta}$ is quasiconvex
Answers:
For all $\alpha, \beta \in \mathbb{R}$ sich that $\beta - 2\alpha = 9$ and $\alpha \leq -7$, $f_{\alpha, \beta}$ is convex
For all $\alpha, \beta \in \mathbb{R}$ such that $\beta - 2\alpha \geq 9$ and $\alpha \leq 0$, $f_{\alpha, \beta}$ is quasiconvex
These are the answers, I know the function f is convex iff the set Epi subset $\mathbb{R}^n \times \mathbb{R}$ is convex
However, the fact that $\alpha \leq -7$ confuses me, since I do not know how to get there. I am missing a simple step. could please someone tell me how to come up with the conclusion why it the answers are like this..

Second example: 
For $\alpha, \beta$ define $f_{\alpha, \beta}$: $\mathbb{R} \rightarrow \mathbb{R}$ by 


*

*$f_{\alpha, \beta} (x) = \alpha x + \beta$ if $x < 0$

*$f_{\alpha, \beta} (x) = 4x^3 + 2x + 5$ if $x \geq 0$


Give all $\alpha \in \mathbb{R}$, and $\beta \in \mathbb{R}$ for which $f_{\alpha, \beta}$ is convex. 


*

*$f$ is continuous

*$f'$ is increasing


These requirements amount to: 


*

*$(\alpha x+\beta)_{x=0} = (4x^3+2x+5)_{x=0} = 5$ 
Hence, $\beta = 5$

*$\alpha \leq ((4x^3+2x+3)')_{x=0} = (8x^2+2)_{x=0} = 2$.
Hence, $\alpha \leq 2$


Give all $\alpha \in \mathbb{R}$, and $\beta \in \mathbb{R}$ for which  $f_{\alpha, \beta}$ is quasiconvex
For quasiconvexity, considering that $f$ has a (global?) minimum at $x=0$
, you need that 


*

*$f$ is decreasing on $(-\infty,0)$

*$f$ is increasing on $(0, \infty)$ 


Property 1 requires $\alpha\le 0$ and  $(\alpha x+\beta)_{x=0} \ge  (4x^3+2x+5)_{x=0} = 5$. And also $\alpha > 0$ with $\beta \leq 5$ (since, $\alpha \le 2$ is still convex at $\beta = 5$. 
Property 2 is automatically fulfilled by the given $x \ge 0$.
 A: You have $f$ that is piecewise defined, with differentiable pieces. For convexity of such a function, you need to make sure that:


*

*$f$ is continuous

*$f'$ is increasing


These requirements amount to: 


*

*$(\alpha x+\beta)_{x=-2} = (2x^2+x+3)_{x=-2} = 9$ 

*$\alpha \le ((2x^2+x+3)')_{x=-2} = (4x+1)_{x=-2} = -7$.



For quasiconvexity, considering that $f$ has a local minimum at $x=-1/4$ (which would have to be global under quasiconvexity), you need that 


*

*$f$ is decreasing on $(-\infty,-1/4)$

*$f$ is increasing on $(-1/4, \infty)$ 


Property 1 requires $\alpha\le 0$ and  $(\alpha x+\beta)_{x=-2} \ge  (2x^2+x+3)_{x=-2} = 9$. Property 2 is automatically fulfilled by the given quadratic polynomial.

Let's turn to your second example:


*

*$f_{\alpha, \beta} (x) = \alpha x + \beta$ if $x < 0$

*$f_{\alpha, \beta} (x) = 4x^3 + 2x + 5$ if $x \geq 0$


Your analysis of convexity is correct. The situation with quasiconvexity is different now, because we can't say for sure that $f$ has a minimum at some point. (Previously, the quadratic polynomial had a local minimum, which under the quasiconvexity assumption has to be global, with no other local minima.) Let's consider two cases:


*

*$\alpha>0$. Then $f$ has to be increasing on $\mathbb{R}$, so the inequality $(\alpha x+\beta)_{x=0}\le (4x^3 + 2x + 5)_{x=0} $ has to hold. 

*$\alpha\le 0$. Then $f$ decreases for $x<0$ and increases for $x>0$. Such a function is quasiconvex provided that $f(0)\le \max (f(0+), f(0-))$. For the given function, this is always the case, since $f(0)=f(0+)$. Thus, no other conditions on $\alpha,\beta$ are needed.

