restart; # Remember click on the symbol [> to get a Maple prompt. # Then press to turn the color of your typing red # so people can the exact letters you typed. If anyone # has figured out how to set this as the default please # let me and the rest of the class know how. ################# PART 1 plotting functions ################ # # We have already plotted functions in class. Here are some # more examples. # #Load the plot subroutine library with(plots); #Make a plot of a function f:=sin(2*x); plot(f,x=-Pi..Pi); #Make plot a graph of a different function g:=sin(3*x); plot(g,x=-Pi..Pi); #Put the plots one on top of each other plot([f,g],x=-Pi..Pi); #Draw a circle using sin and cos plot([cos(theta),sin(theta),theta=-Pi..Pi]); #Parametric plot of a hyperbola plot([cosh(t),sinh(t),t=-1..1]); ################# PART 2 surfaces ######################### # # Given a function one can make a surface by rotating the # graph around the x-axis. For some reason Maple draws # the x-axis vertically by default. The result looks like # what would happen if a clay pot were made on a potter's # wheel with the sides determined by the function. # #A function and what the function looks like f:=(2+z)/(z^2+1); plot(f,z=-2..2); #The cylindrical surface specified by the function plot3d(f,theta=0..2*Pi,z=-2..2,coords=cylindrical); #Another example f:=3+sin(z); plot(f,z=0..3*Pi); plot3d(f,theta=0..2*Pi,z=0..3*Pi,coords=cylindrical); #Try to make something complicated f:=4+arctan(z+sin(5*z)); plot(f,z=-Pi..Pi); plot3d(f,theta=0..2*Pi,z=-Pi..Pi,coords=cylindrical); #Need more accurate plot use numpoints=2000 plot3d(f,theta=0..2*Pi,z=-Pi..Pi,coords=cylindrical,numpoints=2000); ################## PART 3 limits ############################ # # Maple can work a number of limits. Here are some examples # from last semester and also some new examples. # limit(x/3,x=2); limit((x^2-1)/(x-1),x=1); limit((sin(x+h)-sin(x))/h,h=0); limit(2^(1/n),n=infinity); limit(n*(1-2^(1/n)),n=infinity); limit(n*(p^(1/n)-1),n=infinity); limit((1+2/n)^n,n=infinity); limit((1+2/n^2)^n,n=infinity); limit(sin(3*h)/h,h=0); limit((cos(x)-cos(3*x))/x^2,x=0); limit(sqrt(n^2+n)-n,n=infinity); limit(sqrt(n+15)-sqrt(n),n=infinity); limit(arctan(n),n=infinity); limit(n*(Pi/2-arctan(n)),n=infinity); limit(1/x,x=0); limit(1/x,x=0,left); limit(1/x,x=0,right); limit((n^2+n+1)/(3*n^2+17),n=infinity);