is $1/x^2$ a convex function

2.8k Views Asked by At

I am not sure if $1/x^2$ is a Convex function. When I differentiate it twice I get $6/x^4$ which is $\geqslant 0$ for $x \in (-\infty, +\infty)$. This shows it is a convex function over the entire $x$ in $(-\infty, +\infty)$. But when I see the graph I am confused. If I draw a chord from $x = -1$ to $x = 1$ the function doesn't seem convex.

3

There are 3 best solutions below

0
On BEST ANSWER

You have to specify the domain when you describe a function and in this particular note that in the definition of the convex function, they require the domain to be convex.

$\frac1{x^2}$ is not defined at $0$ and the test that you used requires the function to be twice differentiable.

$\frac1{x^2}$ is convex is convex if the domain is the set of positive numbers or the set of negative numbers.

0
On

$\frac{1}{x^2}$ is undefined when $x=0$. But, $\frac{1}{x^2}$ is convex if $D=\{x:x>0, x<0, x\subset R \}$

0
On

A function is convex in $[u,v]$ if for all $t\in[0,1]$ we have: $$f(tu+(1-t)v)\leqslant tf(u) + (1-t)f(v)\qquad(1)$$ The left side is the function's value in $[u,v]$ whereas the right represents a line from point $(u,f(u))$ to $(v,f(v))$. If that line runs above (not below) the function for all values in the interval, then we say the function is convex in that interval.

This definition (1) is much more elementary than using second derivative, in particular (1) does not require any kind of smoothness like existence of derivatives of $f$, it doesn't even require $f$ to be continuous. The criterion using 2nd derivative follows from (1) provided 2nd derivative exists, of course.

We can extend (1) to cases where $f$ is not defined everywhere in an obvious way so that it still makes sense: Let $f:D\to\mathbb R$ then we can say $f$ is convex in $D$ if (1) holds for all $t\in[0,1]$ and $u, v\in D$ for which also $tu+(1-v)t \in D$.

For example if we apply it to $$\begin{align} f:\mathbb R^{\neq0}&\;\to\;\mathbb R\\ x&\;\mapsto\; 1/x^2 \end{align}$$ with $v = 1 = -u$ the condition turns into: $$\frac{1}{\big((t\cdot(-1)+(1-t)\cdot1\big)^2} = \frac{1}{(1-2t)^2} \leqslant t\cdot1 + (1-t)\cdot1=1$$ i.e. $(1-2t)^2\stackrel!\geqslant1$ for $t\in[0,1], t\neq1/2$. However, that inequality is only satisfied for $t=0$ and $t=1$. For any $t\in(0,1)$ that inequality does not hold.

In many cases, the condition using 2nd derivative is much more convenient, it can however only be used to conclude convexity over intervals. But we have to keep in mind that $$ f\text{ is convex in } U\cup V \qquad\Rightarrow\qquad (f\text{ is convex in } U \text{ and } f\text{ is convex in } V ) $$ but the converse it not true in general.