diff --git a/buglist b/buglist index db40e08..e46bd2c 100644 --- a/buglist +++ b/buglist @@ -1,6 +1,6 @@ ========================================================================= -bug 7259: +bug 7260: todo 336: wish 1012: meh 5: @@ -11,6 +11,12 @@ typos 40363: dup 50006: nonextend 60077: +========================================================================= +bug 7259: + +x:=taylor 'x +y:=taylor 'y +sinh(x)*cosh(y) ========================================================================= wish 1011: sum(1/(k+a), k=1..n) by Gosper's method diff --git a/changelog b/changelog index 17ac1bb..49887d8 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +20140825 tpd src/axiom-website/patches.html 20140825.01.tpd.patch +20140825 tpd buglist add 7259 from taylorseries.input +20140825 tpd src/input/Makefile add taylorseries.input +20140825 tpd src/input/taylorseries.input added regression test 20140808 tpd src/axiom-website/patches.html 20140808.01.tpd.patch 20140808 tpd books/bookvolbib add bibliographic references 20140807 tpd src/axiom-website/patches.html 20140807.01.tpd.patch diff --git a/patch b/patch index 6c307c9..b98bb6a 100644 --- a/patch +++ b/patch @@ -1,4 +1,3 @@ -books/bookvolbib add bibliographic references +src/input/taylorseries.input add taylor series regression test -add addition bibliographic references, some from Raoul Bourquin, -in the subsection on integration. +Ralf Hemmecke / Bill Page taylor series regression test diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index ea43c65..44d2389 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -4608,6 +4608,8 @@ merge and remove include, lib, and clef into books
books/bookvolbib add bibliographic references
20140808.01.tpd.patch books/bookvolbib add bibliographic references
+20140825.01.tpd.patch +src/input/taylorseries.input added regression test
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet index 2eb34d7..a3f5411 100644 --- a/src/input/Makefile.pamphlet +++ b/src/input/Makefile.pamphlet @@ -406,7 +406,8 @@ REGRESSTESTS= ackermann.regress \ stbl.regress stream2.regress stream.regress streams.regress \ string.regress strtbl.regress subset.regress summation.regress \ symbol.regress t111293.regress table.regress tancot.regress \ - tanhcoth.regress tanatan.regress tbagg.regress telford.regress \ + tanhcoth.regress tanatan.regress taylorseries.regress \ + tbagg.regress telford.regress \ test.regress testpackage.regress \ testprob.regress textfile.regress torus.regress tuplebug.regress \ tpiezas001.regress \ @@ -918,7 +919,8 @@ FILES= ${OUT}/ackermann.input \ ${OUT}/symbol.input \ ${OUT}/synonym.input ${OUT}/t111293.input \ ${OUT}/table.input ${OUT}/tancot.input ${OUT}/tanhcoth.input \ - ${OUT}/tanatan.input ${OUT}/tbagg.input ${OUT}/telford.input \ + ${OUT}/tanatan.input ${OUT}/taylorseries.input \ + ${OUT}/tbagg.input ${OUT}/telford.input \ ${OUT}/test.input ${OUT}/testpackage.input \ ${OUT}/testprob.input \ ${OUT}/tetra.input ${OUT}/textfile.input ${OUT}/tknot.input \ @@ -1439,6 +1441,7 @@ DOCFILES= \ ${DOC}/synonym.input.dvi ${DOC}/t111293.input.dvi \ ${DOC}/table.input.dvi ${DOC}/tanatan.input.dvi \ ${DOC}/tancot.input.dvi ${DOC}/tanhcoth.input.dvi \ + ${DOC}/taylorseries.input.dvi \ ${DOC}/tbagg.input.dvi ${DOC}/telford.input.dvi \ ${DOC}/test.input.dvi ${DOC}/tetra.input.dvi \ ${DOC}/textfile.input.dvi ${DOC}/tknot.input.dvi \ diff --git a/src/input/taylorseries.input.pamphlet b/src/input/taylorseries.input.pamphlet new file mode 100644 index 0000000..2414ef1 --- /dev/null +++ b/src/input/taylorseries.input.pamphlet @@ -0,0 +1,245 @@ +article{\documentclass} +\usepackage{axiom} +\setlength{\textwidth}{400pt} +\begin{document} +\title{\$SPAD/src/input taylorseries.input} +\author{Ralf Hemmecke and Bill Page} +\maketitle +\begin{abstract} +\end{abstract} +\eject +\tableofcontents +\eject +\begin{chunk}{*} +)set break resume +)spool taylorseries.output +)set message test on +)set message auto off +)clear all + +\end{chunk} +This is a simple power series expansion of $sinh(x)$ +\begin{chunk}{*} +--S 1 of 22 +x:=taylor 'x +--R +--R +--R (1) x +--R Type: UnivariateTaylorSeries(Expression(Integer),x,0) +--E 1 + +--S 2 of 22 +sinh(x) +--R +--R +--R 1 3 1 5 1 7 1 9 11 +--R (2) x + - x + --- x + ---- x + ------ x + O(x ) +--R 6 120 5040 362880 +--R Type: UnivariateTaylorSeries(Expression(Integer),x,0) +--E 2 + +\end{chunk} +We can be explicit about the coefficient domain +\begin{chunk}{*} +--S 3 of 22 +Z ==> Integer +--R +--R Type: Void +--E 3 + +--S 4 of 22 +Q ==> Fraction Z +--R +--R Type: Void +--E 4 + +--S 5 of 22 +Ux ==> UnivariateTaylorSeries(Q,'x,0) +--R +--R Type: Void +--E 5 + +--S 6 of 22 +ux: Ux := 'x +--R +--R +--R (6) x +--R Type: UnivariateTaylorSeries(Fraction(Integer),x,0) +--E 6 + +--S 7 of 22 +sinh(ux) +--R +--R +--R 1 3 1 5 1 7 1 9 11 +--R (7) x + - x + --- x + ---- x + ------ x + O(x ) +--R 6 120 5040 362880 +--R Type: UnivariateTaylorSeries(Fraction(Integer),x,0) +--E 7 + +\end{chunk} +The interpreter can build a univariate power series in $y$ +with coefficients that are univariate power series in $x$ +that have rational coefficients. That is, +\[Q[[x]][[y]]\] +\begin{chunk}{*} +--S 8 of 22 +Uy ==> UnivariateTaylorSeries(Q,'y,0) +--R +--R Type: Void +--E 8 + +--S 9 of 22 +uy: Uy := 'y +--R +--R +--R (9) y +--R Type: UnivariateTaylorSeries(Fraction(Integer),y,0) +--E 9 + +--S 10 of 22 +cosh(uy) +--R +--R +--R 1 2 1 4 1 6 1 8 1 10 11 +--R (10) 1 + - y + -- y + --- y + ----- y + ------- y + O(y ) +--R 2 24 720 40320 3628800 +--R Type: UnivariateTaylorSeries(Fraction(Integer),y,0) +--E 10 + +--S 11 of 22 +sinh(ux)*cosh(uy) +--R +--R +--RDaly Bug +--R >> System error: +--R Caught fatal error [memory may be damaged] +--R +--R Continuing to read the file... +--R +--E 11 + +\end{chunk} +TaylorSeries(Q) is similar to Polynomial(Q), a power series +over $Q$ in infinitely many variables. +\begin{chunk}{*} +--S 12 of 22 +T ==> TaylorSeries Q +--R +--R Type: Void +--E 12 + +--S 13 of 22 +tx:T := 'x +--R +--R +--R (12) x +--R Type: TaylorSeries(Fraction(Integer)) +--E 13 + +--S 14 of 22 +ty:T := 'y +--R +--R +--R (13) y +--R Type: TaylorSeries(Fraction(Integer)) +--E 14 + +--S 15 of 22 +sinh(tx)*cosh(ty) +--R +--R +--R (14) +--R 1 2 1 3 1 4 1 3 2 1 5 +--R x + (- x y + - x ) + (-- x y + -- x y + --- x ) +--R 2 6 24 12 120 +--R + +--R 1 6 1 3 4 1 5 2 1 7 +--R (--- x y + --- x y + --- x y + ---- x ) +--R 720 144 240 5040 +--R + +--R 1 8 1 3 6 1 5 4 1 7 2 1 9 +--R (----- x y + ---- x y + ---- x y + ----- x y + ------ x ) + O(11) +--R 40320 4320 2880 10080 362880 +--R Type: TaylorSeries(Fraction(Integer)) +--E 15 + +\end{chunk} +It is possible to create multivariate power series in a given +number of variables. The domain $M$ below is modelled as a +univariate power series over bivariate polynomials with the +$n^{th}$ coefficient of the series is a polynomial +consisting of all (bivariate) terms of degree $n$. + +First we create a bivariate polynomial domain. +\begin{chunk}{*} +--S 16 of 22 +vl: List Symbol := ['x, 'y] +--R +--R +--R (15) [x,y] +--R Type: List(Symbol) +--E 16 + +--S 17 of 22 +V ==> OrderedVariableList vl +--R +--R Type: Void +--E 17 + +--S 18 of 22 +P ==> SparseMultivariatePolynomial(Q,V) +--R +--R Type: Void +--E 18 + +--S 19 of 22 +M ==> SparseMultivariateTaylorSeries(Q,V,P) +--R +--R Type: Void +--E 19 + +--S 20 of 22 +X: M := monomial(1$M, 'x, 1) +--R +--R +--R (19) x +--RType: SparseMultivariateTaylorSeries(Fraction(Integer),OrderedVariableList([x,y]),SparseMultivariatePolynomial(Fraction(Integer),OrderedVariableList([x,y]))) +--E 20 + +--S 21 of 22 +Y: M := monomial(1$M, 'y, 1) +--R +--R +--R (20) y +--RType: SparseMultivariateTaylorSeries(Fraction(Integer),OrderedVariableList([x,y]),SparseMultivariatePolynomial(Fraction(Integer),OrderedVariableList([x,y]))) +--E 21 + +--S 22 of 22 +sinh(X)*cosh(Y) +--R +--R +--R (21) +--R 1 3 1 2 1 5 1 2 3 1 4 +--R x + (- x + - y x) + (--- x + -- y x + -- y x) +--R 6 2 120 12 24 +--R + +--R 1 7 1 2 5 1 4 3 1 6 +--R (---- x + --- y x + --- y x + --- y x) +--R 5040 240 144 720 +--R + +--R 1 9 1 2 7 1 4 5 1 6 3 1 8 +--R (------ x + ----- y x + ---- y x + ---- y x + ----- y x) + O(11) +--R 362880 10080 2880 4320 40320 +--RType: SparseMultivariateTaylorSeries(Fraction(Integer),OrderedVariableList([x,y]),SparseMultivariatePolynomial(Fraction(Integer),OrderedVariableList([x,y]))) +--E 22 + +)spool +)lisp (bye) + +\end{chunk} +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document}