Bard Math 212 - Functions of Two Variables

557 days ago by ethan

The Graph of a Function of Two Variables

f(x, y) = sin(x^2 - y).

x, y = var('x,y') plot3d(sin(x^2 - y), (x, -5, 5), (y, -6, 6), color='brown') 
       

The Graphs of Two Functions of Two Variables

The graph of f(x, y) = x^2 + y^2 is in blue.

The graph of g(x, y) = 2x + 3y is in green.

x, y = var('x,y') P = plot3d(2*x + 3*y, (x,-2,2), (y,-2,2), color='green') Q = plot3d(x^2 + y^2, (x,-2,2), (y,-2,2)) P + Q 
       

The Graph of a Function of Two Variables, with Aspect Ratio 1

f(x, y) = x^2 - y^2.

x, y = var('x,y') plot3d(x^2 - y^2, (x, -2, 2), (y, -2, 2), aspect_ratio=1)