27
$\begingroup$

I just encountered this function $f(x,y)=\min(x,y)$. I wonder what the partial derivatives of it look like.

$\endgroup$
1
  • 1
    $\begingroup$ A general rule of thumb is that to find the partial derivatives of functions defined by rules such as the one above (i.e., not in terms of "standard functions"), you need to directly apply the definition of "partial derivative". $\endgroup$ Commented May 28, 2012 at 23:47

3 Answers 3

38
$\begingroup$

$$ f(x, y) = \min(x,y) = \begin{cases} x & \text{if } x \le y \\ y & \text{if } x \gt y \end{cases} $$

The function isn't differentiable along $y = x$, but the partial derivatives are straightforward otherwise.

$$ \frac{\partial f(x, y)}{\partial x} = \begin{cases} 1 & \text{if } x \lt y \\ 0 & \text{if } x \gt y \end{cases} $$

$$ \frac{\partial f(x, y)}{\partial y} = \begin{cases} 0 & \text{if } x \lt y \\ 1 & \text{if } x \gt y \end{cases} $$

Here is a plot of the function to help you see the derivatives and why it's not differentiable along $y = x$:

plot

$\endgroup$
5
  • $\begingroup$ I bet you used Mathematica to produce this image. $\endgroup$
    – Koba
    Commented May 29, 2012 at 1:43
  • $\begingroup$ @Dostre Indeed I did! $\endgroup$ Commented May 29, 2012 at 8:45
  • $\begingroup$ @AymanHourieh, the function is not differentiable along the line $x = y$, but is there a directional derivative along this line, i.e. along vector (1,1)? $\endgroup$
    – garej
    Commented Apr 5, 2018 at 18:15
  • $\begingroup$ Is there any scientific paper or book that I could cite for using this partial differentiation? $\endgroup$
    – Daniel B.
    Commented Jan 18, 2021 at 14:18
  • 1
    $\begingroup$ @garej If you allow $min(x,y)=x=y$ for the condition $x=y$, then the derivative is 1 for both axes. $\endgroup$
    – syockit
    Commented Apr 15, 2023 at 18:24
7
$\begingroup$

If $(a,b)$ is below the line $x=y$, then the function has value $y$ on a neighborhood of $(a,b)$, so the partial derivatives are $$\begin{align*} \left.\frac{\partial f}{\partial x}\right|_{(x,y)=(a,b)}&=0\\ \left.\frac{\partial f}{\partial y}\right|_{(x,y)=(a,b)} &= 1. \end{align*}$$ Symmetrically, if $(a,b)$ is "above" the line $x=y$, then the function has value $x$ on a neighborhood of $(a,b)$, so the partial derivatives are: $$\begin{align*} \left.\frac{\partial f}{\partial x}\right|_{(x,y)=(a,b)}&=1\\ \left.\frac{\partial f}{\partial y}\right|_{(x,y)=(a,b)} &= 0. \end{align*}$$

If $(a,b)$ is on the line $x=y$, then the function has value $y$ as we approach along a constant $y$ direction from the right, and value $x$ if we approach along a constant $y$ direction on the left. So the partial with respect to $x$ is $1$ from the left and $0$ from the right, hence does not exist at $(a,b)$. Similarly for $y$.

So the function is differentiable away from the line $x=y$, with values as given above.

$\endgroup$
-3
$\begingroup$

It refers to the partial derivatives of functions of two variables or more/simply multiple variables,with their notation $f\{x,y,z,.....\}$, depending on how many variables are given.this method can be done by differentiating with respect to individual variable (with respect to $x$,you fix $y$ and $z$ and treat them as constants, with respect to $y$, you fix $x$ and $z$ and treat them as constants and the same goes for $z$ $zd_n$ other given variables. We can also use the formula.

$\endgroup$
1
  • $\begingroup$ How does this answer the question? $\endgroup$
    – Martin
    Commented Feb 13, 2013 at 16:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .