<?xml version="1.0" encoding="UTF-8"?>
<Worksheet><Version major="6" minor="0"/><View-Properties><Zoom percentage="100"/></View-Properties><Styles><Layout alignment="left" bullet="none" linespacing="0.0" name="Heading 1" spaceabove="8.0" spacebelow="4.0"/><Layout alignment="left" bullet="none" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="Normal" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Layout alignment="left" bullet="indent" linespacing="0.0" name="List Item" spaceabove="3.0" spacebelow="3.0"/><Font background="[0,0,0]" bold="true" family="Serif" name="Heading 1" opaque="false" size="18"/><Font background="[0,0,0]" bold="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Normal" opaque="false" size="12" underline="false"/><Font background="[0,0,0]" bold="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="List Item" opaque="false" size="12" underline="false"/><Font background="[0,0,0]" bold="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Bullet Item" opaque="false" size="12" underline="false"/></Styles><Section><Title><Text-field layout="Heading 1" style="Heading 1"><Font family="Times New Roman">Basic MAPLE commands</Font></Text-field></Title><Text-field layout="Normal" style="Normal">   </Text-field><Text-field layout="Normal" style="Normal"><Font bold="true">   1. Enter expressions in Maple: </Font></Text-field><Text-field layout="List Item" style="List Item">     &gt; Enter the Maple input, followed by either a semicolon or a colon. If the input ends with a semicolon, the result is usually displayed.
        If the input ends with a colon, the result is not displayed.
     &gt; P<Font executable="false">ress the <Font bold="true">Enter</Font> key.</Font></Text-field><Text-field layout="List Item" style="List Item"/><Text-field layout="Normal"><Font background="[0,0,0]" bold="true" family="Times New Roman" italic="false" size="12">   2.</Font><Font background="[0,0,0]" bold="true" family="Times New Roman" italic="true" size="12"> </Font><Font background="[0,0,0]" bold="true" family="Times New Roman" italic="false" size="12">Assigning Expressions to Names</Font></Text-field><Text-field layout="Normal" style="Normal">       You can assign a name to <Font executable="false">a Maple expression </Font>so that you can use the expression again in 
        subsequent calculations by refering to their names.<Font executable="false">You can also assign names to equations.</Font><Font bold="true" style="List Item">

   3. Execute a line:</Font><Font style="List Item">
      &gt; Place the cursor in any Maple input in the line. </Font></Text-field><Text-field layout="List Item" style="List Item">   &gt; Press the <Font bold="true">Enter</Font> key. 
</Text-field><Text-field layout="List Item" style="List Item"><Font bold="true" style="Normal">4. Compute or recompute the entire Maple worksheet </Font><Font style="Normal">when you have changed expressions that affect subsequent Maple commands.</Font><Font style="Bullet Item">
        &gt;From the </Font><Font bold="true">Edit</Font><Font style="Bullet Item"> menu, select </Font><Font bold="true">Execute</Font><Font style="Bullet Item">, and then </Font><Font bold="true">Worksheet  
                                   OR</Font><Font style="Bullet Item">
        &gt; Click on <Font bold="true" italic="true">!!!</Font><Font italic="true"> </Font>from the toolbar menu</Font>
</Text-field><Text-field layout="List Item" style="List Item"><Font bold="true" style="Bullet Item">5.</Font><Font style="Bullet Item"> <Font bold="true">Find and replace text and input in</Font></Font><Font bold="true" style="Normal"> a active worksheet:</Font></Text-field><Text-field layout="List Item" style="List Item">        &gt; From the <Font bold="true">Edit</Font> menu, select <Font bold="true">Find</Font>. </Text-field><Text-field layout="List Item" style="List Item">        &gt; In the <Font bold="true">Find</Font> box, enter the text or input you want to search for. </Text-field><Text-field layout="List Item" style="List Item">        &gt; In the <Font bold="true">Replace</Font> box, enter the replacement text or input. </Text-field><Text-field layout="List Item" style="List Item">        &gt; Click <Font bold="true">Change</Font> to change the current occurrence. Click <Font bold="true">Change All</Font> to change all occurrences within the current worksheet. </Text-field><Text-field layout="List Item" style="List Item"/><Text-field layout="List Item" style="List Item"><Font bold="true">6. The Repetition Statement (for...while...do)</Font></Text-field><Text-field layout="List Item" style="List Item"><Font bold="true">     </Font>The repetition statement provides the ability to execute a statement sequence repeatedly, either for a counted number of times (using the for...to clauses) 
     or until a condition is satisfied (using the while clause). For more information see Maple Help.
</Text-field><Text-field layout="List Item" style="List Item"><Font bold="true">7. Explicit return from a procedure:</Font></Text-field><Text-field layout="List Item" style="List Item">         RETURN(expr) will make expr available as input for other computations. 
</Text-field><Text-field layout="Heading 1" style="Heading 1"><Font family="Times New Roman" foreground="[0,0,0]" italic="false" size="12" underline="false">   8. Extract operands from an expression:</Font><Font family="Times New Roman">
         <Font style="Normal">op(i,e) OR op(i..j,e) OR op(e) OR op(list,e) where </Font></Font></Text-field><Text-field layout="Normal" style="Normal">              i, j<Font size="10"> - </Font>integers indicating positions of operands </Text-field><Text-field layout="Normal" style="Normal">              e  <Font size="10"> - </Font>expression</Text-field><Text-field layout="Normal" style="Normal">              list  <Font size="10">- </Font>list of integers indicating positions of operands at increasing nesting levels of an expression.

 <Font bold="true">   9. Returning the number of operands in an expression: </Font>
           nops(e) where e is an expression.<Font bold="true" style="List Item">

   10. Returning the length of an object:
     </Font><Font style="List Item">      length(expr)  where expr is an expression.</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal"><Font bold="true" style="List Item">   11. Converting an expression to a string
        </Font><Font executable="false">     convert(expr, string)</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal"><Font bold="true" style="List Item">   12.  Evaluating expression as a boolean expression:
         </Font><Font executable="false"> evalb(x)
          The return values are true, false, and FAIL. </Font></Text-field><Text-field layout="Normal" style="Normal"><Font bold="true" executable="false">
   13. The " with " command </Font><Font executable="false">makes the short form names of the functions of a Maple package available at the interactive level.
         We will use with(numtheory):<Font bold="true">

   14. Calling a procedure:</Font>
                 proc (argseq) where  argseq is the formal parameter name.</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal"><Font bold="true" executable="false">   15. The Selection Statement ( if ... then):
              </Font><Font executable="false">if &lt;conditional expression&gt;  then , &lt;statement sequence&gt;</Font></Text-field><Text-field layout="Normal" style="Normal">              <Font bold="true">.
              .
              .</Font></Text-field><Text-field layout="Normal" style="Normal"><Font bold="true" executable="false">              </Font><Font executable="false">end if: (or fi:)<Font bold="true"> </Font></Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal"><Font bold="true" executable="false">   16. Concatenating expressions:</Font></Text-field><Text-field layout="Normal" style="Normal"><Font executable="false">            cat(a,b,c,....) where a,b,c,....are any expressions
            <Font italic="true">Note</Font>: The cat function is commonly used to concatenate strings and names together.</Font>
</Text-field><Text-field layout="Normal" style="Normal"><Font bold="true" executable="false">   17. Printing of expressions:</Font><Font executable="false">
           print(expr);</Font>
</Text-field><Text-field layout="Normal" style="Normal"><Font bold="true" executable="false">   18. Printing of strings:</Font><Font executable="false">
            printf("str...\n"); where str is a string.</Font></Text-field><Text-field layout="Normal" style="Normal"><Font bold="true" executable="false"> </Font></Text-field><Text-field layout="Normal" style="Normal"><Font bold="true" executable="false">   19. Unassigning all the unevaluated names given as input:
     </Font><Font executable="false">   unassign('name'); </Font></Text-field><Text-field layout="Normal" style="Normal"><Font bold="true" style="List Item">      
   20.</Font><Font style="List Item"> <Font bold="true">Integer factorization </Font>
         ifactor(n); OR ifactors(n);. See Maple Help for more information.<Font bold="true">

   21. Computing a regular or simple continued fraction expansion:</Font>
     cfrac(n); where n can be a rational, float, algebraic, transcendental, real, or complex number<Font bold="true">

   22. Solve equations for integer solutions:</Font></Font></Text-field><Text-field layout="Normal" style="Normal"><Font bold="true" style="List Item">     </Font><Font style="List Item"> isolve(eq); where eq is a set of equations or single equation.</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal"><Font bold="true" style="List Item">   23. Determining the smallest prime that is larger than n:</Font><Font style="List Item">
           nextprime(n);</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="Normal" style="Normal"><Font bold="true" style="List Item">   24. Determining the largest prime that is less than n:</Font><Font style="List Item">
           prevprime(n);</Font></Text-field><Text-field layout="Normal" style="Normal"><Font bold="true" style="List Item">
   25. Computing the Legendre value:</Font></Text-field><Text-field layout="List Item" style="List Item"><Font bold="true">       </Font>   legendre(a, p); where a is an integer and p is a prime.
</Text-field><Text-field layout="Normal" style="Normal"><Font bold="true" style="List Item">   26. Primality test:</Font></Text-field><Text-field layout="List Item" style="List Item">    isprime(n); where n is integer. It returns false if n is shown to be composite, otherwise it returns true. 
</Text-field><Text-field layout="List Item" style="List Item"><Font bold="true">27. Computing an integer approximation the nearest integer to the square root of x:</Font></Text-field><Text-field layout="List Item" style="List Item">           isqrt(x);  where x is an integer.<Font bold="true">

28. Solving equations in Z (set of integers) mod m</Font>
            msolve(eq, m); where eq <Font executable="false">is a set of equations or single equation and m is an integer.</Font>
</Text-field><Text-field layout="List Item" style="List Item"><Font bold="true" executable="false">29. Computing the totient function of n: </Font></Text-field><Text-field layout="List Item" style="List Item"><Font executable="false">              phi(n); where n is an integer.</Font>
</Text-field><Text-field layout="List Item" style="List Item"><Font bold="true" executable="false">30. Computing  a primitive root</Font></Text-field><Text-field layout="List Item" style="List Item"><Font executable="false">       &gt;</Font><Font style="Normal"> primroot(g, n) will compute the first primitive root of n that is greater than g</Font></Text-field><Text-field layout="List Item" style="List Item"><Font style="Normal">       &gt; primroot(n) will return the smallest primitive root of the number n. </Font>
</Text-field><Text-field layout="List Item" style="List Item"><Font bold="true" style="Normal">31. Finding the greatest integer less than or equal to a number </Font></Text-field><Text-field layout="List Item" style="List Item"><Font style="Normal">          floor(x); where x is a number</Font></Text-field><Text-field layout="List Item" style="List Item"/><Text-field layout="List Item" style="List Item"><Font bold="true" style="Normal">32. Finding the smallest integer greater than or equal to a number:</Font></Text-field><Text-field layout="List Item" style="List Item"><Font bold="true" style="Normal">        </Font><Font style="Normal"> ceil(x); <Font executable="false"> where x is a number</Font></Font>
</Text-field><Text-field layout="List Item" style="List Item"><Font bold="true" style="Normal">33. Computing the greatest common divisor of two numbers:</Font></Text-field><Text-field layout="List Item" style="List Item"><Font bold="true" style="Normal">      </Font><Font style="Normal">   gcd(a,b);</Font>
</Text-field><Text-field layout="List Item" style="List Item"><Font bold="true" style="Normal">34. Computing the set of prime factors of an integer argument n:</Font></Text-field><Text-field layout="List Item" style="List Item"><Font bold="true" style="Normal">        </Font><Font style="Normal"> factorset(n);</Font>
</Text-field><Text-field layout="List Item" style="List Item"><Font bold="true" style="Normal">35. Chinese Remainder Algorithm:</Font></Text-field><Text-field layout="List Item" style="List Item"><Font bold="true" style="Normal">        </Font><Font style="Normal"> chrem(u, m); where </Font><Font size="10">u is a </Font><Font style="Normal">list [u_1,..., u_n] of numbers and </Font><Font size="10">m is a </Font><Font style="Normal">list of moduli [m_1,..., m_n]</Font></Text-field><Text-field layout="Normal" style="Normal"/><Text-field layout="List Item" style="List Item"/></Section><Text-field/><Text-field/><Text-field/><Text-field/></Worksheet>
