# 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))