How Do You Calculate Partial Derivatives at a Singular Point?

In summary: Oops, no. You are correct. I thought you had made the mistake of using "=" instead of "->" but you didn't. You did it correctly. Hmmmm. I'll have to think about this some more.
  • #1
AwesomeTrains
116
3

Homework Statement


I want to find the partial derivatives in the point [itex](0,0)[/itex] of the function [itex]f:\mathbb R^2\rightarrow\mathbb R[/itex] [itex]
f(x,y):=
\begin{cases}
0 & \text{if } (x,y) = (0,0) \\
\frac{y^5}{2x^4+y^4} & otherwise
\end{cases}
[/itex]

Homework Equations


Our definition of the partial derivatives in the direction [itex]\vec v = (v_1,v_2)[/itex] with [itex]\|\vec v \|_2 = 1[/itex] at the point [itex](0,0)[/itex]
[itex]D_v(f)(0,0)=\lim_{h\rightarrow 0} {\frac{f((0,0)+h\vec v)-f(0,0)}{h}}[/itex]

The Attempt at a Solution


Straight forward:
[itex]D_v(f)(0,0)=\lim_{h\rightarrow 0} {\frac{f((0,0)+h\vec v)-f(0,0)}{h}}=\lim_{h\rightarrow 0} {\frac{f(h(v_1,v_2))}{h}}=\lim_{h\rightarrow 0} {\frac{\frac{h^5v_2^5}{2h^4v_1^4+h^4v_2^4}}{h}}= \frac{v_2^5}{2v_1^4+v_2^4}[/itex] Then in the direction [itex]\vec v = (0,1),(y-direction)[/itex] the tangent slope should be [itex]\frac{1^5}{2*0^4+1^4}=1[/itex]
Here's my problem: When I evaluate the same thing in maple I get 0. Where's my error?
(I've attached a picture of maple)
md2ngy.png

Also I can't see from the graph that the tangent slope in the y-direction should be 0, I think.

Any feedback is very appreciated :)
Alex
 
Physics news on Phys.org
  • #2
I am puzzled as to why you are trying to find the general directional derivative when you are asked only to find the partial derivatives.
(It is quite possible for a function to have partial derivatives at a point and not be differentiable there- in which case, it would not have directional derivatives I all directions.)

Here, the partial derivative, at (0, 0), with respect to x is given by [tex]\lim_{h\to 0}\frac{f(h, 0)- f(0,0)}{h}[/tex] and the derivative with respect to y is given by [tex]\lim_{h\to 0}\frac{f(0,h)- f(0,0)}{h}[/tex][/B]
 
  • #3
AwesomeTrains said:

Homework Statement


I want to find the partial derivatives in the point [itex](0,0)[/itex] of the function [itex]f:\mathbb R^2\rightarrow\mathbb R[/itex] [itex]
f(x,y):=
\begin{cases}
0 & \text{if } (x,y) = (0,0) \\
\frac{y^5}{2x^4+y^4} & otherwise
\end{cases}
[/itex]

Homework Equations


Our definition of the partial derivatives in the direction [itex]\vec v = (v_1,v_2)[/itex] with [itex]\|\vec v \|_2 = 1[/itex] at the point [itex](0,0)[/itex]
[itex]D_v(f)(0,0)=\lim_{h\rightarrow 0} {\frac{f((0,0)+h\vec v)-f(0,0)}{h}}[/itex]

The Attempt at a Solution


Straight forward:
[itex]D_v(f)(0,0)=\lim_{h\rightarrow 0} {\frac{f((0,0)+h\vec v)-f(0,0)}{h}}=\lim_{h\rightarrow 0} {\frac{f(h(v_1,v_2))}{h}}=\lim_{h\rightarrow 0} {\frac{\frac{h^5v_2^5}{2h^4v_1^4+h^4v_2^4}}{h}}= \frac{v_2^5}{2v_1^4+v_2^4}[/itex] Then in the direction [itex]\vec v = (0,1),(y-direction)[/itex] the tangent slope should be [itex]\frac{1^5}{2*0^4+1^4}=1[/itex]
Here's my problem: When I evaluate the same thing in maple I get 0. Where's my error?

Any feedback is very appreciated :)
Alex

You didn't make any mistake. It looks like Maple is being sloppy about how it takes the limit.
 
  • #4
Thanks for the replies.
HallsofIvy said:
I am puzzled as to why you are trying to find the general directional derivative when you are asked only to find the partial derivatives.
(It is quite possible for a function to have partial derivatives at a point and not be differentiable there- in which case, it would not have directional derivatives I all directions.)

Here, the partial derivative, at (0, 0), with respect to x is given by [tex]\lim_{h\to 0}\frac{f(h, 0)- f(0,0)}{h}[/tex] and the derivative with respect to y is given by [tex]\lim_{h\to 0}\frac{f(0,h)- f(0,0)}{h}[/tex][/B]
Ah okay, I meant the general directional derivatives and not the partial ones. I just used the partial in y-direction to test my result and was wondering why it was differing from maple. Is it true that is differentiable? I used the argument that all partial derivatives exists and are continuous. Since that quotient exists for all [tex]\vec v[/tex] with norm 1.

Dick said:
You didn't make any mistake. It looks like Maple is being sloppy about how it takes the limit.
Okay thanks. This was my question :)
Do you know how I then get the correct result from maple?
 
  • #5
AwesomeTrains said:
Thanks for the replies.

Ah okay, I meant the general directional derivatives and not the partial ones. I just used the partial in y-direction to test my result and was wondering why it was differing from maple. Is it true that is differentiable? I used the argument that all partial derivatives exists and are continuous. Since that quotient exists for all [tex]\vec v[/tex] with norm 1.Okay thanks. This was my question :)
Do you know how I then get the correct result from maple?

Just get maple to do what you did. Don't trust it to be magic on this one. More importantly, your function is NOT differentiable at (0,0). It has directional derivatives in all directions - but it doesn't have a tangent plane. The partials exist everywhere but they are NOT continuous at (0,0). Write down the y-partial derivative at a general point (x,y) using quotient rule, etc. Now approach (0,0) by setting x=0 and letting y->0. You get limit 1, just as you worked out. Then approach (0,0) by setting y=0 and letting x->0. You get 0. That's not the way a continuous partial is supposed to work.
 
  • #6
Dick said:
Just get maple to do what you did. Don't trust it to be magic on this one. More importantly, your function is NOT differentiable at (0,0). It has directional derivatives in all directions - but it doesn't have a tangent plane. The partials exist everywhere but they are NOT continuous at (0,0). Write down the y-partial derivative at a general point (x,y) using quotient rule, etc. Now approach (0,0) by setting x=0 and letting y->0. You get limit 1, just as you worked out. Then approach (0,0) by setting y=0 and letting x->0. You get 0. That's not the way a continuous partial is supposed to work.

Ah okay great thank you very much :) I understand now. I was sloppy when checking for continuity at (0,0), took it for granted :)
 
  • #7
AwesomeTrains said:

Homework Statement


I want to find the partial derivatives in the point [itex](0,0)[/itex] of the function [itex]f:\mathbb R^2\rightarrow\mathbb R[/itex] [itex]
f(x,y):=
\begin{cases}
0 & \text{if } (x,y) = (0,0) \\
\frac{y^5}{2x^4+y^4} & otherwise
\end{cases}
[/itex]

Homework Equations


Our definition of the partial derivatives in the direction [itex]\vec v = (v_1,v_2)[/itex] with [itex]\|\vec v \|_2 = 1[/itex] at the point [itex](0,0)[/itex]
[itex]D_v(f)(0,0)=\lim_{h\rightarrow 0} {\frac{f((0,0)+h\vec v)-f(0,0)}{h}}[/itex]

The Attempt at a Solution


Straight forward:
[itex]D_v(f)(0,0)=\lim_{h\rightarrow 0} {\frac{f((0,0)+h\vec v)-f(0,0)}{h}}=\lim_{h\rightarrow 0} {\frac{f(h(v_1,v_2))}{h}}=\lim_{h\rightarrow 0} {\frac{\frac{h^5v_2^5}{2h^4v_1^4+h^4v_2^4}}{h}}= \frac{v_2^5}{2v_1^4+v_2^4}[/itex] Then in the direction [itex]\vec v = (0,1),(y-direction)[/itex] the tangent slope should be [itex]\frac{1^5}{2*0^4+1^4}=1[/itex]
Here's my problem: When I evaluate the same thing in maple I get 0. Where's my error?
(I've attached a picture of maple)
md2ngy.png

Also I can't see from the graph that the tangent slope in the y-direction should be 0, I think.

Any feedback is very appreciated :)
Alex

You are mis-using Maple. Your first statement gives a formula for a variable with the strange name "f(x,y)"; it is NOT a function! To make it a function you need to use the arrow assignment "->", so you need to say
f:=(x,y)-> piecewise(x = 0 and y =0,0,y^5/(2*x^4+y^4));

That works like a charm.
 
  • #8
Ah I see, thanks for the tip. I'll do that in the future
 
  • #9
AwesomeTrains said:
Ah I see, thanks for the tip. I'll do that in the future

Just so you know: sometimes f:x-> ... gives a usable function f(x), but sometimes if does not. For example, if you say f:=x->diff(x^2,x), the inputs f(y) and f(a) give 2y and 2a, as they should; however, f(2) fails, because Maple does not know how to interpret diff(1^2,1) = d(1^2)/d1. So, what you need to do is make sure Maple refers to the result of diff(x^2,x), not to the original formula. You might think that saying fx:=diff(x^2,x); f:=x->fx will do it, but it does not: it gives f(y) = 2x and f(1) = 2x. So: what to do? In the presence of operations (such as "diff" and "int") when defining a function, I always use the "unapply" method. For example, f:=unapply(diff(x^2,x),x) gives f(x) = 2x, f(a) = 2a and f(1) = 2, exactly as it should. The alternative fx:=diff(x^2,x); f:=unapply(fx,x); gives the same correct behaviour.

Strangely, in your case, unapply does not work, but the direct definition does! When I try
f:=unapply(piecewise(...), (x,y)) or fxy = piecewise(...), f:=unapply(fxy,(x,y)) it fails: it just defines f(x,y) as the part where (x,y) =/= (0,0), and declares a "division by 0" error for f(0,0). (However, this odd behavour does not seem to occur for 1-variable piecewise function, and not even for all two-variable piecewise functions--only for yours!)

Note: further checking seems to indicate it has something to do with the nature of the excluded region, which is a single point in your case. The alternative example
fxy:=piecewise(x > 0 and y > 0, g(x,y),0); f:=unapply(fxy, (x,y))
works as it should. Here, the "excluded" region is two-dimensional--quadrants 2,3,4-- rather than a single point.

So, the bottom line is: most of the time the "unapply" method is best, as it works almost always; but on rare examples you need to fall back on the arrow assignment method. Whenever I define piecewise functions, I always check them first, to make sure they are doing what I want.
 
Last edited:
  • Like
Likes AwesomeTrains
  • #10
Thanks for the help Ray. In cases with single point exclusions I use the arrow and otherwise unapply, did I get it right?
 
  • #11
AwesomeTrains said:
Thanks for the help Ray. In cases with single point exclusions I use the arrow and otherwise unapply, did I get it right?

Sort of, but the real message is: always check it before doing further calculations with it.
 

Related to How Do You Calculate Partial Derivatives at a Singular Point?

1. What is a partial derivative?

A partial derivative is a mathematical concept used to measure the rate of change of a function with respect to one of its input variables, while holding all other variables constant. It is written as ∏f/∏x, where f is the function and x is the variable.

2. How is a partial derivative different from a regular derivative?

A partial derivative measures the change in a function with respect to one variable, while holding all other variables constant. A regular derivative, on the other hand, measures the change in a function with respect to its independent variable.

3. When is a partial derivative used?

Partial derivatives are commonly used in multivariable calculus, physics, and engineering to analyze and optimize functions with multiple variables. They are also used in economics, finance, and other fields to study relationships between variables.

4. What are some real-life applications of partial derivatives?

Partial derivatives have a wide range of applications in various fields. For example, they can be used to calculate the rate of change in temperature over time in a chemical reaction, to optimize production processes in manufacturing, and to analyze the relationship between demand and pricing in economics.

5. Are there any limitations to using partial derivatives?

One limitation of using partial derivatives is that they only measure the sensitivity of a function to changes in one variable at a time, while holding others constant. This may not accurately reflect the true behavior of the function in complex systems. Additionally, there are some functions that are not differentiable, and therefore cannot have a partial derivative.

Similar threads

  • Calculus and Beyond Homework Help
Replies
4
Views
592
  • Calculus and Beyond Homework Help
Replies
6
Views
899
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
Replies
9
Views
759
  • Calculus and Beyond Homework Help
Replies
20
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
11
Views
2K
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
528
  • Topology and Analysis
Replies
8
Views
1K
Back
Top