Partial Derivatives & Multi-variable Functions
Consider a function such as:
\[z=-(3x^2+2y^2+xy)\]What are the values of $x$ and $y$ which maximise $z$?
Are there any such values?
Partial Derivatives
For the prior function:
- We need values of $x$ and $y$ which maximise $z$.
- We know $x$ to maximise $z$ when $y$ is fixed.
- We know $y$ to maximise $z$ when $x$ is fixed.
- But we want to do things simultaneously.
- Assume that $y$ is fixed and find the “right” $x$.
- Assume that $x$ is fixed and find the “right” $y$.
From this we can make a set of simultaneous equations to solve.
Example
For $z=-(3x^2+2y^2+xy)$.
-
Differentiate as if $y$ was a constant:
\[f_x(x,y)=-(6x+y)\] -
Differentiate $f(x,y)$ as if $x$ was a constant.
\[f_y(x,y)=-(4y+x)\] -
Find the values of $x,y$ for which $f_x(x,y)=0,$ $f_y(x,y)=0$ by solving the simultaneous equations.
Notation
For functions of two variables ($z=f(x,y)$) we have:
- $f_x(x,y)$ - The first partial derivative of $f(x,y)$ with respect to $x$.
- $f_y(x,y)$ - The first partial derivative of $f(x,y)$ with respect to $y$.
Also used are:
\[\frac{\partial z}{\partial x}; \frac{\partial z}{\partial y}\]For a function of $n$ variables:
\[z = f(x_1,x_2,\ldots,x_k,\ldots,x_n)\]this style of notation will be used:
\[\frac{\partial z}{\partial x_k}\]Example Continued
From the prior example the two simultaneous equations were:
\[\begin{aligned} -6x-y&=0\\ -x-4y&=0 \end{aligned}\]The only solution is: $x=0, y=0$.
Therefore, this function is critical at the point $(0,0)$.
To test if this is maximum we need an analogue of the second derivative test.
Second Derivative Test with 2 Variables
- With 2 variables there are 4 possible forms of the second order partial derivative.
- With $n$ variables there are $n^2$.
How do we combine these?
The 4 forms: $(f_{xx},f_{xy},f_{yx},f_{yy})$ or:
\[\frac{\partial^2z}{\partial x^2},\frac{\partial^2z}{\partial x\partial y},\frac{\partial^2z}{\partial y\partial x},\frac{\partial^2z}{\partial y^2}\]Interpretation of Notation
- $f_{xx}$ - The partial derivative of $f_x$ with respect to $x$.
- $f_{xy}$ - The partial derivative of $f_y$ with respect to $x$.
For $f(x,y)=-(3x^2+2y^2+xy)$:
\[\begin{aligned} f_{xx}&=-6\\ f_{xy}&=-1\\ f_{yx}&=-1\\ f_{yy}&=-4 \end{aligned}\]In general $f_{xy}$ and $f_{yx}$ are identical functions.
Using the Test
There is a precondition:
\[(f_{xx}f_{yy}-(f_{xy})^2)(\alpha, \beta)>0\]- If $f_{xx}(\alpha, \beta)>0$ the point is a minimum.
- If $f_{xx}(\alpha, \beta)<0$ the point is a maximum.
- If $f_{xx}(\alpha, \beta)=0$ no conclusion can be made.
Where $(\alpha, \beta)$ is the critical point.