Apostol: Why exactly is $\frac{1}{2}\sqrt{\frac{y}{x}}$ not defined at origin if the partial derivative of $\sqrt{|xy|}$ exists at origin?

147 Views Asked by At

Consider the scalar field $f(x,y)=\sqrt{|xy|}$.

Here is a $3D$ plot

enter image description here

In Apostol's Calculus we are asked to verify that the partial derivatives $\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$ are zero at the origin.

I know how to show this by using the definition of partial derivatives. For example

$$\frac{\partial f(0,0)}{\partial x}=\lim\limits_{h\to 0} \frac{f(\langle 0,0\rangle+h\langle 1,0\rangle)-f(0,0)}{h}\tag{1}$$

$$\lim\limits_{h\to 0} \frac{f(h,0)-f(0,0)}{h}\tag{2}$$

$$=0$$

But my question regards the expression

$$\frac{\partial f(x,y)}{\partial x}=\frac{1}{2}\sqrt{\frac{y}{x}}\tag{3}$$

which is the partial derivative when $x>0$ and $y>0$ (alternatively, when both are negative).

What are the precise reasons that this expression isn't true at the origin, and yet the partial derivative is defined at the origin?

Note that this expression isn't defined at the origin. But why?

It is defined for all points except the origin on the line of points of form $(x,0)$.

To obtain (3), we took the limit of

$$\frac{f(x+h,y)-f(x,y)}{h}\tag{4}$$

and the resulting expression isn't defined at the origin.

On the other hand to show that the partial derivative does exist at the origin we took the limit of

$$\frac{f(0+h,0)-f(0,0)}{h}\tag{5}$$

It is not clear to me why the limit of this expression is defined, but the limit of (4) evaluated at the origin isn't defined.

3

There are 3 best solutions below

5
On

Turning it around, another interesting question is "why do the partial derivatives exist at the origin even though the function is not differentiable?"

Just like a simple function $f$ from $\mathbb{R}$ to $\mathbb{R}$ is differentiable if the function's graph near the point is similar to a line which is not vertical, a function $f$ from $\mathbb{R}^m$ to $\mathbb{R}$ is called differentiable if the function acts similar to a function linear in each input coordinate. For $\mathbb{R}^2 \to \mathbb{R}$, this means the graph near the point is similar to a plane which is not vertical.

A differentiable function has the nice property that we can know the approximate rate of change along any path through the domain from just a gradient vector. One definition of "differentiable" here is:

A real-valued function $f$ whose domain $D$ is a subset of $\mathbb{R}^n$ is differentiable at a point $\vec r$ in the interior of $D$ if there is a vector $\vec u \in \mathbb{R}^n$ so that for every path $\sigma : \{t \in \mathbb{R} \mid -1 < t < 1\} \to D$ with $\sigma(0)=\vec r$ and $\sigma$ differentiable at $0$,

$$ \lim_{t \to 0} \frac{f(\sigma(t)) - f(\vec r)}{t} = \vec u \cdot \sigma'(0) \label{eq:1} \tag{1} $$

If this vector $\vec u$ exists, it is unique and is the gradient of $f$ at $\vec r$: $\vec u = \nabla f(\vec r)$.

(More generally, a function $F: \mathbb{R}^n \to \mathbb{R}^m$ has similar properties using the Jacobian matrix in place of the gradient vector.)

We also have the simple gradient formula like

$$\nabla f = \frac{\partial f}{\partial x} \hat \imath + \frac{\partial f}{\partial y} \hat \jmath \label{eq:2} \tag{2}$$

The essential relation between equations $\ref{eq:1}$ and $\ref{eq:2}$ is that the partial derivatives are determined from the two simplest paths $\sigma$: $\sigma(t) = (t,0)$ or $\sigma(t) = (0,t)$. So IF $f$ is differentiable, then the partial derivatives do exist, and $\ref{eq:2}$ gives us an easy way to compute $\nabla f$, and then we can use it more generally along any path via $\ref{eq:1}$. But just the existence of partial derivatives doesn't prove the function is differentiable at that point, since they only capture behavior on those two paths, not along all paths. And other theorems which involve partial derivatives, or the gradient or Jacobian almost always require differentiability.

When $x \neq 0$ and $y \neq 0$, this example function $f(x,y) = \sqrt{|xy|}$ is differentiable and has gradient

$$ \nabla f = \frac{1}{2} \sqrt{|xy|} \left(\frac{\hat \imath}{x} + \frac{\hat \jmath}{y}\right) \tag{3}$$

When $x=0$ or $y=0$, the example function is not differentiable. If $y=0$ and $x \neq 0$, then even though $f$ is not differentiable, it does have the partial derivative $\frac{\partial f}{\partial x} = 0$ since the particular path along the $x$-axis stays exactly in the groove where $f=0$. But along most other paths we're likely to try, the rate of change of $f$ approaches an infinity. The same way, if $x=0$ and $y \neq 0$, $f$ is not differentiable but has $\frac{\partial f}{\partial y} = 0$. And at the origin point itself, $\frac{\partial f}{\partial x} = \frac{\partial f}{\partial y} = 0$, but $f$ is still not differentiable because on other paths approaching the origin $f$ changes too fast.

2
On

For $x\neq 0$ (not just $x$ and $y$ both positive or both negative),

$$\DeclareMathOperator{\sgn}{sgn} \frac{\partial f(x,y)}{\partial x}=\frac12 \sgn(x) \sqrt{\left\lvert\frac yx\right\rvert} $$ where $\sgn(x)$ is the "sign" function: $1$ if $x$ is positive, $-1$ if $x$ is negative, and $0$ if $x=0.$

But the right-hand side of that equation is undefined whenever $x = 0,$ not just at $(x,y)=(0,0).$ There is a good reason for that: for any fixed non-zero $y,$ $\frac{\partial f(x,y)}{\partial x}$ goes to $\infty$ as $x\to 0$ from above, but it goes to $-\infty$ as $x\to 0$ from below. The case $(x,y)=(0,0)$ is the only case where $x=0$ and it is possible to find a partial derivative of $f(x,y)$ with respect to $x.$ It should not really be surprising that the formula that doesn't work at any other point where $x=0$ also doesn't work at $(x,y)=(0,0).$

What is actually surprising (in a sense) is that $f(x,y)$ has both partial derivatives at $(x,y)=(0,0)$ despite the fact that the function is not differentiable there. This has to do with the "folds" in the function along the $x$ and $y$ axes. The fold along the $x$ axis, which prevents the existence of $\frac{\partial f(x,y)}{\partial y}$ at any point on the $x$ axis except the origin, nevertheless allows the existence of $\frac{\partial f(x,y)}{\partial x}$ along the $x$ axis. At the same time, $\frac{\partial f(x,y)}{\partial x}$ does not exist at any point on the $y$ axis (other than the origin) due to the fold along the $y$ axis, but $\frac{\partial f(x,y)}{\partial y}$ does exist along the $y$ axis. Where the two axes cross, both partial derivatives are defined, but the derivative is still not defined according to the usual definitions.

0
On

When we take the limit

$$\lim\limits_{h\to 0}\frac{f(x+h,y)-f(x,y)}{h}\tag{1}$$

what we find is that if $x$ and $y$ are positive then we have

$$\lim\limits_{h\to 0}\frac{\sqrt{(x+h)y}-\sqrt{xy}}{h}\tag{2}$$

$$=\lim\limits_{h\to 0}\frac{y}{2\sqrt{(x+h)y}}\tag{3}$$

$$=\frac{y}{2\sqrt{xy}}\tag{4}$$

where we used L'Hopital's rule.

If $x=0$, however, we have

$$\lim\limits_{h\to 0}\frac{f(0+h,y)-f(0,y)}{h}\tag{5}$$

$$=\lim\limits_{h\to 0}\frac{\sqrt{hy}}{h}\tag{6}$$

which doesn't exist.

If we let $y=0$, however, then the limit becomes

$$\lim\limits_{h\to 0}\frac{f(0+h,0)-f(0,0)}{h}\tag{7}$$

$$\lim\limits_{h\to 0}\frac{0}{h}\tag{8}$$

$$=0$$

The limits are in fact different limits because of the constraints on the values of $x$ and $y$.

Now, using the latter limit and the analogous one for $\frac{\partial f}{\partial y}$, we see that both partial derivatives exist at the origin.

According to Apostol, this means the gradient exists at the origin. It does not exist on the lines $x=0$ or $y=0$, because one of the partial derivatives doesn't exist on any point of these lines except the origin.

We can see these results intuitively from the 3d plot. The original question was more about the limits involved.

What about other directional derivatives at the origin?

Let $\vec{v}=\langle v_1,v_2\rangle$ be any vector. Then the directional derivative of $f$ with respect to $\vec{v}$ at the origin is

$$f'((0,0);\vec{v})=\lim\limits_{h\to 0}\frac{f(\vec{0}+h\vec{v})-f(\vec{0})}{h}\tag{9}$$

$$=\lim\limits_{h\to 0}\frac{f(hv_1,hv_2)}{h}\tag{10}$$

$$=\lim\limits_{h\to 0}\frac{\sqrt{h^2v_1v_2}}{h}\tag{11}$$

$$=\sqrt{v_1v_2}\tag{12}$$

It appears all of them exist.

Is there a tangent plane at the origin, ie is the $f$ differentiable at the origin?

First of all, if $f$ were differentiable, then we would be able to write

$$f'((0,0);\vec{v})=\nabla f\cdot \vec{v}=\langle 0,0\rangle \cdot \langle v_1, v_2\rangle=0\tag{13}$$

which does not match (12).

I think we can conclude from this that $f$ isn't differentiable by a contrapositive.

However, there are other ways to reach this conclusion.

For example, consider the intersection of $f$ with plane $x=y$.

$$f(x,x)=\sqrt{|x^2|}=|x|\tag{14}$$

This curve isn't differentiable at the origin.

This means there is no tangent line at the origin in the direction of this curve, which there would have to be if there were a tangent plane there.