2

Find real parametar $a,b,c$ such that function $f$ become convex function $$f(x) = \begin{cases}ax^2+bx+c,& x<0\\1 ,& x \ge 0\end{cases}$$
My work:
If $f(x)$ is convex function that means that $f'(x)$ must be incersing function. $$f'(x) = \begin{cases}2ax+b,& x<0\\0 ,& x \ge 0\end{cases}$$ We know that $a\ge0$ and $b\le0$. And if $f$ is convex function that means that $f''(0)\ge0$ which only say that $a\ge0$. This maybe work if function $f$ is twice differentiable. How to find for case when f isn't twice differentiable. Use $\frac{f(x+y)}{2}\le \frac{f(x)}{2}+\frac{f(y)}{2}$?

josf
  • 1,337

5 Answers5

2

A convex function is automatically continuous and has one-sided derivatives at each point $x$ in its domain, whereby $f'(x-)\leq f'(x+)$, and of course $f''(x)\geq0$ at all points where the second derivative is defined. These facts enforce $c=1$, $b\leq0$, and $a\geq0$ in your problem. That an $f$ fulfilling these conditions is in fact convex on ${\mathbb R}$ is clear from inspection of the graph, and can be formally verified as follows:

If $u<v\leq0$ then (for $u\leq x\leq v$) the graph ${\cal G}(f)$ is below its $\{u,v\}$-(linear-)interpolant since $f''(x)>0$ in the interior of $[u,v]$. If $u<0<v$ then ${\cal G}(f)$ is below its $\{u,0,v\}$-interpolant, hence below its $\{u,v\}$-interpolant. If $0\leq u<v$ then ${\cal G}(f)$ coincides with its $\{u,v\}$-interpolant.

As an answer to your comment: Convexity is an "affine" property that can be described without reference to limits of any sort. If it so happens that the $f$ in question has a second derivative then $f''(x)\geq0$ is necessary and sufficient for (weak) convexity of $f$. If your $f$ is not twice differentiable you have to check for convexity by some other means, e.g., using known a-prior-inequalities for the particular $f$ at hand.

1

Your direction is correct, now you only need to think about the "connection" between the two conditions on X , which is at X = 0. For the function to be convex it also must be continuous , so C = 1 and then the lim f(x) when x is approaching 0 from either sides is 1 , which equals to f(0) so the function is continous

0

You have to study just the convexity for $x<0$ really.

By continuity it is immediately $c=1$ so you need the convexity of $ax^2+bx+1$ for $x<0$ with the constraint left-side derivative at $x=0$ (as a limit position in the domain $x<0$ and equal to b) less than or equal to zero because if the tangent to the curve has a positive slope then, by continuity, there is an arc of the graph below the line $y=1$ so $f$ ceases to be convex.

Thus you have infinitely many solutions $(a,b,c)=(a,b,1)$ where $a\ge 0$ and $b\le 0$ which is quite easy to verify with the corresponding graphs. Your functions are $$f(x)=ax^2+bx+1;\space a\ge 0;\space b\le 0 $$

Ataulfo
  • 32,657
0

You should think of what convexity of a function means. For convex functions it must hold that for every two points located above the convec function a line between those points does not intersect the function.

In mathematical terms this means that the function should be continuous ánd that the tangent is strictly increasing.

If $x \geq 0$ then the value is 1. This is continuous for $x>0$. If $x<0$ then you have a polynomial, which is also continuous. So you need to check continuity in $x=0$, that the tangent for $x<0$ is smaller than the tangent for $x>0$ and that $f''(x)\geq 0$ for all $x$.

  1. Continuity. This means that $\lim_{x\uparrow0} f(x) = \lim_{x\downarrow 0} f(x) = f(x) = 1$. $\lim_{x\uparrow 0} f(x) = ax^2 + bx + c |_{x=0} = c$, so $c = 1$.

  2. $f''(x) \geq 0$ for all $x$. If $x >0$ then you find $f''(x) = 0$ so that's satisfied. For $x<0$ you find $2a \geq 0$, so $a \geq 0$.

  3. The tangent for $x<0$ should be $\leq$ than the tangent for $x>0$. For $x>0$ the tangent is $\frac{d}{dx} 1 = 0$, so for $x<0$: $\frac{d}{dx}ax^2 + bx + c \leq 0$. Using $a \leq 0$ it follows that $a x + b \leq 0$. Consider the case in $x=0$ to find that $b \leq 0$.

Combine the results. You find that $a \geq 0$, $b \leq 0$ and $c = 1$.

Jasper
  • 513
0

First, all convex function over $\mathbb{R}$ is continuous. (See Is every convex function on an open interval continuous?, https://en.wikipedia.org/wiki/Convex_function, the other answers here, and also possibly convex function in open interval is continuous)

Thus $\displaystyle \lim_{x\to 0^-} f(x) = \lim_{x\to 0^+} f(x) \iff c = 1$.

$f$ is convex over $\mathbb{R}$
$\Rightarrow f$ is convex over $(-\infty ,0)$ $\iff ax^2+bx+1 is convex over (-\infty ,0)$ $\iff a\geq0$

Then, if you want to use $f\left(\frac{x+y}2\right) \leq \frac{f(x)}2 + \frac{f(y)}2$ (it is $f\left(\frac{x+y}2\right)$, not $f(x+y)\over2$), you can use it like this:

$$f\left(\frac{x+(-x)}2\right)\leq\frac{f(x)}2+\frac{f(-x)}2(\forall x\geq0)$$ $$\iff f(0)\leq\frac{f(x)}2+\frac{f(-x)}2$$ $$\iff 1\leq\frac12+\frac{f(-x)}2$$ $$\iff f(-x)\geq1$$ $$\iff ax^2-bx+1\geq1$$ $$\iff ax^2-bx\geq0$$ If x=0 this is obvious. If x>0 then the previous statement $$\iff b\leq ax(\forall x\geq0)$$ $$\iff b\leq0$$

Thus, $a\geq0$ and $b\leq0$. It is not hard to check all function with $a\geq0$, $c=1$ and $b\leq0$ convex.

(Note: That is not considered copy others' answers, since the explanation of convexity is different from others)

user202729
  • 1,244