A Quick Introduction to Maple 12 Maple is a computer algebra system that can do many computations for you. It also has good graphics capabilities. It will be used throughout this class. First go through this worksheet and do the exercises at the end. You may also want to go through the first two parts of tour of maple in the help menu. Make certain the your name at the top of the worksheet. Note: It is recommended that you always use the worksheet interface. One uses the File>New>Worksheet Mode menu to get a new worksheet. You should also change the input format to Maple notation. Go into the Tools > Options > Display menu. Here you change the "input display" to "Maple Notation."
<Text-field style="Heading 1" layout="Heading 1">Doing some simple computations.</Text-field> Here is how one does addition. Enter "3+4;" and hit the enter key. Note that the semicolon is required in multiline computations. Using a colon will suppress output. LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbW5HRiQ2KVEiM0YnLyUnZmFtaWx5R1ErTW9ub3NwYWNlZEYnLyUlYm9sZEdRJXRydWVGJy8lK2ZvcmVncm91bmRHUSpbMjU1LDAsMF1GJy8lMGZvbnRfc3R5bGVfbmFtZUdRLE1hcGxlfklucHV0RicvJSxtYXRodmFyaWFudEdRJWJvbGRGJy8lK2ZvbnR3ZWlnaHRHRj0tSSNtb0dGJDYvUScmcGx1cztGJ0Y1RjgvRjxRJ25vcm1hbEYnLyUmZmVuY2VHUSZmYWxzZUYnLyUqc2VwYXJhdG9yR0ZILyUpc3RyZXRjaHlHRkgvJSpzeW1tZXRyaWNHRkgvJShsYXJnZW9wR0ZILyUubW92YWJsZWxpbWl0c0dGSC8lJ2FjY2VudEdGSC8lJ2xzcGFjZUdRLDAuMjIyMjIyMmVtRicvJSdyc3BhY2VHRlctRiw2KVEiNEYnRi9GMkY1RjhGO0Y+LUZBNi9RIjtGJ0Y1RjhGREZGL0ZKRjRGS0ZNRk9GUUZTL0ZWUSYwLjBlbUYnL0ZZUSwwLjI3Nzc3NzhlbUYn To store a quantity in a named location use ":=". Here 10! is stored in a. LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYpLUkjbWlHRiQ2KlEiYUYnLyUnZmFtaWx5R1ErTW9ub3NwYWNlZEYnLyUlYm9sZEdRJXRydWVGJy8lJ2l0YWxpY0dGNC8lK2ZvcmVncm91bmRHUSpbMjU1LDAsMF1GJy8lMGZvbnRfc3R5bGVfbmFtZUdRLE1hcGxlfklucHV0RicvJSxtYXRodmFyaWFudEdRLGJvbGQtaXRhbGljRicvJStmb250d2VpZ2h0R1ElYm9sZEYnLUkjbW9HRiQ2L1ExJkludmlzaWJsZVRpbWVzO0YnRjdGOi9GPlEnbm9ybWFsRicvJSZmZW5jZUdRJmZhbHNlRicvJSpzZXBhcmF0b3JHRksvJSlzdHJldGNoeUdGSy8lKnN5bW1ldHJpY0dGSy8lKGxhcmdlb3BHRksvJS5tb3ZhYmxlbGltaXRzR0ZLLyUnYWNjZW50R0ZLLyUnbHNwYWNlR1EsMC4yNzc3Nzc4ZW1GJy8lJ3JzcGFjZUdGWi1GRDYvUSM6PUYnRjdGOkZHRklGTEZORlBGUkZURlZGWEZlbkZDLUkjbW5HRiQ2KVEjMTBGJ0YvRjJGN0Y6L0Y+RkJGQC1GRDYvUSIhRidGN0Y6RkdGSUZMRk5GUEZSRlRGVi9GWVEsMC4xMTExMTExZW1GJy9GZm5GY28tRkQ2L1EiO0YnRjdGOkZHRkkvRk1GNEZORlBGUkZURlYvRllRJjAuMGVtRidGZW4= There is no implicit multiplication between in Maple 10 when usnig the worksheet mode with Maple syntax. Some implicit multiplication is allowed in the document mode. a := 3; b := 4; 5*a; a*b; Most of the standard functions are accessed in the same manner as on a calculator. Here are sin and cos of 1.1. (In this case a <shift><enter> was used to put the expressions on different lines in the same execution group.) sin(1.1); cos(1.1); A couple problem spots for people new to Maple are the exponential function and pi. You cannot use "e^x" for the exponential function or "pi" for the value of pi. The exponential function is exp(x) and the constant pi is in Pi. sin(pi); sin(Pi); e^2.; exp(2.); One can use the evalf command to evaluation an expression numerically. Here are a couple examples. Maple usually uses 10 decimal digits for numerical computations. a := cos(2); evalf(a); evalf(a,5); b := exp(2); evalf(b);
<Text-field style="Heading 1" layout="Heading 1">Basic graphics</Text-field> Graphing in Maple is fairly simple. One can use a graphing command such as plot or plot3d. Here is the plot of LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYpLUkjbWlHRiQ2JVEiZkYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1JKG1mZW5jZWRHRiQ2JC1GIzYkLUYsNiVRInhGJ0YvRjIvRjNRJ25vcm1hbEYnRj0tSSNtb0dGJDYtUSI9RidGPS8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGRS8lKXN0cmV0Y2h5R0ZFLyUqc3ltbWV0cmljR0ZFLyUobGFyZ2VvcEdGRS8lLm1vdmFibGVsaW1pdHNHRkUvJSdhY2NlbnRHRkUvJSdsc3BhY2VHUSwwLjI3Nzc3NzhlbUYnLyUncnNwYWNlR0ZULUZANi1RIn5GJ0Y9RkNGRkZIRkpGTEZORlAvRlNRJjAuMGVtRicvRlZGZW4tRiw2JVEkY29zRicvRjBGRUY9LUY2NiQtRiM2Jy1JI21uR0YkNiRRIjNGJ0Y9RjotRkA2LVEqJnVtaW51czA7RidGPUZDRkZGSEZKRkxGTkZQL0ZTUSwwLjIyMjIyMjJlbUYnL0ZWRmdvLUZgbzYkUSIyRidGPUY9Rj1GPQ==. Note that there is no implicit multiplication and you must specify the range. plot(cos(3*x-2),x=-10..10); Here is a plot of LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYqLUkjbWlHRiQ2JVEiZkYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy1JKG1mZW5jZWRHRiQ2JC1GIzYmLUYsNiVRInhGJ0YvRjItSSNtb0dGJDYtUSIsRicvRjNRJ25vcm1hbEYnLyUmZmVuY2VHUSZmYWxzZUYnLyUqc2VwYXJhdG9yR0YxLyUpc3RyZXRjaHlHRkUvJSpzeW1tZXRyaWNHRkUvJShsYXJnZW9wR0ZFLyUubW92YWJsZWxpbWl0c0dGRS8lJ2FjY2VudEdGRS8lJ2xzcGFjZUdRJjAuMGVtRicvJSdyc3BhY2VHUSwwLjMzMzMzMzNlbUYnLUYsNiVRInlGJ0YvRjJGQUZBLUY+Ni1RIn5GJ0ZBRkMvRkdGRUZIRkpGTEZORlBGUi9GVkZULUY+Ni1RIj1GJ0ZBRkNGaG5GSEZKRkxGTkZQL0ZTUSwwLjI3Nzc3NzhlbUYnL0ZWRl5vRmVuLUYsNiVRJHNpbkYnL0YwRkVGQS1GNjYkLUYjNiYtSSVtc3VwR0YkNiVGOi1GIzYkLUkjbW5HRiQ2JFEiMkYnRkFGQS8lMXN1cGVyc2NyaXB0c2hpZnRHUSIwRictRj42LVEiK0YnRkFGQ0ZobkZIRkpGTEZORlAvRlNRLDAuMjIyMjIyMmVtRicvRlZGaHAtRmlvNiVGWEZbcEZhcEZBRkFGQQ==. Note the use of the options axes and scaling. You can use the mouse to rotate the graph. plot3d(sin(x^2+y^2),x=-3..3,y=-3..3,axes=boxed, scaling=constrained); One can also use context menus to plot the results of your work. For example, here is the derivative of a function. Right click on the answer in blue and choose Plots - 2D Plot. Try changing the x-axis and the y-axis by right clicking the plot and choosing Axes - Range. diff(x^5*exp(-x^2/2)+cos(x^2/10-x/3),x);
<Text-field style="Heading 1" layout="Heading 1">Basic calculus</Text-field> It is easy to find the derivative of a function. All derivatives of expressions in Maple are partial derivatives (See Chapter 3). This means that you must specify the variable that is changing. Here is an example of the derivative of a function of LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYkLUkjbWlHRiQ2JVEieEYnLyUnaXRhbGljR1EldHJ1ZUYnLyUsbWF0aHZhcmlhbnRHUSdpdGFsaWNGJy9GM1Enbm9ybWFsRic=. diff(cos(a*x+r^2),x); If was the variable the derivative would be diff(cos(a*x+r^2),r); One can exaluate the derivative, or any expression, using the eval or the subs commands. eval(-2*sin(a*x+b^2)*b,x=2); subs(x=2,-2*sin(a*x+b^2)*b); Inetgrals are as easy using the int command. Note that Maple does not include a constant of integration. int(x^2-6*x+1/x^5,x); If the integration fails, the original expression is returned. int(cos(cos(x)),x); To do a definite integral one simply adds a range for the variable. int(cos(x/4),x=-2..2); If there is not a closed form integral, one can use evalf to get a numerical approximation. evalf(int(cos(cos(x)),x=-2..2));
<Text-field style="Heading 1" layout="Heading 1">Exercises</Text-field>
<Text-field style="Heading 2" layout="Heading 2">1</Text-field> Find the square root of 2 to 20 decimal places.
<Text-field style="Heading 2" layout="Heading 2">2</Text-field> Plot the function LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYmLUkjbWlHRiQ2I1EhRictRiM2Ji1GLDYlUSR0YW5GJy8lJ2l0YWxpY0dRJXRydWVGJy8lLG1hdGh2YXJpYW50R1EnaXRhbGljRictSSNtb0dGJDYtUTAmQXBwbHlGdW5jdGlvbjtGJy9GOFEnbm9ybWFsRicvJSZmZW5jZUdRJmZhbHNlRicvJSpzZXBhcmF0b3JHRkIvJSlzdHJldGNoeUdGQi8lKnN5bW1ldHJpY0dGQi8lKGxhcmdlb3BHRkIvJS5tb3ZhYmxlbGltaXRzR0ZCLyUnYWNjZW50R0ZCLyUnbHNwYWNlR1EmMC4wZW1GJy8lJ3JzcGFjZUdGUS1JKG1mZW5jZWRHRiQ2JC1GIzYmLUkjbW5HRiQ2JFEiMkYnRj4tRjs2L1ExJkludmlzaWJsZVRpbWVzO0YnLyUrZm9yZWdyb3VuZEdRKlsyNTUsMCwwXUYnLyUwZm9udF9zdHlsZV9uYW1lR1EsTWFwbGV+SW5wdXRGJ0Y+RkBGQ0ZFRkdGSUZLRk0vRlBRLDAuMjc3Nzc3OGVtRicvRlNGYW8tRiw2JVEieEYnRjRGN0Y+Rj5GPkYrRj4= from -10 to 10.
<Text-field style="Heading 2" layout="Heading 2">3</Text-field> Find the derivative of LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYlLUkjbWlHRiQ2JVEkc2VjRicvJSdpdGFsaWNHUSZmYWxzZUYnLyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJy1JKG1mZW5jZWRHRiQ2JC1GIzYpLUklbXN1cEdGJDYlLUYsNiVRInhGJy9GMFEldHJ1ZUYnL0YzUSdpdGFsaWNGJy1GIzYkLUkjbW5HRiQ2JFEiMkYnRjJGMi8lMXN1cGVyc2NyaXB0c2hpZnRHUSIwRictSSNtb0dGJDYtUSIrRidGMi8lJmZlbmNlR0YxLyUqc2VwYXJhdG9yR0YxLyUpc3RyZXRjaHlHRjEvJSpzeW1tZXRyaWNHRjEvJShsYXJnZW9wR0YxLyUubW92YWJsZWxpbWl0c0dGMS8lJ2FjY2VudEdGMS8lJ2xzcGFjZUdRLDAuMjIyMjIyMmVtRicvJSdyc3BhY2VHRltvLUZHNiRRIjZGJ0YyLUZONi1RJyZzZG90O0YnRjJGUUZTRlVGV0ZZRmVuRmduL0ZqblEmMC4wZW1GJy9GXW9GZW8tRiw2JVEkY29zRidGL0YyLUY2NiQtRiM2Jy1GRzYkUSI1RidGMkY9LUZONi1RKiZ1bWludXMwO0YnRjJGUUZTRlVGV0ZZRmVuRmduRmluRlxvLUZHNiRRIzYuRidGMkYyRjJGMkYyRjI=
<Text-field style="Heading 2" layout="Heading 2">4</Text-field> Find the antiderivative of LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYpLUkjbWlHRiQ2JVEkY29zRicvJSdpdGFsaWNHUSZmYWxzZUYnLyUsbWF0aHZhcmlhbnRHUSdub3JtYWxGJy1JKG1mZW5jZWRHRi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lRicvRjlGXXAvRjtGXXAvRj5GXXAvRkBGXXAvRkJGXXAvRkRGXXAvRkZRLDAuMjIyMjIyMmVtRicvRklGZXAtRk02JFEiNkYnRjJGMi1GLzYtUSJ+RidGMkZccEZecEZfcEZgcEZhcEZicEZjcEZFRkgtRi82LVEwJkRpZmZlcmVudGlhbEQ7RidGMkY1RjgvRjtGN0Y9L0ZARjdGQUZDRkVGSEZcb0Yy.
<Text-field style="Heading 2" layout="Heading 2">6</Text-field> Repeat Problem 5 and get a numerical approximation to 15 decimal places.