How to find the ellipse $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ which goes through $(3,1)$ and has the minimal area? 
How to find the ellipse $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ which goes through $(3,1)$ and has the minimal area? Ellipse area is given as $\pi ab$.

My approach is to use Lagrange method where the constraint function $g=\pi ab$ while the minimization function $f=\frac{x^2}{a^2}+\frac{y^2}{b^2}-1=\frac{3^2}{a^2}+\frac{1^2}{b^2}=1$ to account for the given point. 
We can then calculate $b=\pm\sqrt 2$ and $a=\pm \sqrt{18}$. 
Area can't be negative so we have that the minimal values of $g$ will occur at $(\sqrt 2, \sqrt{18})$ and $(-\sqrt 2, -\sqrt{18})$.
As far as I understand Lagrange multipliers gives us just the stationary points. In order to check that they really are min values we can use the second derivatives test:
$$
g_{aa}=0, g_{bb}=0, g_{ab}=\pi
$$
Then:
$$
D=g_{aa}\cdot g_{bb}-g^2_{ab}=-\pi^2<0
$$
But in order to have a min point I need $g_{aa}>0$ while it's exactly $0$.
What am I doing wrong?
 A: As I understand, the function you seek to minimize is $f=\pi ab$ subject to $g=\frac9{a^2}+\frac1{b^2}=1$, ie, you seek to minimize the area $f$ under the condition $g$ that the ellipse contains the point $(3,1)$.
So you've got the minimization and restriction backwards.
A: We have the general equation of an ellipse:
$$ \frac{x^2}{a^2} + \frac{y^2}{b^2} = 1 $$
whose area is:
$$ f(a,b) = \pi a b$$
We want to minimize the area $f(a,b)$ subject to the constraint that the ellipse passes through the point $(3,1)$, that is:
$$ g(a,b) = \frac{9}{a^2} + \frac{1}{b^2} = 1 $$
Applying the method of Lagrange multipliers, and noting that both $a$ and $b$ are nonzero and we only care about positive $a,b$, we get that the contrained extrema occur at:
\begin{align*}
\nabla f(a,b) &= \lambda \cdot \nabla g(a,b) \\
g(a,b) &=1 \\[15pt]
\pi b &= -\lambda \frac{18}{a^3} \\
\pi a &= -\lambda \frac{2}{b^3} \\
\frac{9}{a^2} + \frac{1}{b^2} &=1 \\[15pt]
a^3 b &= 9ab^3  \\
\frac{9}{a^2} + \frac{1}{b^2} &=1 \\[15pt]
a^2 &= 9b^2  \\
\frac{9}{a^2} + \frac{1}{b^2} &=1 \\[15pt]
a &= 3b  \\
\frac{2}{b^2} &=1 \\[15pt]
\end{align*}

\begin{align*} a &= 3\sqrt{2}  \\ b &= \sqrt{2} \end{align*}

This choice of $(a,b)$ gives the ellipse area 

$$A = 6\pi$$

We know this must be the minimum, since the choice of $(a,b) = (6,2/\sqrt{3})$ satisfies the constraint, yet gives a greater ellipse area since $2/\sqrt{3} > 1$
