Means and Lagrange multipliers

gugo82
The following is a very elementary exercise, an application of Lagrange method to prove a widely known set of inequalities.

***

Three days ago I had to lecture about how to solve constrained optimization problems and Lagrange multipliers method.

I was in trouble: in fact the textbook I usually refer to "draw inspiration" for exercises lacked of interesting/funny material... I was thinking about what to do when I suddenly remembered a set of nice inequalities between means.
I proved those inequalities sooo much time ago using simpler argument (namely, a standard technique of Calculus); but at that moment I realized that they can be also regarded as easy contrained optimization problems.

Then I sketched some passages and I made it: I got a nice set of meaningful exercises.* :-D

***

Exercise:

1. Let [tex]$x,y \geq 0$[/tex] and put:

[tex]$A(x,y):=\frac{1}{2}(x+y),\ G(x,y):=\sqrt{x,y},\ H(x,y):=\frac{2}{\frac{1}{x} +\frac{1}{y}}$[/tex]

so that [tex]$A(x,y),\ G(x,y),\ H(x,y)$[/tex] are the arithmetic, geometric and harmonic mean of [tex]$x$[/tex] and [tex]$y$[/tex].**

Use Lagrange multipliers method to show that:

(AMGM) [tex]$A(x,y)\geq G(x,y)$[/tex],
(AMHM) [tex]$A(x,y)\geq H(x,y)$[/tex],
(GMHM) [tex]$G(x,y)\geq H(x,y)$[/tex],

with equality iff [tex]$x=y$[/tex] in (AMGM) and (AMHM) anf iff [tex]$x=y \text{ or } x=0 \text{ or } y=0$[/tex] in (GMHM).

2. Let [tex]$x,y\geq 0$[/tex], choose [tex]$p\in \mathbb{R} \setminus \{ 0\}$[/tex] and set:

[tex]$M_p(x,y):=\left\{ \frac{1}{2}(x^p+y^p)\right\}^\frac{1}{p}$[/tex];

we say that [tex]$M_p(x,y)$[/tex] is the [tex]$p$[/tex]-mean of [tex]$x$[/tex] and [tex]$y$[/tex].***

Using Lagrange multipliers method, show that for [tex]$p>q$[/tex] the following general inequality holds:

(pMqM) [tex]$M_p(x,y)\geq M_q(x,y)$[/tex]

and that equality case occurs in (pMqM) iff [tex]$x=y$[/tex] (in the case [tex]$p>0$[/tex]) or iff [tex]$x=y \text{ or } x=0 \text{ or } y=0$[/tex] (for [tex]$p<0$[/tex]).

3. Find an elementary Calculus proof of (pMqM).

4. Prove that [tex]$\max \{ x,y\} \geq M_p(x,y) \geq \min \{ x, y\}$[/tex] and:

(a) [tex]$\lim_{p\to +\infty} M_p(x,y) =\max \{ x, y\}$[/tex],
(b) [tex]$\lim_{p\to -\infty} M_p(x,y) =\min \{ x, y\}$[/tex],
(c) [tex]$\lim_{p\to 0} M_p(x,y)=G(x,y)$[/tex],

then realize that (pMqM) holds for all [tex]$p> q \in [-\infty ,+\infty]$[/tex] with the equality case characterized as in 2.



__________
* Of course they're meaningful for me 'cause I learnt something thinking about them; perhaps they're not so for my "wannabe engineer"...

** [tex]H(x,y)[/tex] should be defined only for [tex]$x,y>0$[/tex]. But we have [tex]$\lim_{x\to 0^+} H(x,\overline{y})=\lim_{y\to 0^+} H(\overline{x},y)=\lim_{(x,y)\to (0,0)} H(x,y)=0$[/tex] (for all fixed [tex]$\overline{x},\overline{y}>0$[/tex]), therefore [tex]H(x,y)[/tex] can be extended by continuity on the whole set [tex]$x,y\geq 0$[/tex].

*** If [tex]$p<0$[/tex] then [tex]$M_p(x,y)$[/tex] is defined for [tex]$x,y>0$[/tex], but it can be exetended on the whole set [tex]$x,y\geq 0$[/tex] by continuity (as in **).

Risposte
gugo82
"gugo82":
4. Prove that [tex]$\max \{ x,y\} \geq M_p(x,y) \geq \min \{ x, y\}$[/tex] and:

(a) [tex]$\lim_{p\to +\infty} M_p(x,y) =\max \{ x, y\}$[/tex],
(b) [tex]$\lim_{p\to -\infty} M_p(x,y) =\min \{ x, y\}$[/tex],
(c) [tex]$\lim_{p\to 0} M_p(x,y)=G(x,y)$[/tex],

then realize that (pMqM) holds for all [tex]$p> q \in [-\infty ,+\infty]$[/tex] with the equality case characterized as in 2.


Choose [tex]$x,y\geq 0$[/tex].

If [tex]$p>0$[/tex], then [tex]$2\ (\min \{ x,y\})^p \leq x^p+y^p\leq 2\ (\max \{ x,y\})^p$[/tex], hence [tex]$\min \{ x,y\}\leq M_p(x,y)\leq \max \{ x,y\}$[/tex].
If [tex]$p=0$[/tex], then [tex]$(\min \{ x,y\})^2 \leq x\ y\leq (\max \{ x,y\})^2$[/tex], therefore [tex]$\min \{ x,y\} \leq G(x,y)=M_0(x,y)\leq \max \{ x,y\}$[/tex].
If [tex]$p<0$[/tex], then [tex]$2\ (\max \{ x,y\})^p\leq x^p+y^p\leq 2\ (\min \{ x,y\})^p$[/tex], so inequalities [tex]$\min \{ x,y\}\leq M_p(x,y)\leq \max \{ x,y\}$[/tex] follow.

Next, we show that relations a-c hold.
W.l.o.g. asume [tex]$x < y$[/tex], so that [tex]$x = \min \{ x,y\}$[/tex] and [tex]$y = \max \{ x,y\}$[/tex]; then:

[tex]$M_p(x,y)=y\ \left\{ \frac{1}{2}\ [1+(\tfrac{x}{y})^p]\right\}^\frac{1}{p} = x\ \left\{ \frac{1}{2}\ [1+(\tfrac{y}{x})^p]\right\}^\frac{1}{p}$[/tex]

and passing to the limit yields:

[tex]$\lim_{p\to +\infty} M_p(x,y) = y\ \lim_{p\to +\infty} \left\{ \frac{1}{2}\ [1+(\tfrac{x}{y})^p]\right\}^\frac{1}{p} =y=\max \{ x,y\}$[/tex]

[tex]$\lim_{p\to -\infty} M_p(x,y) = x\ \lim_{p\to -\infty} \left\{ \frac{1}{2}\ [1+(\tfrac{y}{x})^p]\right\}^\frac{1}{p} =x=\min \{ x,y\}$[/tex]

and a-b follow. To prove c we write:

[tex]$M_p(x,y) =\exp \left( \frac{1}{p}\ \ln \frac{x^p+y^p}{2}\right)$[/tex]

and evaluate:

[tex]$\lim_{p\to 0} \frac{1}{p}\ \ln \frac{x^p+y^p}{2} = \lim_{p\to 0} \frac{\ln \tfrac{1}{2}(x^p+y^p)}{\tfrac{1}{2}(x^p+y^p) -1}\ \frac{(x^p+y^p)-2}{2p}$[/tex]
[tex]$=\lim_{p\to 0} \frac{\ln \tfrac{1}{2}(x^p+y^p)}{\tfrac{1}{2}(x^p+y^p) -1}\ \frac{1}{2}\ \left[ \frac{x^p-1}{p} +\frac{y^p-1}{p}\right]$[/tex]
[tex]$=\lim_{p\to 0} \frac{\ln \tfrac{1}{2}(x^p+y^p)}{\tfrac{1}{2}(x^p+y^p) -1}\cdot \frac{1}{2}\ \left[ \lim_{p\to 0}\frac{x^p-1}{p} +\lim_{p\to 0}\frac{y^p-1}{p}\right]$[/tex]
[tex]$=1\cdot \frac{1}{2}\ (\ln x+\ln y)=\ln \sqrt{x\ y}$[/tex],

therefore:

[tex]$\lim_{p\to 0} M_p(x,y) =\exp \left( \lim_{p\to 0} \frac{1}{p}\ \ln \frac{x^p+y^p}{2} \right) =\sqrt{x\ y}=G(x,y)$[/tex]

as we claimed.

The last assertion is trivial.

gugo82
"gugo82":
2. Let [tex]$x,y\geq 0$[/tex], choose [tex]$p\in \mathbb{R} \setminus \{ 0\}$[/tex] and set:

[tex]$M_p(x,y):=\left\{ \frac{1}{2}(x^p+y^p)\right\}^\frac{1}{p}$[/tex];

we say that [tex]$M_p(x,y)$[/tex] is the [tex]$p$[/tex]-mean of [tex]$x$[/tex] and [tex]$y$[/tex].

Using Lagrange multipliers method, show that for [tex]$p>q$[/tex] the following general inequality holds:

(pMqM) [tex]$M_p(x,y)\geq M_q(x,y)$[/tex]

and that equality case occurs in (pMqM) iff [tex]$x=y$[/tex] (in the case [tex]$p>0$[/tex]) or iff [tex]$x=y \text{ or } x=0 \text{ or } y=0$[/tex] (for [tex]$p<0$[/tex]).

a. Let [tex]$p>q>0$[/tex].


b. Let [tex]$p>0>q$[/tex].


c. The case [tex]$0>p>q$[/tex] can be handled in a similar way.

Therefore (pMqM) holds. The characterization of the equality cases is a staightforward consequence of what we've already proved.

dissonance
This one is very interesting. Using a parametrization for [tex]Z[/tex] is really a cheap trick, since it voids the necessity to use any advanced technique such as Lagrange multipliers. That's why I didn't like my solution. I'll memorize this method, thank you. ;-)

Ok, now for pMqM. I'll skip directly to the "elementary calculus" proof for a change.
Let [tex]p > q[/tex]. As you pointed out in your "Hints" box, the inequality

[tex]M_p(x, y) \ge M_q(x, y),\ \mathrm{all}\ x, y>0[/tex];

is the same as

[tex]M_p(t, 1) \ge M_q (t, 1),\ \mathrm{all}\ t>0[/tex];

so we're going to prove this last one, which is best written

[tex](t^q +1) ^ {1 \over q} ( t^p +1 )^ {-{1 \over p}} \le 2 ^{{1\over q} - {1 \over p}},\ \mathrm{all}\ t>0[/tex].

Let [tex]\varphi(t)=(t^q +1) ^ {1 \over q} ( t^p +1 )^ {-{1 \over p}},\ t>0[/tex]. This function tends to [tex]1[/tex] as [tex]t \to 0, t \to +\infty[/tex] and attains the value [tex]2 ^{{1\over q} - {1 \over p}}[/tex] for [tex]t=1[/tex]; we claim that this is its only extreme point and hence its global maximum ([tex]1 < 2 ^{{1\over q} - {1 \over p}}[/tex] because of the conditions on [tex]p[/tex] and [tex]q[/tex]) .

This can be proved via the following brute-force computations (which almost drove me to the asylum :-) ):

[tex]\varphi'(t)=(t^q+1)^{-{q-1 \over q }} t^{q-1} (t^p +1 ) ^{-{1 \over p}} - (t^q +1)^{1 \over p} (t^p +1 )^{-{1+p \over p}}t^{p-1}[/tex];

having assumed that [tex]t>0[/tex] we can multiply l.h.s and r.h.s. of the equation [tex]\varphi'(t)=0[/tex] by [tex](t^q +1)^{-1 \over p} (t^p +1 )^{{1+p \over p}}t^{-p+1}[/tex] and get the equivalent

[tex]\displaystyle {t^{-p+q} -1 \over t^q +1}=0[/tex]

which clearly has the only positive zero [tex]t=1[/tex]. This proves also the equality case (except for negative [tex]p[/tex] - that's trivial enough to leave unproved).

It's a curious thing, that at the beginning had confused me, that for [tex]p > q \ge 1[/tex] the inequalities between the [tex]p[/tex]-norms (which differ from [tex]p[/tex]-means by a constant) go exactly in the opposite direction.

gugo82
Ok! :smt023

You used a parametrization to check that $(1,1)$ is indeed a minimum... But there are other (not so easy) ways! :-D

For example, one could also check the sufficient condition with the Hessian matrix (which is just a suitable variant of the classical unconstrained extremum sufficient condition) in order to prove that a stationary point on the constraint is a local minimum.
In fact the following holds:

In order to find a strict local minimum [maximum] for a [tex]$C^2$[/tex] function [tex]$f(x,y)$[/tex] in a stationary point [tex]$(x_0,y_0)$[/tex] on the constraint [tex]$Z:g(x,y)=0$[/tex], it is sufficient the (quadratic form associated to the) Hessian matrix [tex]$H_f(x_0,y_0)$[/tex] to be positive [negative] definite in the tangent space [tex]$\mathcal{T}_Z(x_0,y_0)$[/tex] to [tex]$Z$[/tex] in [tex]$(x_0,y_0)$[/tex].

In our context this condition fails, for the Hessian matrix of [tex]$f(x,y)=A(x,y)$[/tex] is null.
Neverthless one can take [tex]$f(x,y)=G^2(x,y)$[/tex], [tex]$g(x,y)=2A(x,y)-2$[/tex] (the square in [tex]$f$[/tex] and the scaling factor in [tex]$g$[/tex] are chosen to avoid dumb computations) in order to transform the minimum problem into a maximum problem: the sufficient condition works in this case, because [tex]$H_f(1,1)$[/tex] is non null.

dissonance
Here's my try at 1).
Let's start with AMGM. First of all we point out that the case [tex]x=0[/tex] or [tex]y=0[/tex] is trivial; in what follows we assume [tex]x, y>0[/tex].
Both [tex]A[/tex] and [tex]G[/tex] are positively homogeneous of the same degree. So to prove AMGM it will suffice to prove that [tex]G(x, y)=1 \Rightarrow A(x, y) \ge 1[/tex]; from this we will get

[tex]\displaymath A(\frac{x}{G(x, y)}, \frac{y}{G(x, y)}) \ge G(\frac{x}{G(x, y)}, \frac{y}{G(x, y)})[/tex]

and the claim follows by homogeneity.

Since [tex]\frac{\partial G}{\partial x}=\frac{y}{2\sqrt{xy}}[/tex] and [tex]\frac{\partial G}{\partial y}=\frac{x}{2\sqrt{xy}}[/tex], every value of [tex]G[/tex] other than [tex]0[/tex] is regular; hence we can find every extreme point of [tex]A[/tex] on [tex]Z=\{(x, y) \mid G(x, y)=1\}[/tex] by means of Lagrange multipliers. Turns out that there is only one such point: [tex](x, y)=(1, 1)[/tex]; that's because

[tex]\displaymath \begin{cases}
\frac{\partial {A}}{\partial{x}}-\lambda \frac{\partial{G}}{\partial{x}} &=0 \\
\frac{\partial {A}}{\partial{y}}-\lambda \frac{\partial{G}}{\partial{y}} &=0 \\
G(x, y) &=1 \\ \end{cases}[/tex]

has the only solution [tex]x=y=\lambda=1[/tex], as it is readily seen.

Finally, we show that [tex]A[/tex] has got a global minimum on [tex]Z[/tex].
Here I couldn't think of anything better than use this parametrization of [tex]Z[/tex]:
[tex]Z=\{ (x, y) \mid y=1/x \}[/tex]
and the fact that [tex]\varphi(x)=A(x, 1/x)=1/2(x+1/x)[/tex] is positive and infinite for [tex]x \to 0,\ x \to +\infty[/tex]. From this it follows that [tex]A[/tex] must have a global minimum on [tex]Z[/tex]; and since it has only one extreme point, that one must be it.
This proves AMGM.

Now for the other two inequalities. Since the technique is essentially the same I will cover them quickly. For AMHM we prove that [tex]A(x, y)=1 \Rightarrow 1 \ge H(x, y)[/tex] and use homogenity as before; again [tex]1[/tex] is a regular value for [tex]A[/tex] and so every extreme point of [tex]H[/tex] over [tex]Z=\{ (x, y)\mid A(x, y)=1 \}[/tex] will be detected via Lagrange multipliers, and again the only point as such is [tex](1, 1)[/tex].

The only difference from before is that we now need to prove this point is a global maximum for [tex]H[/tex] on [tex]Z[/tex]; to do so we write [tex]Z=\{ (x, y)\mid 0 < x < 2\ y=2-x \}[/tex] and evauate [tex]\varphi(x)=H(x, 2-x)=2x-x^2[/tex]; clearly [tex]x=1[/tex] is the global maximum of [tex]\varphi[/tex].
This proves AMHM.

GMHM goes the same way as AMHM: we prove that [tex]G(x, y)=1 \Rightarrow 1 \ge H(x, y)[/tex] by posing [tex]Z=\{(x, y) \mid G(x, y)=1 \}[/tex] and applying Lagrange method. Computations get fierce here, though.

Rispondi
Per rispondere a questa discussione devi prima effettuare il login.