Minimizing $a_1x_1^2 + a_2x_2^2$ for positive $a_i$, where $a_1x_1+a_2x_2=B$

Find $$\min\{a_1x_1^2 + a_2x_2^2\}$$ Where $$a_1x_1 + a_2x_2 = B$$, and $$a_1>0$$ and $$a_2>0$$. Find $$x_1$$ and $$x_2$$.

Can we do it usig AG mean inequality?

Let's say we have the problem to find the minimum value of $$x_1^2 + x_2^2$$.

From: $$(x_1 - x_2)^2 ≥0$$, $$x_1^2 + x_2^2 ≥ 2x_1x_2$$

So the minimum value is: $$2x_1x_2$$ for $$x_1=x_2$$.

Can be this done in a simillar manner for the starting problem.

why cannot we put $$x^2 =a_1 x_1^2, y^2 =a_2 x_2^2$$ and solve it like root mean square inequality (without generalization?) We get: $$x^2 = y^2$$
. $$a_1 x_1^2 = a_2 x_2^2$$

but not $$x_1 = x_2$$?

• I don't see what this has to do with AG. Seems like a Lagrange multiplier problem... May 5 at 18:00
• I mean: $\sqrt((x_1^2 + x_2^2)/2) >= (x_1+x_2) /2$ May 5 at 18:13
• Would you like to add your any attempts to the question? May 5 at 18:49
• @BlueSkiesHighFlyer Lookup the weighted power mean inequality, which generalizes the root mean square inequality. You would get $\sqrt{(a_1x_1^2+a_2x_2^2)/(a_1+a_2)} \ge (a_1x_1+a_2x_2)/(a_1+a_2)$.
– dxiv
May 5 at 19:56
• @BlueSkiesHighFlyer Write down the RMS inequality with your substitution and you'll realize that the right hand side is not what you need i.e. not a constant.
– dxiv
May 5 at 20:56

Use standard algebra:

We have,

\begin{align}a_1x_1^2+a_2x_2^2&=a_1\left(\frac{B-a_2x_2}{a_1}\right)^2+a_2x_2^2\\ &=\frac{B^2-2Ba_2x_2+a_2^2x_2^2}{a_1}+a_2x_2^2\\ &=\left(a_2+\frac{a_2^2}{a_1}\right)x_2^2-\left(\frac{2Ba_2}{a_1}\right)x_2+\frac{B^2}{a_1}\end{align}

This is the quadratic polynomial. You can minimize the quadratic polynomial with the following method:

$$ax^2+bx+c=a(x-m)^2+n$$

where, $$m=-\frac{b}{2a}, ~ n=-\frac{b^2-4ac}{4a}$$

In this case, we have

\begin{align}a:=a_2+\frac{a_2^2}{a_1}, ~b:=-\frac{2Ba_2}{a_1} , ~c:=\frac{B^2}{a_1}\end{align}

Hence we get,

$$m:=\frac{B}{a_1+a_2},~ n:=\frac{B^2}{a_1+a_2}$$

Thus,

\begin{align}a_1x_1^2+a_2x_2^2=\left(a_2+\frac{a_2^2}{a_1}\right)\left(x_2-\frac{B}{a_1+a_2}\right)^2+\frac{B^2}{a_1+a_2}\end{align}

Finally, we conclude that $$\min\left\{a_1x_1^2+a_2x_2^2 \mid a_1x_1+a_2x_2=B\right\}=\frac{B^2}{a_1+a_2}$$ which is attained at the point $$x_1=x_2=B/(a_1+a_2)$$.

• Thanks, but can we do it without using quadraric equation, just the inequality? May 5 at 18:21
• @BlueSkiesHighFlyer This is the algebraic method I know. I don't know any other, unfortunately. May 5 at 18:47
• I would consider using features of Markdown to emphasize that sentence, like the alternative I edited in. Not sure, which is best. Also a matter of taste, so I quite understand, if you don't like my suggestion. Furthermore, I cannot test this with the mobile view, for I am too old to understand why anybody would use this site with a screen smaller than 15 inches :-) May 6 at 6:32
• (perhaps "which is attained" is better) May 6 at 7:50
• It's fine as it is, I think. May 6 at 18:16

I see there's nothing calculus-ish in the tags, so maybe a proof using calculus isn't allowed. If so then it's allowed here:

Lagrange multipliers. $$f=a_1x_1^2+a_2x_2^2$$, $$g=a_1x_1+a_2x_2$$, and we want $$\nabla f=\lambda\nabla g$$: \begin{align}2a_1x_1=\lambda a_1, \\2a_2x_2=\lambda a_2,\end{align}hence $$x_1=x_2$$, so $$x_1=\dots$$ and $$x_2=\dots$$.

• why cannot we put $x^2 =a_1 x_1^2, y^2 =a_2 x_2^2$ and solve it like root mean square inequality (without generalization?) We get: $x^2 = y^2$ . $a_1 x_1^2 = a_2 x_2^2$ but not $x_1 = x_2$? May 5 at 20:52
• @BlueSkiesHighFlyer I didn't say you couldn't solve it that way. If you don't get this then I'm pretty sure your answer's wrong, because this is so simple... Oh: also this is the same as the other answer above. May 5 at 20:54
• So what is the mistake in these two lines? $a_1 x_1^2 = a_2 x_2^2$ but not $x_1 = x_2$? May 5 at 20:57
• @BlueSkiesHighFlyer I'm not going to worry about trying to find the error, sorry. May 5 at 21:02

Going along your lines, we can write \begin{align} &a_1a_2(x_1-x_2)^2\ge0\\ \iff&a_1a_2(x_1^2+x_2^2)\ge 2a_1a_2x_1x_2\\ \iff&a_1^2x_1^2+a_2^2x_2^2+a_1a_2(x_1^2+x_2^2)\ge a_1^2x_1^2+a_2^2x_2^2+2a_1x_1a_2x_2\\ \iff&(a_1x_1^2+a_2x_2^2)(a_1+a_2)\ge(a_1x_1+a_2x_2)^2\\ \iff&a_1x_1^2+a_2x_2^2\ge\frac{B^2}{a_1+a_2} \end{align} This is the required lower bound.