MixedPartials.mw

Math 13 Fall 2004

Calculus of Vector-valued Functions


Example of a function that has

different mixed partial derivatives at (0,0)

October 4, 2004


   Define a scalar-valued function of two variables

> f := (x, y) -> x * y * (x^2 - y^2) / (x^2 + y^2);

f := proc (x, y) options operator, arrow; x*y*(x^2-y^2)/(x^2+y^2) end proc

    Have a look at its graph

> plot3d(f(x, y), x = -1..1, y = -1..1);

[Plot]

      Both partial derivatives of f are continuous everywhere,

      so f is differentiable at (0, 0)

> f_x := factor(diff(f(x, y), x));
f_y := factor(diff(f(x, y), y));

f_x := y*(x^4-y^4+4*x^2*y^2)/(x^2+y^2)^2

f_y := x*(x^4-y^4-4*x^2*y^2)/(x^2+y^2)^2

> plot3d(f_x, x = -2..2, y = -2..2);
plot3d(f_y, x = -2..2, y = -2..2);

[Plot]

[Plot]

     Let's explicitly compute the mixed partial derivatives of f at (0, 0)

> f_xy_00 := limit(subs(x = h, y = 0, f_x) / h, h = 0);
f_yx_00 := limit(subs(x = 0, y = h, f_x) / h, h = 0);

f_xy_00 := 0

f_yx_00 := -1

    They are different!!!

    Let's plot both mixed partial derivatives of f

> plot3d(diff(f(x, y), y, x), x = -1..1, y = -1..1);
plot3d(diff(f(x, y), x, y), x = -1..1, y = -1..1);

[Plot]

[Plot]

   They are obviously discontinuous!!!

     Remark: mixed partial derivatives are the same away from (0, 0)

> factor(diff(f(x, y), y, x));
factor(diff(f(x, y), x, y));

(-y+x)*(x+y)*(y^4+10*x^2*y^2+x^4)/(x^2+y^2)^3

(-y+x)*(x+y)*(y^4+10*x^2*y^2+x^4)/(x^2+y^2)^3

>