Partial Derivatives

The purpose of this notebook is to let you plot a function along with a plane orthogonal to the x or y axis.  The intersection of the surfaces is the curve along which we would take the partial derivative.

f[x_, y_] = (x^2) + (y^2);
WINDOW = {{-2, 2}, {-2, 2}, {-2, 8}};
A[x_] := 
        ParametricPlot3D[{x, u, v}, {u, WINDOW[[2, 1]], 
            WINDOW[[2, 2]]}, {v, WINDOW[[3, 1]], WINDOW[[3, 2]]}, 
          DisplayFunction -> Identity];
B[y_] := 
        ParametricPlot3D[{u, y, v}, {u, WINDOW[[2, 1]], 
            WINDOW[[2, 2]]}, {v, WINDOW[[3, 1]], WINDOW[[3, 2]]}, 
          DisplayFunction -> Identity];
FCT := 
        Plot3D[f[x, y], {x, WINDOW[[1, 1]], WINDOW[[1, 2]]}, {y, 
            WINDOW[[2, 1]], WINDOW[[2, 2]]}, 
          DisplayFunction -> Identity];
PLOT[LIST_] := 
        Show[Evaluate[LIST], DisplayFunction -> $DisplayFunction, 
          BoxRatios -> {1, 1, 1}, 
          AxesLabel -> {"x", "y", "z"}];

u =. ;
v =. ;
If[NumberQ[u] && NumberQ[v], LIST = {A[u], B[v], FCT}, 
        If[NumberQ[u], LIST = {A[u], FCT}, 
          If[NumberQ[v], LIST = {B[v], FCT}, 
            LIST = {FCT}]]];
PLOT[LIST];