<?xml version="1.0" encoding="UTF-8"?>
<Worksheet><Version major="6" minor="1"/><View-Properties><Zoom percentage="150"/></View-Properties><Styles><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"/><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" name="Maple Input" opaque="false" size="12"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Text" opaque="false" size="12" underline="false"/><Font background="[0,0,0]" bold="true" family="Serif" name="Heading 1" opaque="false" size="18"/></Styles><Group><Input><Text-field alignment="centred" layout="Normal" style="Text"><Font executable="false" foreground="[0,0,0]" italic="false" style="Heading 1" underline="false">
Maple Introduction</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">Notes on Maple: </Text-field><Text-field layout="Normal" style="Text">     1.  "<Font foreground="[255,0,51]"> <Font bold="true">&gt; pp := 512989</Font></Font>" means "set pp = 512989 <Font italic="true">and</Font> store the value of pp in Maple's memory".</Text-field><Text-field layout="Normal" style="Text">     2.  "<Font bold="true" foreground="[255,0,0]">;</Font>" means "execute the command between "<Font bold="true" foreground="[255,0,0]">&gt;</Font>" and "<Font bold="true" foreground="[255,0,0]">;</Font>" <Font italic="true">and</Font> display the result (if any) on  the screen.</Text-field><Text-field layout="Normal" style="Text">     3.  "<Font bold="true" foreground="[255,0,0]">:</Font>" means "execute the command between "<Font bold="true" foreground="[255,0,51]">&gt;</Font>" and "<Font bold="true" foreground="[255,0,0]">:</Font>" but do <Font italic="true">not</Font> display the result (if any) on  the screen.</Text-field><Text-field layout="Normal" style="Text">     4.  <Font italic="true">Always check</Font> that the cursor is between "<Font bold="true" foreground="[255,0,0]">&gt;</Font>" and  ("<Font bold="true" foreground="[255,0,0]">;</Font>" or "<Font bold="true" foreground="[255,0,0]">:</Font>") and <Font italic="true">then</Font> press <Font bold="true">Return</Font> or <Font bold="true">Enter</Font> to execute the operation.  </Text-field><Text-field layout="Normal" style="Text">     5.  Do <Font italic="true">not</Font> use the return key to enter data over more than one line.  You CAN use "shift - return" to do this.  Alternatively, Maple will automatically carry your entry to the next line  as needed.  </Text-field><Text-field layout="Normal" style="Text">     6.  "<Font bold="true" foreground="[255,0,0]">restart</Font>" clears all values from Maple's memory.</Text-field><Text-field layout="Normal" style="Text">     7.  Additional spaces in the command are for clarity</Text-field><Text-field layout="Normal" style="Text"/></Input></Group><Group><Input><Text-field layout="Normal" style="Text">Clear any values from Maple's memory.</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">restart;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">Multiplication is <Font bold="true" foreground="[255,0,0]">*</Font> and powers are <Font bold="true" foreground="[255,0,0]">^</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">238 + 17 + 99*158;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">What is 100!, i.e. what is 1*2*3*4* ... *98*99*100?</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">100!;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">How many digits in 100! ? </Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">length(100!);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">Q: How many ways can I arrange my 60 books on my bookshelf?</Font></Text-field><Text-field layout="Normal" style="Text"><Font foreground="[255,0,51]" italic="true">Eval</Font><Font italic="true">uate the result in <Font foreground="[255,0,51]">f</Font>loating point arithmetic.</Font></Text-field><Text-field layout="Normal" style="Text"><Font italic="true">One estimate of the number of atoms in the universe is 10^80.  Which is greater?</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">60! ; evalf(60!); verify(60!, 10^80, greater_than); </Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">Store a=5 and b=8 in memory.</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">a := 5; b := 8; </Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input">a + b;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text">Redefine and store a and b as the characters a and b.</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">a := 'a' ; b := 'b';</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">Print the first 100 elements of the Fibonacci sequence 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...</Font></Text-field><Text-field layout="Normal" style="Text">( In Maples's memory set a[1]=1, a[2]=1 and a[i] = a[i-1] + a[i-2] for i from 3 to 100.  </Text-field><Text-field layout="Normal" style="Text">Note the use of <Font bold="true" foreground="[255,0,0]">:=</Font> in the command.</Text-field><Text-field layout="Normal" style="Text">Do not print the intermediate results, hence use <Font bold="true" foreground="[255,0,0]">:</Font> and not <Font bold="true" foreground="[255,0,0]">;</Font></Text-field><Text-field layout="Normal" style="Text">"<Font bold="true" foreground="[255,0,51]">od</Font>" means "end do". </Text-field><Text-field layout="Normal" style="Text">Finally convert a into a list (from an "array").  </Text-field><Text-field layout="Normal" style="Text">The result of this is printed because of the final "<Font bold="true" foreground="[255,0,0]">;</Font><Font foreground="[255,0,0]">"</Font><Font bold="true"> </Font>)</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">a[1] := 1: a[2] := 1 : 
for i from 3 to 100 do
a[i] := a[i-1] + a[i-2]: od:
convert(a,'list'); </Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">What is the 100000th prime? </Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">ithprime(1000000); </Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">Is a given number a prime?</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">isprime(4896276498678467893766480764);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">Factorise a number. </Font></Text-field><Text-field layout="Normal" style="Text">( i.e. "integer factor")</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">ifactor(987098398654098299877430953245);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">What is the next prime after a given number?</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">p = nextprime(48962764986784678937);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">What is the formula for the sum of the first k integers?  Sum of their squares?</Font></Text-field><Text-field layout="Normal" style="Text">( That is sum j^2 from j=1 up to k.  </Text-field><Text-field layout="Normal" style="Text">Simplify the resulting expression.)</Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">simplify(sum(j, j=1..k)) ;  simplify(sum(j^2, j=1..k));</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">Is there a formula for the sum of the 10th powers of the first k integers?  </Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input"> simplify(sum(j^10, j=1..k)) ;</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">Integrate x^3 (ln(x))^2  with respect to x .</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">int(x^3 * (ln(x))^2 , x );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">Find a formula for the integral of e^(ax) + cos(bx) with respect to x.</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">int(exp(a*x) * cos(b*x) , x);</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">Plot x^2 sin (1/x) from -0.1 to 0.1 and compare with x^2 and -x^2</Font> </Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">plot([x^2, -x^2, x^2 * sin(1/x)] , x = -0.1..0.1 );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Text"><Font italic="true">Plot sin(xy) for x and y each between -Pi and Pi   and put the axes in a box.</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="Maple Input">plot3d( sin(x*y) , x=0..Pi, y=0..Pi , axes = boxed );</Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input></Group><Text-field/><Text-field/><Text-field/><Text-field/><Text-field/></Worksheet>