login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

This is a test of Sage
in MathAction.

Sage stands for:

  Software for Algebra and Geometry Experimentation

Sage has native computer algebra capabilities as well as interfaces to other systems such as GAP , PARI , Singular and Maxima.

Sage was recently extended (version 1.4.1.2) to include support for Axiom.

Here is a summary of features


This is how to enter Sage commands:

  Commands can be used inline, for example: $1+2=\sage{1+2}$ and $\sqrt{1+2}=\sage{sqrt(1+2)}$.
  Or we can evaluate a block of Sage commands:
  \begin{sageblock}
  # do some stuff
  E = EllipticCurve("37a")
  # more stuff
  \end{sageblock}

  Now the elliptic curve $E$ given by $\sage{E}$
  has discriminant $\sage{E.discriminant()}$.

To get this:

Commands can be used inline, for example: $1+2=\sage{1+2}$ and $\sqrt{1+2}=\sage{sqrt(1+2)}$. Or we can evaluate a block of Sage commands:

\begin{sageblock} # do some stuff E = EllipticCurve?("36a") # more stuff \end{sageblock}

Now the elliptic curve $E$ given by $\sage{E}$ has discriminant $\sage{E.discriminant()}$.

Maxima commands in Sage look like this:

\begin{sageblock} f = maxima(sin(x)^2*cos(x)*exp(x)+a*y) g = f.integrate("x") \end{sageblock}

The \sage commands can occur in other LaTeX contexts such as:

  \begin{equation}
     \int \sage{f} dx = \sage{g}.
  \end{equation}

This produces:

\begin{equation} \label{eq1} \int \sage{f} dx = \sage{g}. \end{equation}

---------

Axiom commands in Sage look like this:

\begin{sageblock} fAxiom = axiom(sin(x)^2*cos(x)*x) gAxiom = fAxiom.integrate("x") \end{sageblock}

The \sage commands can occur in other LaTeX contexts such as:

  \begin{equation}
     {\int \sage{fAxiom} dx} = {\sage{gAxiom}}.
  \end{equation}

This produces:

\begin{equation} \label{eq2} {\int \sage{fAxiom} dx} = {\sage{gAxiom}}. \end{equation}

Using Axiom to guess integer sequences:

\begin{sageblock} f = axiom('(guess [2,4,6]?).1.function') \end{sageblock}

Gives: $$ \sage{f} $$

---------

Sage and literate programming --Bill Page, Wed, 16 Aug 2006 08:17:56 -0500 reply
Sage also works in pamphlet files. See SandBoxSagePamphlet


Some or all expressions may not have rendered properly, because Latex returned the following error:
sage: unset PYTHONPATH; PATH=/usr/local/bin:$PATH HOME=/var/lib/zope sage 1433308504340526167-16.0px.sage
Traceback (most recent call last):
  File "1433308504340526167-16.0px.py", line 28, in <module>
    sagetex.inline(fAxiom)
  File "/var/zope2/var/LatexWiki/sagetex.py", line 8, in inline
    file.write(\sage@out{ + latex(s) + }\n)
  File "/home/page/sage-3.4-linux-Debian_GNU_Linux_4.0_etch-x86_64-Linux/local/lib/python2.5/site-packages/sage/misc/latex.py", line 140, in latex
    return LatexExpr(x.latex())
  File "/home/page/sage-3.4-linux-Debian_GNU_Linux_4.0_etch-x86_64-Linux/local/lib/python2.5/site-packages/sage/interfaces/axiom.py", line 706, in latex
    raise RuntimeError, "Error texing axiom object."
RuntimeError: Error texing axiom object.




  Subject:   Be Bold !!
  ( 7 subscribers )  
Please rate this page: