Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168731
Image: ubuntu2004
# Exercise 1 (16.1 #28) # --------------------- var('x,y') f = sin(x+y) cplot = contour_plot(f,(x,-pi,pi),(y,-pi,pi),fill=False,cmap=['red']) gplot = plot_vector_field(f.gradient(),(x,-pi,pi),(y,-pi,pi)) (cplot+gplot).show(aspect_ratio=1)
# Exercise 2 (16.1 #24) # --------------------- # You should be able to see from this graph that # the integral of F along r is positive. var('t,z') r = (1-t)*vector((1,0,0))+t*vector((3,4,2)) F = (y+z,x+z,x+y) rplot = parametric_plot3d(r,(t,0,1),color='black') Fplot = plot_vector_field3d(F,(x,-3,3),(y,-4,4),(z,-2,2),center_arrows=True) rplot + Fplot + point3d((1,0,0)) + point3d((3,4,2))
# Exercise 3 (16.6 #30) # --------------------- # I used y and theta as the two parameters. var('theta') parametric_plot3d(((4*y^2-y^4)*cos(theta), y, (4*y^2-y^4)*sin(theta)),\ (y,-2,2),(theta,0,2*pi),rgbcolor=(0.5,1,0.5))