Examples of 2d Functions and Their Contours - Math 2500

A Hill

a[x_,y_] := x^2 + y^2 + 3;

Plot3D[a[x,y],{x,-10,10},{y,-10,10},MeshFunctions -> {#3 &},ColorFunction -> ColorData["LakeColors"]]

ContourPlot[a[x,y],{x,-10,10},{y,-10,10}]

A Saddle Surface

b[x_,y_] := x^2 - y^2 + x y - 3 x - 4 y;

Plot3D[b[x,y],{x,-10,10},{y,-10,10},MeshFunctions -> {#3 &},ColorFunction -> ColorData["LakeColors"]]

ContourPlot[b[x,y],{x,-10,10},{y,-10,10}]

A More Interesting Function

This function gives a fairly accurate (!) model of the average temperature x feet beneath the ground on t days after the hottest day of summer.

f[t_,x_] := Cos[(1.7 * 10^(-2)) t - 0.2 x] Exp[ -0.2 x ];

Plot3D[f[t,x],{t,0,365},{x,0,25},PlotRange->{{0,365},{0,25},{-1,1}}]

Plot3D[f[t,x],{t,0,365},{x,0,25},MeshFunctions -> {#3 &},ColorFunction -> ColorData["LakeColors"],PlotRange->{{0,365},{0,25},{-1,1}}]

ContourPlot[f[t,x],{t,0,365},{x,0,25},PlotRange->{{0,365},{0,25},{-1,1}}]