Find the maximum and minimum of $x^2+2y^2$ if $x,y\in\mathbb R$ and $$x^2-xy+2y^2=1$$

My attempt:

Clearly, since $x^2-x(y)+(2y^2-1)=0$ and $2y^2-y(x)+(x^2-1)=0$, we have that $$\Delta_1=y^2-8y^2+4=4-7y^2\ge 0$$


$$\Delta_2=x^2-8x^2+8=8-7x^2\ge 0$$

so that $y^2\le \frac{4}{7}$ and $x^2\le \frac{8}{7}$.

Thus $x^2+2y^2\le \frac{8}{7}+\frac{8}{7}=\frac{16}{7}$.

But clearly $x^2+2y^2\neq \frac{16}{7}$, since if $\begin{cases}x^2=\frac{8}{7}\\y^2=\frac{4}{7}\end{cases}$, then $x^2-xy+2y^2\neq 1$

so that equality can't be achieved and we only have that $x^2+2y^2<\frac{16}{7}$.

  • 1
    $\begingroup$ Voted to keep open; the question is to find a constrained extremum, and the portion of the post beginning with "Clearly, since..." is the OP's attempt at a solution. The "real" question may be "why is the proposed solution wrong?" (answer: the discriminant conditions are independent, while $x$ and $y$ are constrained to lie on an ellipse), but it does seem there's a clear question here. $\endgroup$ Feb 28, 2015 at 14:10
  • 1
    $\begingroup$ @user86418 I've added the words 'my attempt'. I gave a bound for $x^2+2y^2$ but found out that it is a strict bound and equality can't be achieved so that $x^2+2y^2$ is strictly less than $\frac{16}{7}$. $\endgroup$
    – user89167
    Feb 28, 2015 at 14:16
  • $\begingroup$ That should help clarify. :) It took me a few passes to realize that material was your attempt, and not part of the question. $\endgroup$ Feb 28, 2015 at 14:35
  • $\begingroup$ @user86418 How does one vote to keep a question open? $\endgroup$ Feb 28, 2015 at 14:51
  • 1
    $\begingroup$ @KimJongUn: This question came up in the "review close votes" queue; "keep open" is one option. I don't know whether Ordinary Civilians can register a "keep open" vote otherwise. $\endgroup$ Feb 28, 2015 at 15:05

3 Answers 3


You already have a great answer from Kim. Another way would be to use Cauchy-Schwarz inequality to get the same bounds on $xy$: $$(1+xy)^2 = (x^2+2y^2)(2y^2+x^2) \ge 8x^2y^2$$

$$\implies -1-xy \le 2\sqrt2 xy \le 1+xy$$ $$\implies -\frac1{2\sqrt2+1} \le xy \le \frac1{2\sqrt2-1}$$ $$\implies 1-\frac1{2\sqrt2+1}\le 1+xy=x^2+2y^2 \le 1+\frac1{2\sqrt2-1}$$

  • $\begingroup$ In generally bounds does not coincide with $\min, \max .$ $\endgroup$
    – Leox
    Feb 28, 2015 at 15:20
  • $\begingroup$ @Leox In general you are correct. However they will, as long as you can establish equality for both bounds, which we can in this case when $x = \pm \sqrt2 y$. $\endgroup$
    – Macavity
    Feb 28, 2015 at 15:34

An inequality approach: using $a^2+b^2\geq 2ab$ inequality below, we have $$ x^2-xy+2y^2=1\implies 1+xy=x^2+2y^2\geq2\sqrt{2}xy\implies xy\leq\frac{1}{2\sqrt{2}-1}\cdot $$ It follows that $$ x^2+2y^2=1+xy\leq 1+\frac{1}{2\sqrt{2}-1}= \boxed{\frac{2\sqrt{2}}{2\sqrt{2}-1}}\cdot $$ Similarly, using $a^2+b^2\geq -2ab$, we have $$ 1+xy=x^2+2y^2\geq-2\sqrt{2}xy\implies xy\geq-\frac{1}{2\sqrt{2}+1}\cdot $$ which implies $$ x^2+2y^2=1+xy\geq 1-\frac{1}{2\sqrt{2}+1}=\boxed{\frac{2\sqrt{2}}{2\sqrt{2}+1}}\cdot $$ Equality is realised for the max when $$ y=\frac{1}{\sqrt{-\sqrt{2}+4}},\quad x=\sqrt{2}y; $$ and for min $$ y=\frac{1}{\sqrt{\sqrt{2}+4}},\quad x=-\sqrt{2}y\cdot $$

  • 1
    $\begingroup$ I will 'accept' this answer if no one else answers this. This is a great solution. $\endgroup$
    – user89167
    Feb 28, 2015 at 14:32

Since your answer is tagged precalculus, I'll stick to precalculus methods. Note that one way to solve this would be using Lagrange multipliers from calculus. That calculation is straight-forward, but the numbers get messy. (In some sense, the solution below is a Lagrange multiplier solution, but without the calculus).

In your problem, the first step that I will take is to change variables to $z=\sqrt{2}y$. Then, your problem is to maximize or minimize

$x^2+z^2$ subject to


Note that the function that you're maximizing is the square of the distance function from the origin and the constraint equality is an ellipse centered at the origin. The closest point to the origin is on the minor axis and the furthest point from the origin is on the major axis. The problem is that these axes are not axis aligned.

In this case, the major axis is along the line $x=z$ and the minor axis is along the line $x=-z$. This can be seen because the equation is symmetric in $x$ and $z$. Now, when $x=z$, we can substitute $z=x$ into $x^2-\frac{1}{\sqrt{2}}xz+z^2=1$ to get


We can isolate $x^2$ to get

$\left(2-\frac{1}{\sqrt{2}}\right)x^2=1$ or that


Since $x=z$, the maximum value is then


On the other hand, along the line $x=-z$, we can substitute into $x^2-\frac{1}{\sqrt{2}}xz+z^2=1$ to get


Once again, we can isolate for $x^2$ to get


Since $x^2=z^2$, the minimum value is


  • $\begingroup$ This problem is solvable without knowing the equation of an ellipse (and without calculus, but I know you didn't use it). $\endgroup$
    – user89167
    Feb 28, 2015 at 13:31
  • $\begingroup$ How can I see that $x^2-\frac{1}{\sqrt{2}}xz+z^2=1$ is an equation of an ellipse centered at the origin? $\endgroup$
    – user89167
    Apr 6, 2015 at 10:57
  • $\begingroup$ Complete the square in terms of $x^2$ and rewrite the statement in terms of the two new variables. $\endgroup$ Apr 6, 2015 at 11:03
  • $\begingroup$ $\left(x-\frac{\sqrt{2}}{4}x\right)^2+\frac{14}{16}z^2=1$. Why is that an ellipse? The $x$ variable in $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ shouldn't depend on $y$. $\endgroup$
    – user89167
    Apr 9, 2015 at 15:19
  • $\begingroup$ @user89167 Let $y=x-\sqrt{2}{4}z$ and then you have the standard form of the ellipse. Therefore, you have a sheared. $\endgroup$ Apr 9, 2015 at 18:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .