Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Sage Project

Views: 195
# Polar and implicit plotting on sage #1. Plot the function y = sin(x) on the interval (0, 2*pi) plot(cos(x), -2*pi, 2*pi)
#2. Make a polar plot of the fucntion sin(theta) on the interval 0 < theta < 2*pi # Use the polar_plot command and add 'theta' as the variable make a polar plot # A polar plot graphs r = f(theta)=-theta var("theta") polar_plot(theta, 0, 4*pi)
theta
#3. Make the polar plot of sin(x) and sin(2*x) on the interval (x, 0, 2*pi). # Add 'fill=true' to the end of the inside of one of the polar_plots parenthesis to make it have a filling and to be able to easily distinguish which is which. polar_plot(cos(theta), 0, 2*pi, fill=true)+polar_plot(sin(2*theta), 0, 2*pi)
#4. Make the implicit plot of 2=x^6+y^4 on the interval (x, -2, 2) and (y, -2, 2) #The implicit function must be changed and have a variable equal to it instead of 2 to fit Sage's formatting g(x,y)=x^6+y^4 implicit_plot(g(x, y)==2, (x, -2, 2), (y, -2, 2))
#5. Plot the implicit function from question 4 and the two plots from question 3 on the same plot implicit_plot(g, (x, -2, 2), (y, -2, 2)) + polar_plot(sin(theta), 0, 2*pi, fill=true)+polar_plot(sin(2*x), 0, 2*pi)