Open with one click!
In [ ]:
# Name:Makayla Roberts # I worked on this code with: Sonia # 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 clearly label which question you are answering as you go and to # use enough comments that you and the grader can understand your code.
In [3]:
#1 var ("x,y") plot3d(3*x + 5*y, (x, -5,5), (y, -5,5), aspect_ratio= [1,1,.1])
In [2]:
#2 #when y=0, f(x,y)= x^2+ y^2 just becomes f(x,y)= x^2. The tangent line is y=0 plot (x^2, axes_labels= ["X", "Z"]) + plot (0, color="red", thickness=3)
In [3]:
#3 var ("x,y") plot (y^2, axes_labels=["Y", "Z"]) + plot (0, color="red", thickness=3)
In [4]:
#4 var ("x,y") z=0*x+0*y plot3d(x^2+ y^2, (x, -5,5), (y, -5,5), aspect_ratio= [1,1,.1]) + plot3d (0, (x, -5,5), (y, -5,5), color="red")
In [5]:
#5 var ("x,y") z= 2*(x-2)-1*(y-3)-7 plot3d (2*(x-2)-1*(y-3)-7, (x, -20,20), (y, -20,20), color="red", opacity= .5) + point3d ([2,3,-7], aspect_ratio= [1,1,.1], size= 10, color= "black")
In [6]:
#6 var ("x,y") z= 2*(x-1) -2*(y+1) +2 plot3d(x^2+ y^2, (x, -5,5), (y, -5,5), aspect_ratio= [1,1,.1], opacity=.5)+ plot3d (2*(x-1) -2*(y+1) +2, (x, -5,5), (y, -5,5), color="red", opacity= .5) + point3d ([1,-1,2], color="black", size=10)