How do you find the smallest possible value of aan equation with two unknowns? I'm solving a list of problems where I'm given an equation and I find the smallest possible value by comparing the equation to a quadratic equation and completing the square, however the next one involves another unknown $y$: 
$$ x^2 - 3x + 2y^2 + 4y + 2. $$
I've been thinking about maybe somehow making $c$ equal $2y^2 + 4y + 2$?
The answer from the answerbook is: $$ x^2 - 3x + 2y^2 + 4y + 2 = \left( x - \dfrac {3}{2} \right)^2 + 2 \left( y + 1 \right)^2 - \dfrac {9}{4}. $$
 A: Note that the expression can be written as $f(x)+g(y)$, where $f(x) = x^2-3x+2 $ and $g(y) = 2y(y+2)$.
The two parts are independent of each other, so we can minimize them separately.
Setting $f'(x) = 0$ gives $2x-3 = 0$, so we see that $x = \frac{3}{2}$ is the minimizer. Noting that $(x-\frac{3}{2})^2 = x^2-3x+\frac{9}{4}$, we see that we can write $f(x) = (x-\frac{3}{2})^2 - \frac{1}{4}$, and that since the square term is always non-negative, we have $f(x) \ge - \frac{1}{4}$, and $f(\frac{3}{2}) = - \frac{1}{4}$.
Similarly, setting $g'(y) = 0$ gives $y=-1$, and repeating the above, we note that $(y+1)^2 = y^2+2y+1$, so we can write $g(y) = 2(y+1)^2 -2$, and so $g(y) \ge -2$ and $g(-1) = -2$.
Putting these together, we have
$f(x)+g(y) = (x-\frac{3}{2})^2 - \frac{1}{4} + 2(y+1)^2 -2 = 
(x-\frac{3}{2})^2  + 2(y+1)^2 - \frac{9}{4}$.
Then $f(x)+g(y) \ge - \frac{9}{4}$, and $f(\frac{3}{2}) + g(-1) = - \frac{9}{4}$.
A: EDIT:
$$ x^2 - 3x + 2y^2 + 4y + 2$$ 
can be re-written as
$$ x^2-2*x\frac{3}{2}+\frac{9}{4}+2(y^2+2y+1)-\frac{9}{4}$$
Obeserve that the first two terms in the expression are of the form 
$$a^2+2a.b+b^2=(a+b)^2$$
Hence we get
$$ x^2 - 3x + 2y^2 + 4y + 2=x^2-2x\frac{3}{2}+\frac{9}{4}+2(y^2+2y+1)-\frac{9}{4}$$
$$\Rightarrow x^2 - 3x + 2y^2 + 4y + 2=(x-\frac{3}{2})^2+2(y+1)^2-\frac{9}{4}$$ 
On the RHS we have the sum of two squares is is . The minimum value of each square term will be 0 as a square term cannot be negative in $IR$. Hence the minimum value of the given expression is -$\frac{9}{4}$ when the two square terms are 0(at x=$\frac{3}{2}$ and y=-1).
A: copper.hat is right that the easiest way to solve this is to view it as composed from two functions and take calculate the derivate of each. Then set $f'(x)=0$ and solve for $x$ for both functions.
But this problem is from Spivak's Calculus (1.717(b), p. 17), before Spivak has introduced differentiation. I think Spivak's intention here is to pump intuitions on completing the square, leading the student towards deriving the quadratic equation from the exercises.
With that in mind the way to solve problems of this sort is to rewrite the formula such that it is the sum of two quadratics, one for the $x$ terms and one for the $y$ terms:
\begin{equation*}
x^2 - 3x + 2y^2 + 4y + 2 = x^2 - 3x + 1 + 2y^2 + 4y + 1
\end{equation*}
This gives us two separate quadratics:
\begin{equation*}
f(x) = x^2 - 3x + 1
\end{equation*}
\begin{equation*}
g(y) = 2y^2 + 4y + 1
\end{equation*}
Now we just have to find the smallest possible value of each quadratic separately, then add them together, which we can do by "completing the square":
\begin{equation*}
f(x) = x^2 - 3x + 1 = (x - \frac{3}{2})^2 - \frac{5}{4}
\end{equation*}
So the smallest possible value of $f(x)$ is the value when $(x
-\frac{3}{2})^2 = 0$, so $x = \frac{3}{2}$ and the minimum of $f(x) = -\frac{5}{4}$. And,
\begin{align}
g(y) &= 2y^2 + 4y + 1\\
&= 2(y^2 + 2y + 1/2)\\
&= 2((y+1)^2 - 1/2)\\
&= 2(y+1)^2 - 1
\end{align}
Here the smallest possible value of $g(y)$ is when $y + 1 = 0$ or $g(-1) = -1$.
Adding them together we get 
\begin{equation*}
f(\frac{3}{2}) + g(-1) = -\frac{5}{4} - 1 = -\frac{9}{4}
\end{equation*}
(You'll note that the values for $x$ and $y$ here are roots for the squares within the quadratics)
