MAT 661 Homework 1 help, updated for Fall 2020
by Jim Swift

g[x_] := x^2 Sin[1/x]

Plot[{g[x],g'[x]}, {x, -1,1}]

Here’s the function from problem 1.6 in the book, with the exception that f(0,0) = 0 whereas this next expression is undefined.

f[x_, y_]:= (x^3y -x y^3)/(x^2 + y^2)

Plot3D[f[x, y], {x, -1,1}, {y, -1,1}]

ContourPlot[f[x,y], {x, -1,1},{y, -1,1}]

Some insight into this function comes from polar coordinates.  The numerator is a homogeneous polynomial of degree 4 and the denominator is a homogeneous polynomial of degree 2.  This give

Simplify[f[r Cos[θ], r Sin[θ]] ]

As mentioned in class (2020-08-19), you don’t really have to do any derivative using the quotient rule.  You can compute fx(0,y) by the limit definition, and also fy(x, 0) by the limit definition as well.
Then you can compute fxy(0,y) and fyx(x,0).  You will show that  fxy(0,0) and fyx(0,0) are defined, but they are different numbers.

This rest of these calculations are NOT needed to do homework.  But they sort of explain what’s going on, and show the power of Mathematica to differentiate symbolically.
Because f is analytic everywhere but (0, 0),  fxy = fyx at all (x,y) except (0, 0).

fx[x_, y_] = Simplify@D[f[x,y], x]

fy[x_, y_] = Simplify@D[f[x,y], y]

Plot3D[fx[x,y],{x,-1,1},{y,-1,1}]

Plot3D[fy[x,y],{x,-1,1},{y,-1,1}]

Now I compute fxy as they y derivative of fx.  Again, this is only good for (x, y) not equal to (0, 0).

fxy[x_, y_] = Simplify@D[fx[x,y], y]

Plot3D[fxy[x,y], {x, -1,1}, {y, -1,1}]
ContourPlot[fxy[x,y], {x, -1,1}, {y, -1,1}]

Note that the mixed partial derivative is a rational function that is homogeneous of degree 6 on top and homogeneous of degree 6 on the bottom.  fxy(r cos(θ), r sin(θ))  is undefined at r = 0, and depends on θ only for any r > 0.

fxyof[θ_] = Simplify[ fxy[r Cos[θ], r Sin[θ]] ]

Plot[fxyof[θ], {θ, 0, 2Pi}]

You can get the same function of θ  by replacing x by Cos[θ] and y by Sin[θ] in the numerator for fxy[x,y].  There are some trig identities at work here.

fxy[x,y]  (* just here to remind you of the function *)

Plot[Cos[θ]^6 + 9 Cos[θ]^4 Sin[θ]^2 - 9 Cos[θ]^2Sin[θ]^4- Sin[θ]^6, {θ, 0, 2 Pi}]

The following functions might be useful for visualizing the homework problems.

Plot3D[x^2-y^2, {x, -1,1}, {y, -1,1}]

use double == for equations

ContourPlot3D[x^2 + y^2-z^2 + z^4 == 0, {x, -1,1}, {y,  -1,1}, {z,   -1,1}]