先來個微積分解法好了。 :p
以下利用
Lagrange multiplier 求解.
解:
\(x^2-xy+4y^2=1\) 的 \(\delta = (-1)^2 - 4\cdot 1\cdot 4 <0\),圖形為橢圓或其退化的情形.
所以 \(x^2+4y^2\) 會有最大值與最小值.
令 \[f(x,y,\lambda) = x^2 + 4y^2 +\lambda \left(x^2 -xy +4y^2 - 1\right),\]
由 \( \nabla_{x,y,\lambda} f(x , y, \lambda)=0\),得
\[\frac{{\partial f}}{{\partial x}} = \frac{{\partial f}}{{\partial y}} = \frac{{\partial f}}{{\partial \lambda }} = 0,\]
\[2x + \lambda\left(2x -y\right) =0 .......(1)\]
\[8y + \lambda\left(-x+8y\right)=0 .......(2)\]
\[x^2 -xy +4y^2 - 1=0 .......(3)\]
由(1)(2),整理得
\[⇒ 2\left(1+\lambda\right) x= \lambda y 且 8\left(1+\lambda\right)y = \lambda x .......(*)\]
兩式相乘可得
\[ 16\left(1+\lambda\right)^2xy = \lambda^2 xy\]
\[⇒ xy\left(16\left(1+\lambda\right)^2 - \lambda^2\right)=0\]
\[⇒ xy\left(3\lambda+4\right)\left(5\lambda+4\right)=0\]
\[⇒ x=0 或 y=0 或 \lambda = -\frac{4}{5} 或 \lambda = -\frac{4}{3}\]
由(*)可知若 \(x,y\) 中有任一者為 \(0\),則另一數亦為零,但帶入(3)不合,所以 \(xy\neq0\),
1. 若 \(\lambda = -\frac{4}{5}\) ,則可以解得 \(x^2 = \frac{4}{10},\, y^2 = \frac{1}{10} ⇒ x^2 + 4y^2 = \frac{4}{5}.\)
2. 若 \(\lambda = -\frac{4}{3}\) ,則可以解得 \(x^2 = \frac{2}{3},\, y^2 = \frac{1}{6} ⇒ x^2 + 4y^2 = \frac{4}{3}.\)
故,最大值為 \(\frac{4}{3}\),最小值為 \(\frac{4}{5}\).
再來個算幾不等式的
另解,
\[x^2-xy+4y^2=1 ⇒ x^2 + 4y^2 = 1+xy ........(※)\]
由算幾不等式,可得
\[\frac{x^2 + 4y^2}{2}\geq \sqrt{x^2 \cdot 4y^2}\]
\[⇒ \frac{1+xy}{2}\geq 2 \left|xy\right|\]
\[⇒ -\frac{1+xy}{2}\leq 2 xy \leq \frac{1+xy}{2}\]
\[⇒ -\frac{1}{5}\leq xy \leq \frac{1}{3}\]
\[⇒ \frac{4}{5}\leq 1+xy \leq \frac{4}{3}\]
由(※),
\[⇒ \frac{4}{5}\leq x^2+4y^2 \leq \frac{4}{3}\]