# Derivation of Maxima & Minima in two variables

For two variables i.e $$\quad u=f(x,y)$$:
Condition for Maxima and Minima is given by: $$\frac{\partial f}{\partial x}=0 \quad , \quad \frac{\partial f}{\partial y}=0 \quad \implies \text{Critical points}$$ $$H(x,y)= f_{xx}f_{yy} \, - \, (fxy)^2 \quad \implies \text{Checking function}$$ $$\text{For Maxima:} \quad f_{xx}<0 \, , \, H(x,y)>0 \quad |_{\text{(x,y)=Critical points}}$$ $$\text{For Minima:} \quad f_{xx}>0 \, , \, H(x,y)>0 \quad |_{\text{(x,y)=Critical points}}$$

My Thoughts:
For one variable i.e $$\quad u=f(x)$$
Condition for Maxima and Minima is given by: $$\frac{d f}{d x}=0 \quad \quad \implies \text{Critical points}$$ $$\text{For Maxima:} \quad f_{x}<0 \, \quad |_{\text{x=Critical points}}$$ $$\text{For Minima:} \quad f_{xx}>0 \, \quad |_{\text{x=Critical points}}$$

Extending this concept:
$$du= \frac{\partial f}{\partial x}dx \, + \, \frac{\partial f}{\partial y}dy \quad [\because u=f(x,y)]$$ For Critical Points: $$\quad du=0$$ $$\implies \frac{\partial f}{\partial x}dx \, + \, \frac{\partial f}{\partial y}dy =0$$ $$\implies \frac{\partial f}{\partial x} =0 \quad \& \quad \frac{\partial f}{\partial y} =0 \quad \dots(1)$$ For Maxima : $$\quad d^2u <0 \,$$ &
For Minima : $$\quad d^2u >0 \,$$
$$\therefore d^2u=d(du)$$ $$=d(\frac{\partial f}{\partial x}dx \, + \, \frac{\partial f}{\partial y}dy)$$ $$=\frac{\partial ^2 f}{\partial x^2}dx +\frac{\partial f}{\partial x}d^2 x +\frac{\partial ^2 f}{\partial y \partial x}dx + \frac{\partial ^2 f}{\partial y^2}dy +\frac{\partial f}{\partial y}d^2 y +\frac{\partial ^2 f}{\partial x \partial y}dx \quad \dots (2)$$ considering $$f$$ to be continuous function
,then according to Schwarz's Theorem: $$\frac{\partial ^2 f}{\partial y \partial x}dx=\frac{\partial ^2 f}{\partial x \partial y}dx$$ $$\therefore d^2u=\frac{\partial ^2 f}{\partial x^2}dx + \frac{\partial ^2 f}{\partial y^2}dy+\frac{\partial f}{\partial x}d^2 x + \frac{\partial f}{\partial y}d^2 y + 2 \frac{\partial ^2 f}{\partial y \partial x}dx \quad \dots (3)$$ so, for maxima: $$\frac{\partial ^2 f}{\partial x^2}dx + \frac{\partial ^2 f}{\partial y^2}dy+\frac{\partial f}{\partial x}d^2 x + \frac{\partial f}{\partial y}d^2 y + 2 \frac{\partial ^2 f}{\partial y \partial x}dx <0 \quad |_{\text{(x,y)=Critical points}}$$ $$\implies \frac{\partial ^2 f}{\partial x^2}dx + \frac{\partial ^2 f}{\partial y^2}dy + 2 \frac{\partial ^2 f}{\partial y \partial x}dx <0 \quad |_{\text{(x,y)=Critical points}}$$ $$[\because \frac{\partial f}{\partial x}=0 \quad , \quad \frac{\partial f}{\partial y}=0 \quad |_{(x,y)= \text{Critical points}}]$$ similarly, for minima: $$\frac{\partial ^2 f}{\partial x^2}dx + \frac{\partial ^2 f}{\partial y^2}dy + 2 \frac{\partial ^2 f}{\partial y \partial x}dx >0 \quad |_{\text{(x,y)=Critical points}}$$ Now how to proceed to derive the condition,please help...