3

I'm trying to solve a past year exam question. I'm having trouble with this question.

I have to show that the following function is strictly convex. $$f: \mathbb{R}^n \rightarrow \mathbb{R}, \\ x \mapsto \frac{\|x\|^2}{2}+\cos\|x\|,$$

where $\|\cdot \|$ is the Euclidean norm on $\mathbb{R}^n$. Any help would be greatly appreciated.

I wanted to compute the Hessian. To do so, I wanted to use the fact that this function is constant on any sphere. Since $f$ is constant on any sphere, the gradient is perpendicular to the sphere at any point on the sphere. But I'm not sure how to proceed. I've showed that this function is convex by decomposing it as $u \circ v$ with $v$ the norm and $u$ as $x^2/2 + \cos(x)$. I showed that $v$ is convex and that $u$ is convex and increasing.

  • Please show what you have tried. – Kamal Saleh Dec 01 '22 at 21:32
  • Well I wanted to compute the hessian to do so i wanted to use the fact that this function is constant on any sphere. Since f is constant on any sphere , the gradient is perpendicular to the sphere at any point on the sphere.But I'm not sure how to proceed. I've showed that this function is convex by decomposing it as g o f with the g the norm and f as x² /2 + cos(x). I showed that g is convex and that f is convex and increasing. – tomtomgps Dec 01 '22 at 21:47
  • Please add this to your OP – Kamal Saleh Dec 01 '22 at 21:51
  • 1
    In general, it is frowned upon to include phrases like "help please" in the title of your post. – Jbag1212 Dec 01 '22 at 21:59
  • ok I changed the title. – tomtomgps Dec 01 '22 at 22:01

2 Answers2

1

Consider the function $g:\mathbb R^+\rightarrow \mathbb R$ given by $g\left(t\right) =\frac{t^2}2 + \cos t$.

We have $g’\left(t\right)=t-\sin t > 0$ so that $g$ is strictly increasing.

Suppose $r<s$. Then $$\begin{align} \sin s -\sin r&=2\sin\left(\frac{s-r}2\right)\cos\left(\frac{s+r}2\right) \\ &\leq 2\sin\left(\frac{s-r}2\right) \\ &<2\frac{s-r}2 \\ &=s-r \end{align}$$ so that $g’$ is strictly increasing. This implies that $g$ is strictly convex.

Suppose $x\neq y$ and $0<\lambda<1$.

If $\left\Vert x\right\Vert \neq\left\Vert y\right\Vert$ then $$ \begin{align} f\left(\lambda x + \left(1-\lambda\right)y\right) &= g\left(\left\Vert \lambda x + \left(1-\lambda\right)y\right\Vert\right) \\ &\leq g\left(\lambda\left\Vert x \right\Vert + \left(1-\lambda\right)\left\Vert y\right\Vert\right) \\ &< \lambda g\left(\left\Vert x\right\Vert\right)+\left(1-\lambda\right)g\left(\left\Vert y \right\Vert\right) \\ &=\lambda f\left(x\right)+\left(1-\lambda\right)f\left(y\right) \end{align}$$ where the first inequality holds because $g$ is strictly increasing and the second because it is strictly convex.

If $\left\Vert x\right\Vert = \left\Vert y\right\Vert$ then $\lambda x+\left(1-\lambda\right)y$ is an interior point of the ball of radius $\left\Vert x\right\Vert $ ($=\left\Vert y\right\Vert$). Then $\left\Vert \lambda x+\left(1-\lambda\right)y\right\Vert <\left\Vert x\right\Vert $ so that
$$ \begin{align} f\left(\lambda x + \left(1-\lambda\right)y\right) &= g\left(\left\Vert \lambda x + \left(1-\lambda\right)y\right\Vert\right) \\ &< g\left(\left\Vert x \right\Vert\right) \\ &= \lambda g\left(\left\Vert x\right\Vert\right)+\left(1-\lambda\right)g\left(\left\Vert x \right\Vert\right) \\ &= \lambda g\left(\left\Vert x\right\Vert\right)+\left(1-\lambda\right)g\left(\left\Vert y \right\Vert\right) \\ &=\lambda f\left(x\right)+\left(1-\lambda\right)f\left(y\right) \end{align}$$ where the inequality holds since $g$ is strictly increasing.

This proves that $f$ is strictly convex.

0

First answer

You were almost there!

$f=u\circ v$ with $v(x)=\|x\|$ and $u(t)=\frac{t^2}2+\cos t.$

Since $v$ is strictly convex and $u$ is strictly convex and increasing, $f$ is strictly convex.

Second answer

For $x\ne0,$ let $t:=\|x\|>0.$

The first and second differentials of $f$ at $x$ are given by: $$df_x(h)=\langle x,h\rangle\left(1-\frac{\sin t}t\right), $$ $$d^2f_x(h,k)=\langle h,k\rangle\left(1-\frac{\sin t}t\right)-\langle x,h\rangle\langle x,k\rangle\frac{t\cos t-\sin t}{t^3} $$ hence if $t\notin2\pi\Bbb Z$:

  • for all $h$ linearily independent from $x,$ $$\begin{align}t^3d^2f_x(h,h)&=\|h\|^2\|x\|^2\left(t-\sin t\right)-\langle x,h\rangle^2\left(t\cos t-\sin t\right)\\ &>\langle x,h\rangle^2t\left(1-\cos t\right)\ge0,\end{align}$$
  • for $h=\lambda x$ with $\lambda\ne0,$ $$d^2f_x(h,h)=\|h\|^2\left(1-\cos t\right)>0.$$

This proves that $d^2f_x$ is positive definite for all $x$ such that $\|x\|\notin2\pi\Bbb Z.$ So, the set of "bad" $x$'s contains no non-trivial segment, hence $f$ is strictly convex.

Anne Bauval
  • 34,650
  • Thanks for your answer , how did you show that u is strictly convex ? – tomtomgps Dec 03 '22 at 12:22
  • $u''(t)=1-\cos t>0$ on $\Bbb R\setminus2\pi\Bbb Z.$ – Anne Bauval Dec 03 '22 at 14:25
  • I don't think what you wrote works. if v is only convex then v(x) and v(y) are not necessarily different (take v as a constant function as an example) even though x different than y, so when you apply u the strictly convex function you do not have the strict inequality. – tomtomgps Dec 03 '22 at 14:58
  • Sorry, you are right! Here is a completely new proof, following your first idea to compute the Hessian. – Anne Bauval Dec 03 '22 at 18:17
  • I fact my old proof was nearly ok, so I re-inserted it (just adding that the Euclidean norm $v$ is strictly convex). – Anne Bauval Dec 05 '22 at 09:55