SharedLab 9 / Lab9-turnin.sagewsOpen in CoCalc
# Lab 1

# Name:
# I worked on this code with:

# Please do all of your work for this week's lab in this worksheet. If
# you wish to create other worksheets for scratch work, you can, but
# this is the one that will be graded. You do not need to do anything
# to turn in your lab. It will be collected by your TA at the beginning
# of (or right before) next week’s lab.

# Be sure to put each exercise in a new cell with an exercise number at the top.
# Use enough comments that you and the grader can understand your code.
# Label axes on all graphs.

# 1
plot3d(f(x,y), (x,-4,4), (y,-4,4))
3D rendering not yet implemented
dfdx = diff(f(x),x)
m = dfdx.subs(x=0)
g(x) = m*x
plot(f(x), (x,-4,4), thickness=2, axes_labels=("X","Y"))+plot(g(x), (x,-4,4), color="red", thickness=2)
dfdy = diff(f(y),y)
m = dfdy.subs(y=0)
g(y) = m*y
plot(f(y), (y,-4,4), thickness=2, axes_labels=("Y","X"))+plot(g(y), (y,-4,4), color="red", thickness=2)
plot3d(f(x,y), (x,-4,4), (y,-4,4))+plot3d(g(x,y), (x,-4,4), (y,-4,4), color="red")
3D rendering not yet implemented
plot3d(z, (x,-4,4), (y,-4,4))+point3d([2,3,-7],color="red",size=10)
3D rendering not yet implemented