Ask Your Question

Revision history [back]

how to plot a rotation of the function in 3D?

I have a code for rotation of the function but in 2D and I would like this figure (field between functions) to be plot in 3D but I don't know how to modify that code(I'm a beginner in Sage..)

f1(x)=2*x - x**2
f2(x)=(f1(x))**2
V=abs(integral(f2(x),x,0,2))
Volume=pi*V
Volume
plot(2*x - x**2,(x,0,2)) + plot((-2)*x + x**2,(x,0,2))
plot([2*x - x**2, (-2)*x + x**2],(x,0,2), fill={0:[1]})