aboutsummaryrefslogtreecommitdiff
path: root/src/input/genups.input.pamphlet
blob: c27f21e7071bc05fbc19668b516162f914baac5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input genups.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
--Copyright The Numerical Algorithms Group Limited 1991.
@
<<*>>=
<<license>>

)cl all

taylor(n +-> 1/factorial(n),x = 0)      -- expansion of exp(x) at x = 0
taylor(n +-> (-1)**(n-1)/n,x = 1,1..)   -- expansion of log(x) at x = 1
taylor(n +-> (-1)**(n-1)/n,x = 1,1..6)  -- truncated expansion of log(x)

laurent(m +-> m**2,x = 7,-2..)          -- infinite Laurent expansion
laurent(m +-> m**2,x = 7,-2..5)         --   finite Laurent expansion

puiseux(i +-> (-1)**((i-1)/2)/factorial(i),x = 0,1..,2)  -- sin(x) at x = 0
puiseux(i +-> (-1)**(i/2)/factorial(i),x = 0,0..,2)      -- cos(x) at x = 0
-- puiseux(i +-> (-1)**((i-1)/2)/factorial(i),x = 0,1..9,2) -- truncated sin(x)
-- interpretor needs help here
puiseux(i +-> (-1)**((i-1)/2)/factorial(i),x = 0,1..9/1,2) -- truncated sin(x)

puiseux(j +-> j,x = 8,-4/3..,1/2)
puiseux(j +-> j,x = 8,-4/3..1/6,1/2)

-- same computations using expressions instead of functions

taylor(1/factorial(n),n,x = 0)      -- expansion of exp(x) at x = 0
taylor((-1)**(n-1)/n,n,x = 1,1..)   -- expansion of log(x) at x = 1
taylor((-1)**(n-1)/n,n,x = 1,1..6)  -- truncated expansion of log(x)

laurent(m**2,m,x = 7,-2..)          -- infinite Laurent expansion
laurent(m**2,m,x = 7,-2..5)         --   finite Laurent expansion

puiseux((-1)**((i-1)/2)/factorial(i),i,x = 0,1..,2)  -- sin(x) at x = 0
puiseux((-1)**(i/2)/factorial(i),i,x = 0,0..,2)      -- cos(x) at x = 0
-- puiseux((-1)**((i-1)/2)/factorial(i),i,x = 0,1..9,2) -- truncated sin(x)
-- interpretor needs help here
puiseux((-1)**((i-1)/2)/factorial(i),i,x = 0,1..9/1,2) -- truncated sin(x)

puiseux(j,j,x = 8,-4/3..,1/2)
puiseux(j,j,x = 8,-4/3..1/6,1/2)

-- all of the above commands should still work when the functions 'taylor',
-- 'laurent', and 'puiseux' are replaced by 'series':

series(n +-> 1/factorial(n),x = 0)      -- expansion of exp(x) at x = 0
series(n +-> (-1)**(n-1)/n,x = 1,1..)   -- expansion of log(x) at x = 1
series(n +-> (-1)**(n-1)/n,x = 1,1..6)  -- truncated expansion of log(x)

series(m +-> m**2,x = 7,-2..)          -- infinite Laurent expansion
series(m +-> m**2,x = 7,-2..5)         --   finite Laurent expansion

series(i +-> (-1)**((i-1)/2)/factorial(i),x = 0,1..,2)  -- sin(x) at x = 0
series(i +-> (-1)**(i/2)/factorial(i),x = 0,0..,2)      -- cos(x) at x = 0
-- series(i +-> (-1)**((i-1)/2)/factorial(i),x = 0,1..9,2) -- truncated sin(x)
-- interpretor needs help here
series(i +-> (-1)**((i-1)/2)/factorial(i),x = 0,1..9/1,2) -- truncated sin(x)

series(j +-> j,x = 8,-4/3..,1/2)
series(j +-> j,x = 8,-4/3..1/6,1/2)

-- same computations using expressions instead of functions

series(1/factorial(n),n,x = 0)      -- expansion of exp(x) at x = 0
series((-1)**(n-1)/n,n,x = 1,1..)   -- expansion of log(x) at x = 1
series((-1)**(n-1)/n,n,x = 1,1..6)  -- truncated expansion of log(x)

series(m**2,m,x = 7,-2..)          -- infinite Laurent expansion
series(m**2,m,x = 7,-2..5)         --   finite Laurent expansion

series((-1)**((i-1)/2)/factorial(i),i,x = 0,1..,2)  -- sin(x) at x = 0
series((-1)**(i/2)/factorial(i),i,x = 0,0..,2)      -- cos(x) at x = 0
-- series((-1)**((i-1)/2)/factorial(i),i,x = 0,1..9,2) -- truncated sin(x)
-- interpretor needs help here
series((-1)**((i-1)/2)/factorial(i),i,x = 0,1..9/1,2) -- truncated sin(x)

series(j,j,x = 8,-4/3..,1/2)
series(j,j,x = 8,-4/3..1/6,1/2)
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}