VIEWS: 68 PAGES: 2 POSTED ON: 1/21/2011
Maple A guide to an Expert System for Mathematics Version 14.0 - 8-Oct-2010 Maple is an expert system for doing mathematical calculations. It can manipulate symbols as well as numbers. It knows about Calculus, Algebra and Trigonometry. It knows about imaginary numbers ( −1 ), and transcendental numbers like π and e and their special properties. It can draw graphs and figures in colour and produce simple animations. It or its successors will become indispensable tools for all scientists and engineers. Maple sits inside the Windows environment. You start the Maple program by 'double-clicking' moving the mouse cursor arrow to the icon for Maple, the Red Maple Leaf with 14 on it. The first time you open the Maple programme, it will prompt you to choose a default document mode. Select the ‘Worksheet Mode’ Type : 10!; <Enter> [ <Enter> means press the key with the arrow on the middle right edge of the main keyboard. This key is also called the Return key. ] The result will appear in blue. Although the semi-colon is optional. It is good practice always to use it to finish a Maple command! Now type : sqrt(1+I); <Enter> I is Maple's special symbol for −1 . Type: sqrt(1.0+I); <Enter> Maple prints out the {complex} answer as a decimal number to 10 places Now type : evalf(Pi); <Enter> Maple prints out the decimal approximation to π to 10 decimal places. Pi is π in Maple speak. Now type : evalf(Pi,60); <Enter> Maple prints out the decimal approximation to π to 60 decimal places. Now type : evalf(Pi,600); <Enter> Maple prints out the decimal approximation to π to 600 decimal places. The program contains an algorithm to calculate π to any required accuracy! [If you try for 60,000,000 decimal places you will wait a very long time!] Now type: z:=x^4{->}/(x^2{->}-1){->}; <Enter> [ {->} means press the Right Arrow Cursor key on the lower right part of the keyboard. Maple typesets x^4 as x4, the ^ vanishes and the next character is a superscript. The right arrow cursor key gets you out of superscript mode and back into level mode.] This statement defines an expression named z. Maple prints out the expression in a more pleasing form. := is the naming or assignment operator. Now type: int(z,x); <Enter> Maple integrates the expression and displays it. Now type: diff(%,x); <Enter> (% means the previous output!) Maple now prints out the derivative of the previous expression . Now try typing : simplify(%); <Enter> That's better, isn't it! Maple has very sophisticated algorithms in it and can do some surprising things: Type: 9*(2+x)*(x+y) + (x+y)^2{->}; <Enter> | Maple turns the * into . expand(%); <Enter> | and ^ into superscript expand(%^3); <Enter> | when it typesets factor(%); <Enter> Quite complicated expressions can be simplified! Maple can draw graphs ! Try typing: z:= x^5{->}-5*x+1; <Enter> plot(z,x=-2..2); <Enter> Now use the mouse to move the cursor to point at the minus sign in the line beginning z:= in the previous expression. Click the left button and when a vertical black bar appears, erase the - sign with the <-- (backarrow) key and type +. The expression should look like: So you can go back and edit your expression, just like within a Word processor, building them up to quite complicated equations. A final graphical tour de force: Type: z := sin(x*y)*x*y ; <Enter> plot3d(z,x=-Pi..Pi,y=-Pi..Pi); <Enter> and wait for the picture! Maple allows you to view a 3-D plot from all directions. . 'Click' the mouse near the figure. The hold down the left mouse button and move the mouse slowly from side to side and up and down again. As you do this you pan or tilt over the figure so that you can see it from all directions. You can use the mouse to enlarge the graph. 'Click' the mouse on one of the black dots on the box around the figure. You can drag each black dot to move, enlarge or shrink each figure. If you click on one of the icons in the top bar, you can add axes and scales in different formats to your plot. I will omit typing {->} from now on to indicate escaping from superscript mode. I will assume that by now you are comfortable using the Cursor Keys ← → ↑ ↓ to navigate 2-D Maple Mathematical expressions. Maple can find the analytic solution of very complicated equations. It knows all of the analytic formulae for solving quadratic, cubic and quartic equations and can find analytic solutions for polynomials of higher degree than 4 when they exit: Type: solve(1+x-x^2=0); Notice that two roots are given in analytic form, separated by a comma.. Type: evalf(%) to see their numerical values. Now type: solve(1+x+x^2-x^3=0); There are three solutions to a cubic equation. In this case, two are complex. The expression for the real root is complicated. Type: evalf(%) to see their numerical values. Type: plot(1+x+x^2-x^3,x=-3..3); Does the curve of this polynomial cross the x-axis where you would expect it to? Now type: solve(1+x+x^2+x^3-x^4=0); The analytic expression for the four roots of this quartic is too complex to make any sense. Maple stores it internally and labels it as shown. Type : evalf(%) to see its numerical value. If you type evalf(%,100) you may see a more accurate numerical value for this root. Type: plot([1+x-x^2,1+x+x^2-x^3,1+x+x^2+x^3-x^4],x=0..2); to see how these three polynomials are related. Maple has a self teaching tutorial: Click on Help on the top bar then on Take aTour of Maple. Select the first Tour Topics. The Maple 14 Portal offers more training. Version 14.0 8 October 2010 dan.moore Huxley 627