{VERSION 2 3 "IBM INTEL NT" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 18 "MAPLE ASSIGNMENT 2" }} {PARA 0 "" 0 "" {TEXT -1 9 "FUNCTIONS" }}{PARA 0 "" 0 "" {TEXT -1 65 " Maple has lots of built-in functions for you to use. Examples of" }} {PARA 0 "" 0 "" {TEXT -1 38 "getting values of these functions are:" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "exp(1);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 6 "ln(1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "log[10](10);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "sin(Pi/2); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "cos(Pi/4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "sqrt(Pi);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 68 "Calculate some other values of these functions by click ing the mouse" }}{PARA 0 "" 0 "" {TEXT -1 69 "on the number in the exp ressions above, deleting the number, entering" }}{PARA 0 "" 0 "" {TEXT -1 34 "your own number and pressing ENTER" }}{PARA 0 "" 0 "" {TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 61 "The rules of logaritms c an be reviewed.. The assumptions are" }}{PARA 0 "" 0 "" {TEXT -1 67 " necessary to make Maple stick to real numbers. The ~ is telling you" } }{PARA 0 "" 0 "" {TEXT -1 54 "that some assumption has been made about the variable." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "assume(x>0);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "assume(y,real);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "ln(x+y);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 12 "simplify(\");" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "ln(x*y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(\");" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "ln(x^y);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "simplify(\");" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "ln(exp(y));" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 13 "exp(ln(x));# " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 35 "You can also plot these f unctions. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "plot(ln(x),x=.5..2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "plot(exp(y),y=-1..3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "plot(cos(y),y=0..4*Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 70 "You can also define your \+ own functions in Maple. The next exercise in" }}{PARA 0 "" 0 "" {TEXT -1 61 "this assignment is to define and plot an average cost cu rve." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "assume(x>=0);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "f:=x->x^2-20*x+120;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "f(0);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "f(5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "Calculat ing f(10), f(15) and f(20) as well should give you an idea of" }} {PARA 0 "" 0 "" {TEXT -1 36 "what the plot is going to look like." }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "plot(f(x),x=0..20);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "As economists, we probably don't like the way Maple does this plot. " }}{PARA 0 "" 0 "" {TEXT -1 65 "The scale \+ for the vertical axis can be changed to 0 to 150 (above" }}{PARA 0 "" 0 "" {TEXT -1 70 "f(0)). Note that if you click on a plot the plot wi ll be put in a box" }}{PARA 0 "" 0 "" {TEXT -1 67 "and the menus at th e top of the screen will change to give you some" }}{PARA 0 "" 0 "" {TEXT -1 66 "options in the way the plot is drawn. Check out the style and axes" }}{PARA 0 "" 0 "" {TEXT -1 53 "menus. If you click on a poi nt in the plot window the" }}{PARA 0 "" 0 "" {TEXT -1 66 "coordinates \+ of the point will be shown in the toolbar at the left." }}{PARA 0 "" 0 "" {TEXT -1 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "plot(f(x),x=0 ..20,y=0..150);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 66 "More accuracy can be obtained in getting the values \+ of the minimum" }}{PARA 0 "" 0 "" {TEXT -1 70 "average cost point (by \+ clicking on it) by reducing the range for x and" }}{PARA 0 "" 0 "" {TEXT -1 13 "y in the last" }}{PARA 0 "" 0 "" {TEXT -1 8 "command." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 12 "LEVEL CUR VES" }}{PARA 0 "" 0 "" {TEXT -1 64 "The commands here illustrate the p lotting of level curves , e.g." }}{PARA 0 "" 0 "" {TEXT -1 68 "contour lines. Again if you click the plot you get some menus at the" }} {PARA 0 "" 0 "" {TEXT -1 59 "top which can be used to change the appea rance of the plot," }}{PARA 0 "" 0 "" {TEXT -1 1 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "contourplot(x^.25+x*y+y^.25,x=0..5,y=0..5);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "implicitplot(\{x^.25+x*y+y^. 25=2,x^.25+x*y+y^.25=4,x^.25+x*y+y^.25=6\},x" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "=0..5,y=0..5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 "Using implicitplot gives more control over the levels plotted. Yo u" }}{PARA 0 "" 0 "" {TEXT -1 67 "can change the levels to be plotted \+ by editing and reexecuting the" }}{PARA 0 "" 0 "" {TEXT -1 56 "above \+ command. You can also add more levels if you wish." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 21 "CURVATURE OF SURFACES" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "U:=(x,y)->x^(1/4)*y^(1/2);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "plot3d(U(x,y),x=0..5,y=0..10 -2*x,orientation=[-15,45]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "Th is surface is concave. Click the plot and look at the effects of" }} {PARA 0 "" 0 "" {TEXT -1 68 "changing the axes or the style of the plo t. When you make a change," }}{PARA 0 "" 0 "" {TEXT -1 70 "the plot d isappears into a white box. Click the REDRAW button marked R" }}{PARA 0 "" 0 "" {TEXT -1 66 "at the end of the third toolbar to see the reca lculated plot. The" }}{PARA 0 "" 0 "" {TEXT -1 67 "orientation of the axes can be changed on the second toolbar at the" }}{PARA 0 "" 0 "" {TEXT -1 63 "left or by pointing at the white box and dragging the poi nter. " }}{PARA 0 "" 0 "" {TEXT -1 68 "Now go back and change (1/4,1/2 ) to (1,3/4) or to anything where the" }}{PARA 0 "" 0 "" {TEXT -1 68 " sum of the 2 powers is > 1. The resulting surface is neither concave" }}{PARA 0 "" 0 "" {TEXT -1 67 "or convex. It is however quasiconcave. \+ You can check this by using" }}{PARA 0 "" 0 "" {TEXT -1 51 "the conto urplot or implicitplot.commands on U(x,y)." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 66 "If you wish to print any of you r plots, execute the command below," }}{PARA 0 "" 0 "" {TEXT -1 63 "th en go back and reexecute your plot. The plot will appear in a" }} {PARA 0 "" 0 "" {TEXT -1 70 "window and can be printed by choosing PRI NT in the FILE menu. Choosing" }}{PARA 0 "" 0 "" {TEXT -1 60 "CLOSE on the FILE menu will get you back to your worksheet. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "plotsetup(window);" }}}}{MARK "0 0 0" 0 } {VIEWOPTS 1 1 0 1 1 1803 }