Understanding the behavior of a quadratic function in two dimensions at a critical point (derivation)

37 Views Asked by At

In his MIT OCW multivariable calculus course, Prof. Kleitman writes:

(I) A general quadratic in two dimensions has the form $$ax^2 + bxy + cy^2 + dx + ey + g.$$ Such a function will have a critical point, at which its gradient is the $0$ vector, that is, where $$2ax + by + d = 0 \\ bx + 2cy + e = 0$$ both hold.

(II) If we call that point $(x_0, y_0)$, we can write the quadratic function as in one dimension as

$$a(x - x_0 )^2 + b(x - x_0)(y - y_0) + c(y - y_0)^2 + g'.$$

I'm unclear as to how he gets from (I) to (II). Do the coefficients $a,b,c$ in (II) have the same values as they do in (I)?

If yes: I do not understand the derivation. Writing $$d = -2ax_0 - by_0 \\ e = -2cy_0 - bx_0$$ I get complicated algebra which I cannot get to simplify to (II):

$$ax^2 + bxy + cy^2 -(2ax_0 + by_0)x - (2cy_0 + bx_0)y + g'$$ where $g' = f(x_0,y_0)$ does not seem to simplify to (II), and indeed seems like it could not, because there is no $x_0^2$ term.

Can you explain this derivation?


Update

Based on ummg's recommendation to simply fold constants, I have the following derivation. Each constant is folded into undetermined $K$ (which means the value of $K$ differs each line):

$$\begin{align*} &ax^2 + bxy + cy^2 + dx + ey + K \\ =\, & ax^2 + bxy + cy^2 -(2ax_0 + by_0)x - (2cy_0 + bx_0)y + K \text{ (at crit. pt)} \\ =\, &ax^2 +bxy + cy^2 - 2axx_0 - bxy_0 -bx_0y - 2cyy_0 + K \text{ (distribute)}\\ =\, &ax^2 - 2axx_0 +bxy -bx_0y - bxy_0 + cy^2 - 2cyy_0 + K \text{ (reorder)}\\ =\, &a(x - x_0 )^2 + b(x - x_0)(y - y_0) + c(y - y_0)^2 + K \text{ (complete square)}.\\ \end{align*}$$

Is that correct?