SHSU - Cylinders and surfaces

521 days ago by bloft

# Each cell is evaluated individually, by either clicking the 'evaluate' link # below the cell, or by pressing 'shift + enter' 
       
2+7 
       
integrate(x^3,x) 
       
show(integrate(x^3,x)) 
       
diff(1/(1+x^2),x) 
       
# Now let's look at some 3-dimensional graphs. # We first have to specify which variables we'll be using. 
       
x,y,z=var('x,y,z') 
       
# In the plane, we're all familiar with the graph of y=x^2 plot(x^2,(x,-5,5)) 
       
# When another dimension is introduced, the same equation produces a # PARABOLIC CYLINDER: plot3d(x^2, (x,-5,5), (y,-5,5)) 
       
# If we introduce the third variable into the equation, # we'll get the three-dimensional version of a parabola. # A PARABOLOID is the graph of f(x,y) = ax^2 + by^2 plot3d(x^2 + y^2, (x,-8,8), (y,-5,5),aspect_ratio=(10,10,1)) 
       
# We can even graph equations that can't be written as functions implicit_plot(x^2 + y^2 == 9, (x,-5,5), (y,-5,5)) 
       
# The CIRCULAR CYLINDER implicit_plot3d(x^2 + y^2 == 9, (x,-5,5), (y, -5,5), (z, -5,5)) 
       
# The SPHERE implicit_plot3d(x^2 + y^2 + z^2 == 9, (x,-5,5), (y, -5,5), (z, -5,5)) 
       
# An ELLIPSE in the plane implicit_plot(x^2/7 + y^2/2 == 1, (x,-3,3), (y,-3,3), aspect_ratio=1) 
       
# An ELLIPTICAL CYLINDER implicit_plot3d(x^2/7 + y^2/2 == 1, (x,-3,3), (y,-3,3), (z,-3,3), aspect_ratio=1) 
       
# An ELLIPSOID implicit_plot3d(x^2/7 + y^2/2 + z^2 == 1, (x,-3,3), (y,-3,3), (z,-3,3), aspect_ratio=1) 
       
# A HYPERBOLA in the plane implicit_plot(x^2 - y^2 == 1, (x,-3,3), (y,-3,3), aspect_ratio=1) 
       
# A HYPERBOLIC CYLINDER implicit_plot3d(x^2 - y^2 == 1, (x,-3,3), (y,-3,3), (z, -3,3), aspect_ratio=1) 
       
# A HYPERBOLOID (of ONE sheet) implicit_plot3d(x^2 + z^2 - y^2 == 1, (x,-3,3), (y,-3,3), (z,-3,3), aspect_ratio=1) 
       
# A HYPERBOLOID (of TWO sheets) implicit_plot3d(x^2 - y^2 - z^2 == 1, (x,-3,3), (y,-3,3), (z, -3,3), aspect_ratio=1) 
       
A=implicit_plot3d(x^2 - y^2 - z^2 == 1, (x,-3,3), (y,-3,3), (z, -3,3), aspect_ratio=1, color="red") B=implicit_plot3d(-x^2 + y^2 + z^2 == 1, (x,-3,3), (y,-3,3), (z, -3,3), aspect_ratio=1, color="green") A+B 
       
# Remember the paraboloid plot3d(x^2 + y^2, (x,-8,8), (y,-5,5)) 
       
# Changing one of the signs produces the HYPERBOLIC PARABOLOID plot3d(x^2 - y^2, (x,-8,8), (y,-5,5)) 
       
#AN ELLIPTICAL CONE implicit_plot3d(2*y^2 + 3*x^2 - z^2 == 0,(x,-5,5),(y,-5,5),(z,-5,5))