Hello there I am investigating catastrophe theory although I have discovered something in a book I am reading that I dont understand

we consider a smooth function of two variables with $\displaystyle f(0,0) = f_x(0,0) = f_y(0,0) = 0$, i.e. there is a critical point at the origin, so the Taylor series is

$\displaystyle f(x,y) = ax^2 + 2h x y + b y^2) $+ higher order terms

where $\displaystyle a = f_{xx}, b = f_{yy}, h = f_{xy}$

We consider the case when the hessian$\displaystyle ab - h^2 = 0$, and that not all the derivatives are zero

So the book says that this means $\displaystyle |ax^2 + 2h x y + b y^2 |$ is a perfect square and allows us to write

$\displaystyle |f(x,y)| = \frac{1}{2}(\sqrt{|a|}x + \sqrt{|b|}y)^2$ + higher order terms

BUT!

if we do $\displaystyle f(x,y) = \frac{1}{2}(2x^2 - 4 x y + 2 y^2)$, all the conditions are satisfied but

$\displaystyle |f(x,y)| \not=\frac{1}{2}((\sqrt{|a|}x + \sqrt{|b|}y)^2 = \frac{1}{2}(2x^2 + 4 x y + 2 y^2)$

could anyone explain? thanks very much