diff options
author | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
commit | ab8cc85adde879fb963c94d15675783f2cf4b183 (patch) | |
tree | c202482327f474583b750b2c45dedfc4e4312b1d /src/input/expr.input.pamphlet | |
download | open-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz |
Initial population.
Diffstat (limited to 'src/input/expr.input.pamphlet')
-rw-r--r-- | src/input/expr.input.pamphlet | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/input/expr.input.pamphlet b/src/input/expr.input.pamphlet new file mode 100644 index 00000000..297ee273 --- /dev/null +++ b/src/input/expr.input.pamphlet @@ -0,0 +1,58 @@ +\documentclass{article} +\usepackage{axiom} +\begin{document} +\title{\$SPAD/src/input expr.input} +\author{The Axiom Team} +\maketitle +\begin{abstract} +\end{abstract} +\eject +\tableofcontents +\eject +<<*>>= +)clear all +foo := operator 'foo +bar := operator 'bar +g := foo x +eval(g, x = x**2 + 1) +-- chain rule can be applied formally +differentiate(%, x) +-- multivariate +f := bar(x, y) +-- parallel substitution is possible +eval(f, [x = y, y = x]) +[differentiate(f, x), differentiate(f, y)] +-- multivariate chain rule +ff := eval(f, [x = x**2 * foo y, y = x + y]) +differentiate(ff, x) +differentiate(ff, y) +-- let's create one with commuting partial derivatives +-- let's change the way bar is printed on the screen, make it #1 @ #2 +pbar(l:List OUTFORM):OUTFORM == infix(" @ "::SYMBOL::OUTFORM, l) +display(bar, pbar) +-- let's see the result +f +ff +-- back to normal +deleteProperty(bar, "%display") +f +-- let's give bar some partial derivatives, say bar(u, v) = u * v +bar1 l == last l +bar2 l == first l +derivative(bar, [bar1, bar2]$(LIST(LIST(EXPR INT) -> EXPR INT))) +[differentiate(f, x), differentiate(f, y)] +[differentiate(ff, x), differentiate(ff, y)] +-- some structural testing +h := inv(x + f + g**2) +isPower h +y * g**2 * h +isTimes % +isPlus(denom(h)::EXPR(INT)) +isExpt(inv(g**2), "foo") +isExpt(inv(g**2), "bar") +@ +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document} |