<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Alasdair&#039;s musings &#187; Axiom</title>
	<atom:link href="http://amca01.wordpress.com/category/axiom/feed/" rel="self" type="application/rss+xml" />
	<link>http://amca01.wordpress.com</link>
	<description>Life, mathematics teaching</description>
	<lastBuildDate>Tue, 03 Nov 2009 12:12:28 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='amca01.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/60451efeee73827a456d4384efb970da?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Alasdair&#039;s musings &#187; Axiom</title>
		<link>http://amca01.wordpress.com</link>
	</image>
			<item>
		<title>An introduction to Axiom (8): Documentation</title>
		<link>http://amca01.wordpress.com/2008/07/13/an-introduction-to-axiom-8-documentation/</link>
		<comments>http://amca01.wordpress.com/2008/07/13/an-introduction-to-axiom-8-documentation/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 12:41:16 +0000</pubDate>
		<dc:creator>amca01</dc:creator>
				<category><![CDATA[Axiom]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://amca01.wordpress.com/?p=110</guid>
		<description><![CDATA[Like all Computer Algebra Systems, Axiom has both online documentation, and various other web pages devoted to its description.
HyperDoc
If you are using Axiom under linux, or under Windows with the Xming X-server, you will have access to the HyperDoc help browser.  Although this can look a little old-fashioned (in terms of its widgets), it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=110&subd=amca01&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Like all Computer Algebra Systems, Axiom has both online documentation, and various other web pages devoted to its description.</p>
<p><strong>HyperDoc</strong></p>
<p>If you are using Axiom under linux, or under Windows with the Xming X-server, you will have access to the HyperDoc help browser.  Although this can look a little old-fashioned (in terms of its widgets), it is extraordinarily powerful, and very useful.  It contains:</p>
<ul>
<li>the complete text of the book &#8220;Axiom: The Scientific Computation System&#8221; by Richard Jenks and Robert Sutor (Springer, 1992), in a convenient hypertext format</li>
<li>masses of examples</li>
<li>a useful search facility</li>
<li>a browse system, where you can browse Axiom by commands, or libraries.  For example, you can find all the commands which apply to finite fields, what they do, and how they can be used.</li>
</ul>
<p>HyperDoc is started automatically when you start Axiom.  Although HyperDoc can be used as a stand-alone help browser, it connects with Axiom using a socket, so it can run Axiom commands.</p>
<p>Here are a couple of screenshots; one with graphics, one with algebra (click on each image to show a full-sized version):</p>
<table border="0" cellpadding="10">
<tbody>
<tr>
<td><a href="http://amca01.files.wordpress.com/2008/07/hyperdoc_graphics.jpg"><img src="http://amca01.files.wordpress.com/2008/07/hyperdoc_graphics.jpg?w=200" alt="Graphics in HyperDoc" width="200" /> </a></td>
<td><a href="http://amca01.files.wordpress.com/2008/07/hyperdoc_algebra.jpg"><img src="http://amca01.files.wordpress.com/2008/07/hyperdoc_algebra.jpg?w=200" alt="Algebra in HyperDoc" width="200" /></a></td>
</tr>
</tbody>
</table>
<p><strong>Other help from within Axiom</strong></p>
<p>If you only have a console based Axiom, then there is limited help available from within Axiom itself.  However, there are a few commands you can use to provide some information.  Suppose, for example, you wish to list all operations containing the string &#8220;<code>diff</code>&#8220;.  Then you enter</p>
<p><code>)wh op diff</code></p>
<p>which is an abbreviation for</p>
<p><code>)what operations diff</code></p>
<p>and receive the output</p>
<pre>Operations whose names satisfy the above pattern(s):

diff              difference               differentialVariables
differentiate     exteriorDifferential     mergeDifference
setDifference     symmetricDifference      totalDifferential

      To get more information about an operation such as
      differentiate, issue the command
      )display op differentiate</pre>
<p>To list domains, categories or packages, you can write</p>
<pre>)wh do diff
)wh ca diff
)wh pa diff</pre>
<p>The command</p>
<p><code>)wh th diff</code></p>
<p>which is an abbreviation for</p>
<p><code>)what things diff</code></p>
<p>lists <em>everything</em> which contains the substring &#8220;<code>diff</code>&#8220;.</p>
<p>Now suppose we want to find out about the operation &#8220;<code>difference</code>&#8220;:</p>
<p><code>)d op difference</code></p>
<p>which is an abbreviation for</p>
<p><code>)display operation difference</code></p>
<p>and which produces</p>
<pre>There are 2 exposed functions called difference :
   [1] (D,D1) -&gt; D from D if D has SETAGG D1 and D1 has SETCAT
   [2] (D,D) -&gt; D from D if D has SETAGG D1 and D1 has SETCAT</pre>
<p>If you want to find out what &#8220;<code>difference</code>&#8221; actually <em>does</em>, without using HyperDoc, and from within Axiom itself, you can&#8217;t.</p>
<p>However, a very handy command is <code>show</code>, which when applied to a domain lists all operations defined on that domain.  Here for exmaple, we find out about Cliiford alegbras, whose type has abbreviation <code>CLIF</code>:</p>
<p><code>)sh CLIF</code></p>
<p>with output</p>
<pre>CliffordAlgebra(n: PositiveInteger,K: Field,Q: QuadraticForm(n,K))
 is a constructor
 Abbreviation for CliffordAlgebra is CLIF
 This constructor is exposed in this frame.
 Issue )edit /usr/local/axiom/mnt/linux/../../src/algebra/CLIF.spad
to see source code for CLIF

------------------------------- Operations -------------------------------
 ?*? : (%,K) -&gt; %                      ?*? : (K,%) -&gt; %
 ?*? : (%,%) -&gt; %                      ?*? : (Integer,%) -&gt; %
 ?*? : (PositiveInteger,%) -&gt; %        ?**? : (%,PositiveInteger) -&gt; %
 ?+? : (%,%) -&gt; %                      ?-? : (%,%) -&gt; %
 -? : % -&gt; %                           ?/? : (%,K) -&gt; %
 ?=? : (%,%) -&gt; Boolean                1 : () -&gt; %
 0 : () -&gt; %                           ?^? : (%,PositiveInteger) -&gt; %
 coerce : K -&gt; %                       coerce : Integer -&gt; %
 coerce : % -&gt; OutputForm              dimension : () -&gt; CardinalNumber
 e : PositiveInteger -&gt; %              hash : % -&gt; SingleInteger
 latex : % -&gt; String                   one? : % -&gt; Boolean
 recip : % -&gt; Union(%,"failed")        sample : () -&gt; %
 zero? : % -&gt; Boolean                  ?~=? : (%,%) -&gt; Boolean
 ?*? : (NonNegativeInteger,%) -&gt; %
 ?**? : (%,NonNegativeInteger) -&gt; %
 ?^? : (%,NonNegativeInteger) -&gt; %
 characteristic : () -&gt; NonNegativeInteger
 coefficient : (%,List PositiveInteger) -&gt; K
 monomial : (K,List PositiveInteger) -&gt; %
 subtractIfCan : (%,%) -&gt; Union(%,"failed")</pre>
<p>It seems that we can add, subtract, multiply and divide elements in a Clifford algebra, as well as raising an element to an integer power.  As well as other operations.</p>
<p><strong>Local help outside Axiom</strong></p>
<p>If you have a complete Axiom system, or have compiled it from scratch and also compiled the documentation, you&#8217;ll find some useful files in the</p>
<p><code>mnt/linux/doc</code></p>
<p>directory, of which the most important and useful are:</p>
<dl>
<dt><code>Rosetta.dvi</code></dt>
<dd>This is the &#8220;Rosetta Stone&#8221; and provides a &#8220;collection of synonyms for various operations in the computer algebra systems Axiom, Derive, GAP, Gmp, DoCon,<br />
Macsyma, Magnus, Maxima, Maple, Mathematica, MuPAD, Octave, Pari, Reduce, Scilab, Sumit and Yacas.&#8221;  Without being comprehensive, it is nonetheless an incredibly useful document, especially if you&#8217;re coming to a new CAS after experience with another.</dd>
<dt><code>book.dvi</code></dt>
<dd>This is the Jenks/Sutor book, with additions &#8211; 1136 pages!  Not for printing!</dd>
<dt><code>bookvol1.dvi</code></dt>
<dd>This is a Tutorial volume, and a very good starting place for learning about Axiom.  It exists also in printed form, available from <a href="http://www.lulu.com/content/190827">lulu.com</a>.</dd>
</dl>
<p><strong>Online help</strong></p>
<p>There is also some very good material online.  First off is an xhtml version of the Jenks/Sutor book, at <a href="http://axiom-wiki.newsynthesis.org/uploads/contents.xhtml">http://axiom-wiki.newsynthesis.org/uploads/contents.xhtml</a></p>
<p>Complete pdf files of all Axiom user documentation are available at <a href="http://www.axiom-developer.org/axiom-website/documentation.html"><br />
http://www.axiom-developer.org/axiom-website/documentation.html</a><br />
This page also contains a link to the beginnings of a new browser-based interface to the HyperDoc material.</p>
<p>For tutorials, the best one in English is by Martin Dunstan, from as long ago as 1996, at <a href="http://www.dcs.st-and.ac.uk/~mnd/documentation/axiom_tutorial/"><br />
http://www.dcs.st-and.ac.uk/~mnd/documentation/axiom_tutorial</a>.</p>
<p>There are some excellent tutorials in French, by Daniel Augot at <a href="http://www-rocq.inria.fr/codes/Daniel.Augot/axiom_intro.pdf"><br />
http://www-rocq.inria.fr/codes/Daniel.Augot/axiom_intro.pdf</a><br />
and by Christophe Conil and Quentin Carpent at <a href="http://la.riverotte.free.fr/axiom"><br />
http://la.riverotte.free.fr/axiom</a>.</p>
<p>Now  &#8211; get out there and learn about Axiom!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amca01.wordpress.com/110/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amca01.wordpress.com/110/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amca01.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amca01.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amca01.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amca01.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amca01.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amca01.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amca01.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amca01.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amca01.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amca01.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=110&subd=amca01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amca01.wordpress.com/2008/07/13/an-introduction-to-axiom-8-documentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6bb720c28219294cf31d0693ed47388?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">amca01</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/07/hyperdoc_graphics.jpg" medium="image">
			<media:title type="html">Graphics in HyperDoc</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/07/hyperdoc_algebra.jpg" medium="image">
			<media:title type="html">Algebra in HyperDoc</media:title>
		</media:content>
	</item>
		<item>
		<title>An introduction to Axiom (7): Programming</title>
		<link>http://amca01.wordpress.com/2008/06/28/an-introduction-to-axiom-7-programming/</link>
		<comments>http://amca01.wordpress.com/2008/06/28/an-introduction-to-axiom-7-programming/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 00:40:46 +0000</pubDate>
		<dc:creator>amca01</dc:creator>
				<category><![CDATA[Axiom]]></category>
		<category><![CDATA[Computation]]></category>

		<guid isPermaLink="false">http://amca01.wordpress.com/?p=83</guid>
		<description><![CDATA[(It&#8217;s been a while since I posted about Axiom &#8211; that&#8217;s what exam marking does!)
Axiom has a full and complete, and well-structured programming language.  Rather than describe it in detail, I&#8217;ll just make a few general remarks, and provide a few examples.
A simple function
Here&#8217;s an example of a simple program, to solve an equation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=83&subd=amca01&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>(It&#8217;s been a while since I posted about Axiom &#8211; that&#8217;s what exam marking does!)</p>
<p>Axiom has a full and complete, and well-structured programming language.  Rather than describe it in detail, I&#8217;ll just make a few general remarks, and provide a few examples.</p>
<p><strong>A simple function</strong></p>
<p>Here&#8217;s an example of a simple program, to solve an equation numerically by the bisection method.  We implement the following algorithm:</p>
<pre>
INPUT: function f,
       values a,b for which f(a)f(b)&lt; 0,
       a tolerance eps
WHILE f(a)&gt;eps REPEAT
  c = (a+b)/2
  IF sign(f(a))=sign(f(c))
    THEN a = c
    ELSE b = c
RETURN a
</pre>
<p>For this algorithm at least, the program is very similar in Axiom:</p>
<pre>
bisect(f,a,b,eps) ==
  local c
  while abs(f(a))&gt;eps repeat
    c:=numeric (a+b)/2
    if sign(f(a))=sign(f(c)) then
      a:=c
    else
      b:=c
  return(a)
</pre>
<p>Note that for ease of exposition I&#8217;ve done no sign checking on the values of <code>f(a)</code> and <code>f(b)</code>.  This little program can be saved in a file called <code>bisect.input</code> and read into Axiom with the command</p>
<p><code>)read bisect</code></p>
<p>And now it can be used:</p>
<p><a href="http://amca01.files.wordpress.com/2008/06/axiom_bisect.jpg"><img src="http://amca01.files.wordpress.com/2008/06/axiom_bisect.jpg"></a></p>
<p>Note the use of anonymous functions.</p>
<p>Axiom programs are made of blocks, which are groups of statements all with the same indentation, or alternatively delineated with parentheses; the statements being separated with semicolons.  The above program could be entered as</p>
<p><code>bisect2(f,a,b,eps) == (while abs(f(a))&gt;eps repeat (c:=numeric (a+b)/2;if sign(f(a))=sign(f(c)) then a:=c else b:=c),return a)</code></p>
<p>This is equally correct, but less readable.</p>
<p>Axiom contains the usual programming constructs: loops with for and while, branching, and recursion.  The above program shows several of these.</p>
<p><strong>An algebraic problem</strong></p>
<p>If you factorize <img src='http://l.wordpress.com/latex.php?latex=x%5En-1&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='x^n-1' title='x^n-1' class='latex' /> for a few values of <img src='http://l.wordpress.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='n' title='n' class='latex' />, each factor seems to have non-zero coefficients only of 1 or -1.  This might lead us to conjecture that this is the case for all <img src='http://l.wordpress.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='n' title='n' class='latex' />.  We can write some functions and programs to test this.  First, the maximum coefficient of a polynomial:</p>
<pre>
maxCoeff(p) ==
  reduce(max,map(abs,coefficients(p)))
</pre>
<p>Next, the maximum coefficient taken over all factors of a polynomial:</p>
<pre>
maxFactCoeff(q) ==
  reduce(max,[maxCoeff(nthFactor(q,j)) for j in 1..numberOfFactors(q)])
</pre>
<p>Finally, the &#8220;driver&#8221; program which simply lists all values of <img src='http://l.wordpress.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='n' title='n' class='latex' /> for which the factorization of <img src='http://l.wordpress.com/latex.php?latex=x%5En-1&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='x^n-1' title='x^n-1' class='latex' /> contains a factor one of whose coefficients has an absolute value greater than 1:</p>
<pre>
testCoeff() ==
  for k in 1.. repeat
    if maxFactCoeff(factor(x^(k::PI)-1))&gt;1 then print(k)
</pre>
<p>Put all these into a single file, called say <code>maxFactor.input</code>, read it into Axiom with </p>
<p><code>)read maxFactor</code></p>
<p>and run it with</p>
<p><code>testCoeff()</code></p>
<p>You will obtain the following values:</p>
<pre>
   105
   165
   195
   210
   255
   273
   285
   315
   330
   345
   357
</pre>
<p>and so on, until either you hit CTRL-c to abort the program, or you hit your computer with a heavy brick.  (I suggest the first method).</p>
<p>This problem can be equivalently stated in terms of the coefficients of cyclotomic polynomials, and in fact the sequence generated above is sequence <a href="http://www.research.att.com/~njas/sequences/A013590">A013590</a> in the <a href="http://www.research.att.com/~njas/sequences/Seis.html">Online Encyclopaedia of Integer Sequences</a>: &#8220;Orders of cyclotomic polynomials containing a coefficient &gt;= 2.&#8221;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amca01.wordpress.com/83/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amca01.wordpress.com/83/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amca01.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amca01.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amca01.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amca01.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amca01.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amca01.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amca01.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amca01.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amca01.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amca01.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=83&subd=amca01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amca01.wordpress.com/2008/06/28/an-introduction-to-axiom-7-programming/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6bb720c28219294cf31d0693ed47388?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">amca01</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_bisect.jpg" medium="image" />
	</item>
		<item>
		<title>An introduction to Axiom (6): Types</title>
		<link>http://amca01.wordpress.com/2008/06/09/an-introduction-to-axiom-6-types/</link>
		<comments>http://amca01.wordpress.com/2008/06/09/an-introduction-to-axiom-6-types/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 14:26:24 +0000</pubDate>
		<dc:creator>amca01</dc:creator>
				<category><![CDATA[Axiom]]></category>

		<guid isPermaLink="false">http://amca01.wordpress.com/?p=74</guid>
		<description><![CDATA[So far, Axiom does most of the calculation we would expect of any computer algebra system.  But now we look at an aspect of Axiom which sets it apart from other systems: its use of types.  In Axiom, &#8220;type&#8221; is another word for &#8220;domain&#8221;, or &#8220;domain of computation&#8221;, which is a method of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=74&subd=amca01&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So far, Axiom does most of the calculation we would expect of any computer algebra system.  But now we look at an aspect of Axiom which sets it apart from other systems: its use of <em>types</em>.  In Axiom, &#8220;type&#8221; is another word for &#8220;domain&#8221;, or &#8220;domain of computation&#8221;, which is a method of organizing all objects.  Objects include standard mathematical constructs such as matrices, functions, integers, abelian groups; data structures such as lists and arrays; as well as constructs built up from other constructs.  Thus in Axiom we can create and use the type: &#8220;List of square matrices of polynomials over integer fractions&#8221;.  The type of the operand indicates the type of the operation: a simple multiplication * will have a different interpretation depending on whether the operands are integers, real numbers (floats), matrices, elements of a finite field, or many other types.</p>
<p>There are three special symbols which are used when dealing with types:</p>
<dl>
<dt><tt>::</tt></dt>
<dd>This is used for converting from one type to another.  In the form <tt>object::type</tt> it takes the object <tt>object</tt> and converts it to type <tt>type</tt>.</dd>
<dt><tt>$</tt></dt>
<dd>This means to take the operation as defined for objects of the given type.  It is used in the form <tt>(operand1 operation operand2)$type</tt>.</dd>
<dt><tt>@</tt></dt>
<dd>This means to choose the operation (and possibly convert the types of the objects, if needed) so that the result is of the given type.</dd>
</dl>
<p>As examples of the use and misuse of these symbols, let&#8217;s investigate the calculation</p>
<p><img src='http://l.wordpress.com/latex.php?latex=3%5E%7B10%5E9%7D%5Cpmod%7B2%5E%7B20%7D%7D%3D3%5E%7B1000000000%7D%5Cpmod%7B1048576%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='3^{10^9}\pmod{2^{20}}=3^{1000000000}\pmod{1048576}' title='3^{10^9}\pmod{2^{20}}=3^{1000000000}\pmod{1048576}' class='latex' /></p>
<p>The type we will use is <tt>IntegerMod</tt>, which can be abbreviated <tt>ZMOD</tt>:</p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_types_zmod.jpg" alt="Types in Axiom - ZMOD" /></p>
<p>What is happening here?  In the first command, we deliberately ask that the power be taken from its ZMOD definition; that is, using the well-known fast algorithm.  In the second command, the 3 was defined as being of type &#8220;<tt>ZMOD 1048576</tt>&#8221; before the power was attempted.  This means that any further arithmetic on the 3 will use versions taken from their ZMOD definitions.  The last command says, in effect: &#8220;First work out the value of 3^1000000000, and then convert that to  a value modulo 1048576.&#8221;  Needless to say, this is wasteful of time and memory, and will probably cause an overflow and crash Axiom.</p>
<p>Here&#8217;s another example of type conversion, this time using prime fields.  The abbreviation for the finite field of residues modulo a prime p is <tt>PF p</tt>.</p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_types_pf.jpg" alt="Types in Axiom - PF" /></p>
<p>Note that we are using a type built of other types here: we have to convert the polynomial <tt>p</tt> to the type <tt>POLY PF 5</tt> to indicate that the type we want is polynomials defined over the finite field <img src='http://l.wordpress.com/latex.php?latex=%5CBbb%7BZ%7D%2F5%5CBbb%7BZ%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='\Bbb{Z}/5\Bbb{Z}' title='\Bbb{Z}/5\Bbb{Z}' class='latex' />.</p>
<p>An example using matrices:</p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_types_matrices.jpg" alt="Types in Axiom - matrices" /></p>
<p>Note that again we had to give the full type of <tt>A</tt>.  If we tried to convert <tt>A</tt> to type &#8220;<tt>PF 11</tt>&#8221; Axiom would return an error message saying that the particular conversion is not possible.</p>
<p>Finally, some examples of &#8220;package calling&#8221; &#8211; calling a command with the same name (in this case <tt>random</tt>) but from different packages.  The first command requests a random integer; the second a random residue from the finite field <img src='http://l.wordpress.com/latex.php?latex=%5CBbb%7BZ%7D%2F31%5CBbb%7BZ%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='\Bbb{Z}/31\Bbb{Z}' title='\Bbb{Z}/31\Bbb{Z}' class='latex' />, and the last a random element from the finite field <img src='http://l.wordpress.com/latex.php?latex=%5CBbb%7BZ%7D_2%5Bx%5D%2F%28x%5E6%2Bx%2B1%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='\Bbb{Z}_2[x]/(x^6+x+1)' title='\Bbb{Z}_2[x]/(x^6+x+1)' class='latex' />:</p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_types_random.jpg" alt="Types in Axiom - package calling" /></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amca01.wordpress.com/74/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amca01.wordpress.com/74/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amca01.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amca01.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amca01.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amca01.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amca01.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amca01.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amca01.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amca01.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amca01.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amca01.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=74&subd=amca01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amca01.wordpress.com/2008/06/09/an-introduction-to-axiom-6-types/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6bb720c28219294cf31d0693ed47388?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">amca01</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_types_zmod.jpg" medium="image">
			<media:title type="html">Types in Axiom - ZMOD</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_types_pf.jpg" medium="image">
			<media:title type="html">Types in Axiom - PF</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_types_matrices.jpg" medium="image">
			<media:title type="html">Types in Axiom - matrices</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_types_random.jpg" medium="image">
			<media:title type="html">Types in Axiom - package calling</media:title>
		</media:content>
	</item>
		<item>
		<title>An introduction to Axiom (5): Graphics</title>
		<link>http://amca01.wordpress.com/2008/06/03/an-introduction-to-axiom-5-graphics/</link>
		<comments>http://amca01.wordpress.com/2008/06/03/an-introduction-to-axiom-5-graphics/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 13:27:43 +0000</pubDate>
		<dc:creator>amca01</dc:creator>
				<category><![CDATA[Axiom]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://amca01.wordpress.com/?p=59</guid>
		<description><![CDATA[Moving right on, from http://amca01.wordpress.com/2008/05/29/an-introduction-to-axiom-4/ this post will be a simple introduction to Axiom&#8217;s graphics.
To obtain graphics, you need to run Axiom in Linux, or in windows within an X-windows system, such as Xming.  At the time of writing, there is no native windows graphics subsystem for Axiom.
Having said that, Axiom&#8217;s graphics are sophisticated [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=59&subd=amca01&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Moving right on, from <a href="http://amca01.wordpress.com/2008/05/29/an-introduction-to-axiom-4/">http://amca01.wordpress.com/2008/05/29/an-introduction-to-axiom-4/</a> this post will be a simple introduction to Axiom&#8217;s graphics.</p>
<p>To obtain graphics, you need to run Axiom in Linux, or in windows within an X-windows system, such as Xming.  At the time of writing, there is no native windows graphics subsystem for Axiom.</p>
<p>Having said that, Axiom&#8217;s graphics are sophisticated and powerful.  In the plane you can draw:</p>
<ul>
<li>graphs of functions <img src='http://l.wordpress.com/latex.php?latex=y%3Df%28x%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='y=f(x)' title='y=f(x)' class='latex' /></li>
<li>parametric graphs <img src='http://l.wordpress.com/latex.php?latex=%28x%28t%29%2Cy%28t%29%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='(x(t),y(t))' title='(x(t),y(t))' class='latex' /></li>
<li>graphs defined algebraically <img src='http://l.wordpress.com/latex.php?latex=p%28x%2Cy%29%3D0&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='p(x,y)=0' title='p(x,y)=0' class='latex' /></li>
<li>graphs defined with polar, bipolar, elliptic or parabolic coordinates</li>
</ul>
<p>In three-dimensions, you can have</p>
<ul>
<li>surfaces defined by <img src='http://l.wordpress.com/latex.php?latex=z%3Df%28x%2Cy%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='z=f(x,y)' title='z=f(x,y)' class='latex' /></li>
<li>parametric space curves <img src='http://l.wordpress.com/latex.php?latex=%28x%28t%29%2Cy%28t%29%2Cz%28t%29%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='(x(t),y(t),z(t))' title='(x(t),y(t),z(t))' class='latex' /></li>
<li>surfaces defined parametrically <img src='http://l.wordpress.com/latex.php?latex=%28x%28s%2Ct%29%2Cy%28s%2Ct%29%2Cz%28s%2Ct%29%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='(x(s,t),y(s,t),z(s,t))' title='(x(s,t),y(s,t),z(s,t))' class='latex' /></li>
<li>curves or surfaces defined with other coordinate systems, including cylindrical, spherical, paraboloidal, conical</li>
</ul>
<p>The command to produce any such graphic is <tt>draw</tt>.  The graphic can be changed in numerous ways, either by adding a parameter to the <tt>draw</tt> command, or by using the associated control panel.</p>
<p>Here are two elementary examples: plane curves, one the graph of a cubic polynomial in cartesian coordinates, the other a trisectrix given in polar coordinates:</p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_2d_figs.jpg" alt="Graphs of plane curves in Axiom" /></p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_cubic.jpg" alt="Graph of a cubic polynomial in Axiom" /></p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_trisectrix.jpg" alt="Graph of a trisectrix in Axiom" /></p>
<p>Associated with any such graphic is a control panel, which can be displayed by clicking on the graphic:</p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_2d_ctrl_panel.jpg" alt="2D control panel for Axiom graphics" /></p>
<p>The panel allows you to change the size and position of the graphic, whether or not you want points shown (the default is to show points on the curve), whether or not you want a bounding box, or axes, or scales&#8230;</p>
<p>Now for some three-dimensional surfaces, each one given in the form <img src='http://l.wordpress.com/latex.php?latex=y%3Df%28x%2Cy%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='y=f(x,y)' title='y=f(x,y)' class='latex' />.  The first is Scherk&#8217;s minimal surface, defined implicitly by <img src='http://l.wordpress.com/latex.php?latex=e%5Ez%5Ccos+x%3D%5Ccos+y&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='e^z\cos x=\cos y' title='e^z\cos x=\cos y' class='latex' />, and the second is the &#8220;monkey saddle&#8221; surface defined by <img src='http://l.wordpress.com/latex.php?latex=z%3Dx%5E3-3xy%5E2&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='z=x^3-3xy^2' title='z=x^3-3xy^2' class='latex' />:</p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_3d_figs.jpg" alt="3D surface commands in Axiom" /></p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_scherk.jpg" alt="Scherk's minimal surface in Axiom" /></p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_monkey_saddle.jpg" alt="The monkey saddle surface in Axiom" /></p>
<p>Associated with a 3D graphic is a control panel, which allows you to change much of the appearance of the graphic, as well as its orientation:</p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_3d_ctrl_panel.jpg" alt="the 3D control panel in Axiom" /></p>
<p>A second control panel, accessed from the first, allows you to change the bounds of the graphic, and its perspective:</p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_3d_bounds.jpg" alt="The 3D bounding panel in Axiom" /></p>
<p>It&#8217;s quite easy to build a complicated graphic by plotting several surfaces or shapes on the one set of axes.  The following commands illustrate how to set up a graphic consisting of two interlocked tori:</p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_tori_commands.jpg" alt="Commands for interlocked tori in Axiom" /></p>
<p>and the result:</p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_tori.jpg" alt="Interlocked tori in Axiom" /></p>
<p>Finally, a couple of knots; first a trefoil knot, constructed parametrically with</p>
<p><img src='http://l.wordpress.com/latex.php?latex=x%28t%29%3D%5Csin%28t%29%2B2%5Csin%282t%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='x(t)=\sin(t)+2\sin(2t)' title='x(t)=\sin(t)+2\sin(2t)' class='latex' /></p>
<p><img src='http://l.wordpress.com/latex.php?latex=y%28t%29%3D%5Csin%283t%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='y(t)=\sin(3t)' title='y(t)=\sin(3t)' class='latex' /></p>
<p><img src='http://l.wordpress.com/latex.php?latex=z%28t%29%3D%5Ccos%28t%29-2%5Ccos%282t%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='z(t)=\cos(t)-2\cos(2t)' title='z(t)=\cos(t)-2\cos(2t)' class='latex' /></p>
<p>and a figure of eight knot with</p>
<p><img src='http://l.wordpress.com/latex.php?latex=x%28t%29%3D%282%2B2%5Ccos%282t%29%29%5Ccos%283t%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='x(t)=(2+2\cos(2t))\cos(3t)' title='x(t)=(2+2\cos(2t))\cos(3t)' class='latex' /></p>
<p><img src='http://l.wordpress.com/latex.php?latex=y%28t%29%3D%282%2B2%5Ccos%282t%29%29%5Csin%283t%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='y(t)=(2+2\cos(2t))\sin(3t)' title='y(t)=(2+2\cos(2t))\sin(3t)' class='latex' /></p>
<p><img src='http://l.wordpress.com/latex.php?latex=z%28t%29%3D%5Csin%284t%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='z(t)=\sin(4t)' title='z(t)=\sin(4t)' class='latex' /></p>
<p>(I found these equations at <a href="http://www.infradead.org/~wmp/proj_knots.html">http://www.infradead.org/~wmp/proj_knots.html</a>.)</p>
<p>Here they are:</p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_trefoil.jpg" alt="Trefoil knot in Axiom" /></p>
<p><img src="http://amca01.files.wordpress.com/2008/06/axiom_figure8.jpg" alt="Figure of eight knot in Axiom" /></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amca01.wordpress.com/59/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amca01.wordpress.com/59/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amca01.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amca01.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amca01.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amca01.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amca01.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amca01.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amca01.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amca01.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amca01.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amca01.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=59&subd=amca01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amca01.wordpress.com/2008/06/03/an-introduction-to-axiom-5-graphics/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6bb720c28219294cf31d0693ed47388?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">amca01</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_2d_figs.jpg" medium="image">
			<media:title type="html">Graphs of plane curves in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_cubic.jpg" medium="image">
			<media:title type="html">Graph of a cubic polynomial in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_trisectrix.jpg" medium="image">
			<media:title type="html">Graph of a trisectrix in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_2d_ctrl_panel.jpg" medium="image">
			<media:title type="html">2D control panel for Axiom graphics</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_3d_figs.jpg" medium="image">
			<media:title type="html">3D surface commands in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_scherk.jpg" medium="image">
			<media:title type="html">Scherk's minimal surface in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_monkey_saddle.jpg" medium="image">
			<media:title type="html">The monkey saddle surface in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_3d_ctrl_panel.jpg" medium="image">
			<media:title type="html">the 3D control panel in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_3d_bounds.jpg" medium="image">
			<media:title type="html">The 3D bounding panel in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_tori_commands.jpg" medium="image">
			<media:title type="html">Commands for interlocked tori in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_tori.jpg" medium="image">
			<media:title type="html">Interlocked tori in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_trefoil.jpg" medium="image">
			<media:title type="html">Trefoil knot in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/06/axiom_figure8.jpg" medium="image">
			<media:title type="html">Figure of eight knot in Axiom</media:title>
		</media:content>
	</item>
		<item>
		<title>An introduction to Axiom (4): Lists and matrices</title>
		<link>http://amca01.wordpress.com/2008/05/29/an-introduction-to-axiom-4/</link>
		<comments>http://amca01.wordpress.com/2008/05/29/an-introduction-to-axiom-4/#comments</comments>
		<pubDate>Thu, 29 May 2008 11:18:49 +0000</pubDate>
		<dc:creator>amca01</dc:creator>
				<category><![CDATA[Axiom]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://amca01.wordpress.com/?p=53</guid>
		<description><![CDATA[Following on from http://amca01.wordpress.com/2008/05/26/an-introduction-to-axiom-3/,
here&#8217;s the fourth installment &#8211; lists, matrices and linear algebra.
Lists are a standard data structure in most CAS&#8217;s, and Axiom is no exception.  A list is delineated with square brackets, and can either be defined by listing it in full, or by iterating a function over a range of integers.
Given a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=53&subd=amca01&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Following on from <a href="http://amca01.wordpress.com/2008/05/26/an-introduction-to-axiom-3/">http://amca01.wordpress.com/2008/05/26/an-introduction-to-axiom-3/</a>,<br />
here&#8217;s the fourth installment &#8211; lists, matrices and linear algebra.</p>
<p>Lists are a standard data structure in most CAS&#8217;s, and Axiom is no exception.  A list is delineated with square brackets, and can either be defined by listing it in full, or by iterating a function over a range of integers.</p>
<p>Given a list <tt>X</tt>, its <tt>i</tt>-th element is obtained with <tt>X.i</tt>.  The first examples show the creation of a list, and some operations on it:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_lists.jpg" alt="Lists in Axiom" /></p>
<p>There are a few things to note here:</p>
<ul>
<li><tt>reduce</tt> extends a binary operation to a list, working its way through the list taking an extra element each time.</li>
<li>The final operation shows an example of an &#8220;anonymous function&#8221;; that is, a function which hasn&#8217;t been given a name.  The use of the <tt>+-&gt;</tt> is useful when you want to use a function &#8220;on the fly&#8221; or when you are only to going to need it once.  The last operation could have been done with
<p><code>f(x)==x^2+1<br />
map(f,L)<br />
</code></p>
<p>but that requires defining  function first.</li>
</ul>
<p>Matrices are defined as lists of lists.  All arithmetic is supported, and inversion, if the matrix is square and non-singular.</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_matrices.jpg" alt="Matrices in Axiom" /></p>
<p>Here&#8217;s a matrix inversion, with a coercion to a matrix of floats:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_matrix_inverse.jpg" alt="Matrix inversion in Axiom" /></p>
<p>Axiom can do all the things you&#8217;d expect on matrices: find the determinant and permanent, eigenvalues and eigenvectors, row-echelon form, null space&#8230; To finish here, a little example of the Cayley-Hamilton theorem, and a solution of a set of linear equations, using matrices:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_char_poly.jpg" alt="The Cayley-Hamilton theorem in Axiom" /></p>
<p>The output of the last command is given using Axiom&#8217;s <tt>Record</tt> data structure.  To isolate individual parts of this output, we refer to them by name.  So to obtain the <tt>y</tt> value (the second value), we would use</p>
<p><code>%%(64).particular.2</code></p>
<p>Here the &#8220;particular&#8221; is a particular example of a solution, and &#8220;basis&#8221; the basis for the set of solutions.  This is an easy and elegant way of describing multiple solutions to a linear system.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amca01.wordpress.com/53/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amca01.wordpress.com/53/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amca01.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amca01.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amca01.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amca01.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amca01.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amca01.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amca01.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amca01.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amca01.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amca01.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=53&subd=amca01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amca01.wordpress.com/2008/05/29/an-introduction-to-axiom-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6bb720c28219294cf31d0693ed47388?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">amca01</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_lists.jpg" medium="image">
			<media:title type="html">Lists in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_matrices.jpg" medium="image">
			<media:title type="html">Matrices in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_matrix_inverse.jpg" medium="image">
			<media:title type="html">Matrix inversion in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_char_poly.jpg" medium="image">
			<media:title type="html">The Cayley-Hamilton theorem in Axiom</media:title>
		</media:content>
	</item>
		<item>
		<title>An introduction to Axiom (3): Calculus</title>
		<link>http://amca01.wordpress.com/2008/05/26/an-introduction-to-axiom-3/</link>
		<comments>http://amca01.wordpress.com/2008/05/26/an-introduction-to-axiom-3/#comments</comments>
		<pubDate>Mon, 26 May 2008 13:24:14 +0000</pubDate>
		<dc:creator>amca01</dc:creator>
				<category><![CDATA[Axiom]]></category>

		<guid isPermaLink="false">http://amca01.wordpress.com/?p=46</guid>
		<description><![CDATA[This is the third in a sequence of posts about the open source CAS Axiom. The previous post can be found at http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-2/.
In this post I shall be looking at Axiom&#8217;s calculus abilities, starting with every beginning student&#8217;s love, limits:

Note here the use of %plusInfinity which is positive infinity.  Axiom also has %minusInfinity.  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=46&subd=amca01&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is the third in a sequence of posts about the open source CAS Axiom. The previous post can be found at <a href="http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-2/">http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-2/</a>.</p>
<p>In this post I shall be looking at Axiom&#8217;s calculus abilities, starting with every beginning student&#8217;s love, limits:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_limits.jpg" alt="Limits in Axiom" /></p>
<p>Note here the use of <tt>%plusInfinity</tt> which is positive infinity.  Axiom also has <tt>%minusInfinity</tt>.  Limits are also possible for complex variables, using <tt>complexLimit</tt>, and <tt>%infinity</tt> for complex infinity.</p>
<p>After limits there are derivatives, implemented in Axiom with <tt>D</tt>.  A third optional parameter gives the order of the derivative:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_derivs.jpg" alt="Derivatives in Axiom" /></p>
<p>Integration is performed with the <tt>integrate</tt> command.  Sometimes Axiom gets worried that an integrand may have a pole in the region of integration, in which case the addition of the string <tt>"noPole"</tt> will alleviate its fears:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_integrate.jpg" alt="Integration in Axiom" /></p>
<p>Now for some series.  There are several different commands for producing a power series, of which <tt>series</tt> is the most general.  The following three commands show some of the power of Axiom&#8217;s type system.  Since the first two outputs are of type <tt>UnivariatePuiseuxSeries</tt>, arithmetic on them will produce an output also of that type.  Thus the division command produces the series for <img src='http://l.wordpress.com/latex.php?latex=%5Ctan%28x%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='\tan(x)' title='\tan(x)' class='latex' />:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_series.jpg" alt="Series in Axiom" /></p>
<p>As an example of Axiom&#8217;s calculus power, let&#8217;s use the <tt>series</tt> command as a generating function.  In particular we shall construct the Euler polynomials<br />
<img src='http://l.wordpress.com/latex.php?latex=E_n%28x%29&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='E_n(x)' title='E_n(x)' class='latex' /> defined by</p>
<p><img src='http://l.wordpress.com/latex.php?latex=%5Cdisplaystyle%7B%5Cfrac%7B2e%5E%7Bxt%7D%7D%7Be%5Et%2B1%7D%3D%5Csum%5E%5Cinfty_%7Bn%3D0%7DE_n%28x%29%5Cfrac%7Bt%5En%7D%7Bn%21%7D%7D.&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='\displaystyle{\frac{2e^{xt}}{e^t+1}=\sum^\infty_{n=0}E_n(x)\frac{t^n}{n!}}.' title='\displaystyle{\frac{2e^{xt}}{e^t+1}=\sum^\infty_{n=0}E_n(x)\frac{t^n}{n!}}.' class='latex' /></p>
<p>So first create the series, and then extract a particular polynomial from it:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_generating.jpg" alt="A generating function in Axiom" /></p>
<p>Finally, some differential equations.  Note the use of the <tt>solve</tt> command &#8211; since the equation to be solved is a differential equation, <tt>solve</tt>produces an appropriate solution.  The main thing to note here is the prior definition of the unknown function as an operator:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_de.jpg" alt="Differential equations in Axiom" /></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amca01.wordpress.com/46/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amca01.wordpress.com/46/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amca01.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amca01.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amca01.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amca01.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amca01.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amca01.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amca01.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amca01.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amca01.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amca01.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=46&subd=amca01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amca01.wordpress.com/2008/05/26/an-introduction-to-axiom-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6bb720c28219294cf31d0693ed47388?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">amca01</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_limits.jpg" medium="image">
			<media:title type="html">Limits in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_derivs.jpg" medium="image">
			<media:title type="html">Derivatives in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_integrate.jpg" medium="image">
			<media:title type="html">Integration in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_series.jpg" medium="image">
			<media:title type="html">Series in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_generating.jpg" medium="image">
			<media:title type="html">A generating function in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_de.jpg" medium="image">
			<media:title type="html">Differential equations in Axiom</media:title>
		</media:content>
	</item>
		<item>
		<title>An introduction to Axiom (2): Algebra</title>
		<link>http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-2/</link>
		<comments>http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-2/#comments</comments>
		<pubDate>Sun, 25 May 2008 06:51:42 +0000</pubDate>
		<dc:creator>amca01</dc:creator>
				<category><![CDATA[Axiom]]></category>

		<guid isPermaLink="false">http://amca01.wordpress.com/?p=42</guid>
		<description><![CDATA[This is the second in a sequence of posts about the open source CAS Axiom.  The first can be found at http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-1/
Axiom variables are created using the &#8220;colon equals&#8221; method of many other computer languages, and user defined functions with a double equals:

Note that for the last example, the expression involving radicals can be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=42&subd=amca01&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is the second in a sequence of posts about the open source CAS Axiom.  The first can be found at <a href="http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-1/">http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-1/</a></p>
<p>Axiom variables are created using the &#8220;colon equals&#8221; method of many other computer languages, and user defined functions with a double equals:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_vars_ftns.jpg" alt="Variables and functions in Axiom" /></p>
<p>Note that for the last example, the expression involving radicals can be simplified directly, but it requires playing around with types.</p>
<p>Expansion, factorization and simplification of all sorts of expressions can be accomplished easily:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_algebra.jpg" alt="Algebra in Axiom" /></p>
<p>Axiom has powerful algorithms to solve polynomial equations, systems of polynomials, and linear system.  There are in fact several different solve functions:</p>
<dl>
<dt><tt>solve</tt></dt>
<dd>Basic solve function: will produce real solutions.  The precision of the solution can be adjusted by including an extra parameter</dd>
<dt><tt>complexSolve</tt></dt>
<dd>The complex version of <tt>solve</tt> &#8211; will produce complex solutions, also with an adjustable numerical precision</dd>
<dt><tt>radicalSolve</tt></dt>
<dd>As its name implies, solutions in the form of radicals, if such can be found.</dd>
</dl>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_solve.jpg" alt="Solving equations in Axiom" /></p>
<p>Note that <tt>solve</tt> will in general produce numeric solutions, unless the equations are linear.  When the precision is given, the list of variables need not be given explicitly, as, according to the documentation: &#8220;The list of variables would be redundant information since there can be no parameters for the numerical solver.&#8221;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amca01.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amca01.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amca01.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amca01.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amca01.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amca01.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amca01.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amca01.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amca01.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amca01.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amca01.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amca01.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=42&subd=amca01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6bb720c28219294cf31d0693ed47388?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">amca01</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_vars_ftns.jpg" medium="image">
			<media:title type="html">Variables and functions in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_algebra.jpg" medium="image">
			<media:title type="html">Algebra in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_solve.jpg" medium="image">
			<media:title type="html">Solving equations in Axiom</media:title>
		</media:content>
	</item>
		<item>
		<title>An introduction to Axiom (1): The basics</title>
		<link>http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-1/</link>
		<comments>http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-1/#comments</comments>
		<pubDate>Sat, 24 May 2008 15:05:34 +0000</pubDate>
		<dc:creator>amca01</dc:creator>
				<category><![CDATA[Axiom]]></category>

		<guid isPermaLink="false">http://amca01.wordpress.com/?p=32</guid>
		<description><![CDATA[This is the first of what I intend to be a series of posts, exploring the open source computer algebra system Axiom.  Maxima has already been extremely well described on math-blog.  I hope to do something similar for Axiom, but over several posts.
Obtaining and using Axiom
First: go to http://www.axiom-developer.org/ for a description and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=32&subd=amca01&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is the first of what I intend to be a series of posts, exploring the open source computer algebra system Axiom.  Maxima has already been extremely well described on <a href="http://math-blog.com/2007/06/04/a-10-minute-tutorial-for-solving-math-problems-with-maxima/">math-blog</a>.  I hope to do something similar for Axiom, but over several posts.</p>
<p><strong>Obtaining and using Axiom</strong></p>
<p>First: go to <a href="http://www.axiom-developer.org/">http://www.axiom-developer.org/</a> for a description and discussion, and then go to <a href="http://www.axiom-developer.org/axiom-website/download.html">http://www.axiom-developer.org/axiom-website/download.html</a> to find and download some binaries.  Axiom works best under linux.  Under windows you have several choices: you can run a native binary in console mode only, without graphics, or you can run Axiom inside an X-windows server for Windows such as <a href="http://www.straightrunning.com/XmingNotes/">Xming</a>.  The best interface for Axiom is to use it as a session within the <a href="http://www.texmacs.org">TeXmacs</a> editor.  Screenshots of this can be seen <a href="http://www.axiom-developer.org/axiom-website/screenshots.html">here</a>.</p>
<p><strong>A note on Axiom and its forks</strong></p>
<p>Owing to some disagreement among Axiom developers, the original Axiom has spawned two forks: <a href="http://fricas.sourceforge.net/">FriCAS</a>, and <a href="http://www.open-axiom.org/">OpenAxiom</a>.  From the users&#8217; point of view, there is not much to choose between the three.  However, the development models and goals of the three are very different:</p>
<ol>
<li>Axiom &#8220;is intended to support educational and research objectives&#8221;, and aims to be very slow and careful in its development, using literate programming, so the development done now will still be useful and readable in 30 years time.  Thus Axiom puts great stress on provable correctness of algorithms, and readability of code.  This can make adding new material non-trivial.</li>
<li>FriCAS &#8220;will use lightweight developement, allowing much faster evolution.&#8221;  Also, FriCAS &#8220;add hooks which make adding alternative user interfaces easier.&#8221;  FriCAS aims to be more user friendly than its parent, and in particular easier to extend.</li>
<li>OpenAxiom &#8220;aims at being the open source computer algebra system of choice for research, teaching, engineering, etc.&#8221;  It differs from its parent in technical details.</li>
</ol>
<p>I will use the term &#8220;Axiom&#8221; to mean either the original Axiom, or the user experience of using any of its forks.</p>
<p>In these posts, Axiom will be presented as a sequence of images, showing Axiom output TeX-ed up to look good.  This is similar to what you would obtain using TeXmacs.</p>
<p>One very important aspect of Axiom is that it uses <em>types</em> extensively.  Everything you do in Axiom takes an input of one of the many types defined in Axiom, and produces an output of a particular type.  One of the greatest difficulties for the beginner (well, it was certainly hard for me!) is making sense of the types, and ensuring that your input type is commensurate with the mathematics you are trying to do with it.  But this is also one of Axiom&#8217;s greatest strengths.</p>
<p>But let&#8217;s start simply: Axiom can be used like a calculator:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_start.jpg" alt="Basic maths in Axiom" /></p>
<p>Axiom has all the standard functions:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_std_ftns.jpg" alt="Standard functions in Axiom" /></p>
<p>Note that <tt>%pi</tt> produces <img src='http://l.wordpress.com/latex.php?latex=%5Cpi&#038;bg=ffffff&#038;fg=333333&#038;s=0' alt='\pi' title='\pi' class='latex' />, and <tt>%i</tt> the imaginary unit.  Other constants include various infinities, which I&#8217;ll talk about in a further post.</p>
<p>Note that Axiom, like most computer algebra systems, will attempt to give a result in closed (symbolic) form.  To force a floating point output, you need to include a floating point input, or use the <tt>numeric</tt> function, or coerce your input to be of type <tt>Float</tt>.  (I&#8217;ll discuss types and coercion in a later post.)</p>
<p>Axiom has no trouble with integers of arbitrary size:</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_large_int.jpg" alt="Large integers in Axiom" /></p>
<p>And Axiom can produce numeric output to arbitrary precision.  The number of digits displayed is set by the <tt>digits</tt> function.  The last two commands here are classic examples of &#8220;near integer&#8221; computations.</p>
<p><img src="http://amca01.files.wordpress.com/2008/05/axiom_arb_prec.jpg" alt="Arbitrary precision in Axiom" /></p>
<p>The next post can be found at <a href="http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-2/">http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-2/</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amca01.wordpress.com/32/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amca01.wordpress.com/32/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amca01.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amca01.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amca01.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amca01.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amca01.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amca01.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amca01.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amca01.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amca01.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amca01.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=32&subd=amca01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amca01.wordpress.com/2008/05/25/an-introduction-to-axiom-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6bb720c28219294cf31d0693ed47388?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">amca01</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_start.jpg" medium="image">
			<media:title type="html">Basic maths in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_std_ftns.jpg" medium="image">
			<media:title type="html">Standard functions in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_large_int.jpg" medium="image">
			<media:title type="html">Large integers in Axiom</media:title>
		</media:content>

		<media:content url="http://amca01.files.wordpress.com/2008/05/axiom_arb_prec.jpg" medium="image">
			<media:title type="html">Arbitrary precision in Axiom</media:title>
		</media:content>
	</item>
		<item>
		<title>Newton&#8217;s method in Axiom</title>
		<link>http://amca01.wordpress.com/2008/03/31/newton-in-axiom/</link>
		<comments>http://amca01.wordpress.com/2008/03/31/newton-in-axiom/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 00:26:23 +0000</pubDate>
		<dc:creator>amca01</dc:creator>
				<category><![CDATA[Axiom]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://amca01.wordpress.com/?p=9</guid>
		<description><![CDATA[I have just written about the freeware CAS Maxima; this time it&#8217;s about Axiom.  Axiom differs from most CAS&#8217;s in being strongly typed, in that each expression belongs to a particular type, such as the integers, or polynomials, or finite fields.  One of the difficulties for a beginner with Axiom is using types [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=9&subd=amca01&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have just written about the freeware CAS Maxima; this time it&#8217;s about <a href="http://www.axiom-developer.org/" title="Axiom">Axiom</a>.  Axiom differs from most CAS&#8217;s in being strongly typed, in that each expression belongs to a particular type, such as the integers, or polynomials, or finite fields.  One of the difficulties for a beginner with Axiom is using types correctly.</p>
<p>As with Maxima,  here is a very small example: Newton&#8217;s method interactively:</p>
<p>First define the function:</p>
<pre>
(1) -&gt; f:=x^5+x^2-1

         5    2
   (1)  x  + x  - 1

                     Type: Polynomial Integer</pre>
<p>and its derivative</p>
<pre>
(2) -&gt; d:=D(f,x)

          4
   (2)  5x  + 2x

                     Type: Polynomial Integer</pre>
<p>Now put them together as in a Newton&#8217;s method, where <code>function</code> turns an expression into a function (similar in some respects to Maple&#8217;s <code>unapply</code>):</p>
<pre>(3) -&gt; function(x-f/d,'nr,'x)

   (3)  nr
                     Type: Symbol</pre>
<p>And now, starting with 0.8, we can obtain iterations:</p>
<pre>(4) -&gt; nr(0.8)

Compiling function nr with type Float -&gt; Float

   (4)  0.8088596491 2280701754
                     Type: Float
(5) -&gt; nr(%)

   (5)  0.8087306283 5888432463
                     Type: Float

(6) -&gt; nr(%)

   (6)  0.8087306004 7939331516
                     Type: Float

(7) -&gt; nr(%)

   (7)  0.8087306004 7939201374
                     Type: Float

(8) -&gt; nr(%)

   (8)  0.8087306004 7939201374
                     Type: Float</pre>
<p>And there we are!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/amca01.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/amca01.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/amca01.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/amca01.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/amca01.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/amca01.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/amca01.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/amca01.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/amca01.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/amca01.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/amca01.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/amca01.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=amca01.wordpress.com&blog=3321115&post=9&subd=amca01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://amca01.wordpress.com/2008/03/31/newton-in-axiom/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6bb720c28219294cf31d0693ed47388?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">amca01</media:title>
		</media:content>
	</item>
	</channel>
</rss>