This file is indexed.

/usr/share/doc/axiom-doc/hypertex/calseries6.xhtml is in axiom-hypertex-data 20120501-8.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xmlns:m="http://www.w3.org/1998/Math/MathML">
 <head>
  <meta http-equiv="Content-Type" content="text/html" charset="us-ascii"/>
  <title>Axiom Documentation</title>
  <style>

   html {
     background-color: #ECEA81;
   }

   body { 
     margin: 0px;
     padding: 0px;
   }

   div.command { 
     color:red;
   }

   div.center {
     color:blue;
   }

   div.reset {
     visibility:hidden;
   }

   div.mathml { 
     color:blue;
   }

   input.subbut {
     background-color:#ECEA81;
     border: 0;
     color:green;
     font-family: "Courier New", Courier, monospace;
   }

   input.noresult {
     background-color:#ECEA81;
     border: 0;
     color:black;
     font-family: "Courier New", Courier, monospace;
   }

   span.cmd { 
     color:green;
     font-family: "Courier New", Courier, monospace;
   }

   pre {
     font-family: "Courier New", Courier, monospace;
   }
  </style>
  <script type="text/javascript">
<![CDATA[
     // This is a hash table of the values we've evaluated.
     // This is indexed by a string argument. 
     // A value of 0 means we need to evaluate the expression
     // A value of 1 means we have evaluated the expression
   Evaled = new Array();
     // this says we should modify the page
   hiding = 'show';
     // and this is the id of the div tag to modify (defaulted)
   thediv = 'mathAns';
     // commandline will mark that its arg has been evaled so we don't repeat
   function commandline(arg) {
     Evaled[arg] = 0;  // remember that we have set this value
     thediv='ans'+arg; // mark where we should put the output
     var ans = document.getElementById(arg).value;
     return(ans);
   }
   // the function only modifies the page if when we're showing the
   // final result, otherwise it does nothing.
   function showanswer(mathString,indiv) {
     if (hiding == 'show') { // only do something useful if we're showing
       indiv = thediv;  // override the argument so we can change it
       var mystr = mathString.split("</div>");
       for (var i=0; i < mystr.length; i++) {
         if (mystr[i].indexOf("mathml") > 0) {
           var mymathstr = mystr[i].concat("</div>");
         }
       }
       // this turns the string into a dom fragment
       var mathRange = document.createRange();
       var mathBox=
               document.createElementNS('http://www.w3.org/1999/xhtml','div');
       mathRange.selectNodeContents(mathBox);
       var mymath = mathRange.createContextualFragment(mymathstr);
       mathBox.appendChild(mymath);
       // now we need to format it properly
       // and we stick the result into the requested div block as a child.
       var mathAns = document.getElementById(indiv);
       mathAns.removeChild(mathAns.firstChild);
       mathAns.appendChild(mathBox);
     }
   }
   // this function takes a list of expressions ids to evaluate
   // the list contains a list of "free" expression ids that need to
   // be evaluated before the last expression. 
   // For each expression id, if it has not yet been evaluated we
   // evaluate it "hidden" otherwise we can skip the expression.
   // Once we have evaluated all of the free expressions we can
   // evaluate the final expression and modify the page.
   function handleFree(arg) {
     var placename = arg.pop();      // last array val is real
     var mycnt = arg.length;         // remaining free vars
       // we handle all of the prerequired expressions quietly
     hiding = 'hide';
     for (var i=0; i<mycnt; i++) {   // for each of the free variables
       if (Evaled[arg[i]] == null) { // if we haven't evaled it
         Evaled[arg[i]] = 0;         // remember we evaled it
         makeRequest(arg[i]);        // initialize the free values
       }
     }
       // and now we start talking to the page again
     hiding = 'show';                // we want to show this
     thediv = 'ans'+placename;       // at this div id
     makeRequest(placename);         // and we eval and show it
   }
]]>
<![CDATA[
  function ignoreResponse() {}
  function resetvars() {
    http_request = new XMLHttpRequest();         
    http_request.open('POST', '127.0.0.1:8085', true);
    http_request.onreadystatechange = ignoreResponse;
    http_request.setRequestHeader('Content-Type', 'text/plain');
    http_request.send("command=)clear all");
    return(false);
  }
]]>
 function init() {
 }
 function makeRequest(arg) {
   http_request = new XMLHttpRequest();         
   var command = commandline(arg);
   //alert(command);
   http_request.open('POST', '127.0.0.1:8085', true);
   http_request.onreadystatechange = handleResponse;
   http_request.setRequestHeader('Content-Type', 'text/plain');
   http_request.send("command="+command);
   return(false);
 }
 function lispcall(arg) {
   http_request = new XMLHttpRequest();         
   var command = commandline(arg);
   //alert(command);
   http_request.open('POST', '127.0.0.1:8085', true);
   http_request.onreadystatechange = handleResponse;
   http_request.setRequestHeader('Content-Type', 'text/plain');
   http_request.send("lispcall="+command);
   return(false);
 }
 function showcall(arg) {
   http_request = new XMLHttpRequest();         
   var command = commandline(arg);
   //alert(command);
   http_request.open('POST', '127.0.0.1:8085', true);
   http_request.onreadystatechange = handleResponse;
   http_request.setRequestHeader('Content-Type', 'text/plain');
   http_request.send("showcall="+command);
   return(false);
 }
 function interpcall(arg) {
   http_request = new XMLHttpRequest();         
   var command = commandline(arg);
   //alert(command);
   http_request.open('POST', '127.0.0.1:8085', true);
   http_request.onreadystatechange = handleResponse;
   http_request.setRequestHeader('Content-Type', 'text/plain');
   http_request.send("interpcall="+command);
   return(false);
 }
 function handleResponse() {
  if (http_request.readyState == 4) {
   if (http_request.status == 200) {
    showanswer(http_request.responseText,'mathAns');
   } else
   {
     alert('There was a problem with the request.'+ http_request.statusText);
   }
  }
 }

  </script>
 </head>
 <body onload="resetvars();">
  <div align="center"><img align="middle" src="doctitle.png"/></div>
  <hr/>
  <div align="center">Power Series from Formulas</div>
  <hr/>
The <a href="db.xhtml?GenerateUnivariatePowerSeries">
GenerateUnivariatePowerSeries</a> package enables you to create power series
from explicit formulas for their nth coefficients. In what follows, we
construct series expansions for certain transcendental functions by giving
forumulas for their coefficients. You can also compute such series 
expansions directly by simply specifying the function and the point about
which the series is to be expanded. See
<a href="axbook/section-8.9.xhtml#subsec-8.9.5">
Converting to Power Series</a> for more information.

Consider the Taylor expansion of %e^x about x=0:
<pre>
  %e^x = 1 + x + x^2/2 + x^3/6 + ... 
       = sum from n=0 to n=%infinity of x^n/n!
</pre>
The nth Taylor coefficient is 1/n!. This is how to create this series in
Axiom.
<ul>
 <li>
  <input type="submit" id="p1" class="subbut" 
    onclick="makeRequest('p1');"
    value="series(n+->1/factorial(n),x=0)" />
  <div id="ansp1"><div></div></div>
 </li>
</ul>
The first argument specifies the formula for the nth coefficient by giving
a function that maps n to 1/n!. The second argument specifies that the
series is to be expanded in powers of (x-0), that is, in powers of x. Since
we did not specify an initial degress, the first term in the series was the
term of degree 0 (the constant term). Note that the formula was given as
an anonymous function. These are discussed in
<a href="axbook/section-6.17.xhtml">Anonymous Functions</a>

Consider the Taylor expansion of log x about x=1:
<pre>
 log x = (x-1) - (x-1)^2/2 + (x-1)^3/3 - ... 
       = sum from n=1 to n=%infinity of (-1_^(n-1) (x-1)^n/n
</pre>
If you were to evaluate the expression series(n+->(-1)^(n-1)/n,x=1) you
would get an error message because Axiom would try to calculate a term of
degree n=1,... are to be computed.
<ul>
 <li>
  <input type="submit" id="p2" class="subbut" 
    onclick="makeRequest('p2');"
    value="series(n+->(-1)^(n-1)/n,x=1,1..)" />
  <div id="ansp2"><div></div></div>
 </li>
</ul>
Next consider the Taylor expansion of an odd function, say, sin(x):
<pre>
  sin x = x = x^2/3! + x^5/5! - ...
</pre>
Here every other coefficient is zero and we would like to give an explicit
formula onloy for the odd Taylor coefficients. This is one way to do it.
The third argument, 1.., specifies that the first term to be computed is
the term of degree 1. The fourth argument, 2, specifies that we increment
by 2 to find the degrees of subsequent terms, that is, the next term is of
degree 1+2, the next of degree 1+2+2, etc.
<ul>
 <li>
  <input type="submit" id="p3" class="subbut" 
    onclick="makeRequest('p3');"
    value="series(n+->(-1)^((n-1)/2)/factorial(n),x=0,1..,2)" />
  <div id="ansp3"><div></div></div>
 </li>
</ul>
The initial degree and the increment do not have to be integers. For
example, this expression produces a series expansion of sin(x^(1/3)).
<ul>
 <li>
  <input type="submit" id="p4" class="subbut" 
    onclick="makeRequest('p4');"
    value="series(n+->(-1)^((3*n-1)/2)/factorial(3*n),x=0,1/3..,2/3)" />
  <div id="ansp4"><div></div></div>
 </li>
</ul>
While the increment must be positive, the initial degree may be negative.
This yields the Laurent expansion of csc(x) at x=0.
<ul>
 <li>
  <input type="submit" id="p5" class="subbut" 
    onclick="makeRequest('p5');"
    value="cscx:=series(n+->(-1)^((n-1)/2)*2*(2^n-1)*bernoulli(numer(n+1))/factorial(n+1),x=0,-1..,2)" />
  <div id="ansp5"><div></div></div>
 </li>
</ul>
Of course, the reciprocal of this power series is the Taylor expansion of
sin(x).
<ul>
 <li>
  <input type="submit" id="p6" class="subbut" 
    onclick="handleFree(['p5','p6']);"
    value="1/cscx" />
  <div id="ansp6"><div></div></div>
 </li>
</ul>
As a final example, here is the Taylor expansion of asin(x) about x=0.
<ul>
 <li>
  <input type="submit" id="p7" class="subbut" 
    onclick="makeRequest('p7');"
    value="asinx:=series(n+->binomial(n-1,(n-1)/2)/(n*2^(n-1)),x=0,1..,2)" />
  <div id="ansp7"><div></div></div>
 </li>
</ul>
When we compute the sine of this series, we get x (in the sense that all
higher terms computed so far are zero).
<ul>
 <li>
  <input type="submit" id="p8" class="subbut" 
    onclick="handleFree(['p7','p8']);"
    value="sin(asinx)" />
  <div id="ansp8"><div></div></div>
 </li>
</ul>
As we discussed in 
<a href="calseries5.xhtml">Converting to Power Series</a>, you can also use
the operations
<a href="dboptaylor.xhtml">taylor</a>,
<a href="dboplaurent.xhtml">laurent</a>, and
<a href="dboppuiseux.xhtml">puiseux</a>, instead of 
<a href="dbopseries.xhtml">series</a> if you know ahead of time what
kind of exponents a series has. You can't go wrong with 
<a href="dbopseries.xhtml">series</a> though.
 </body>
</html>