File: section-8.8.xhtml

package info (click to toggle)
axiom 20170501-6
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 1,050,164 kB
  • sloc: javascript: 8,042; lisp: 3,600; makefile: 505; cpp: 223; ansic: 181; sh: 96
file content (444 lines) | stat: -rw-r--r-- 22,842 bytes parent folder | download | duplicates (7)
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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [
<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
]>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xlink="http://www.w3.org/1999/xlink" >


  <head>
    <title>Section8.8</title>
    <link rel="stylesheet" type="text/css" href="graphicstyle.css" />
    <script type="text/javascript" src="bookax1.js" />
  </head>

  <body>
<a href="book-contents.xhtml" style="margin-right: 10px;">Book Contents</a><a href="section-8.7.xhtml" style="margin-right: 10px;">Previous Section 8.7 Laplace Transforms</a><a href="section-8.9.xhtml" style="margin-right: 10px;">Next Section 8.9 Working with Power Series</a>
<a href="book-index.xhtml">Book Index</a><div class="section"  id="sec-8.8">
<h2 class="sectiontitle">8.8  Integration</h2>


<a name="ugProblemIntegration" class="label"/>



<p>Integration is the reverse process of differentiation, that is,
<span class="index">integration</span><a name="chapter-8-98"/> an <span class="italic">integral</span> of a function  <math xmlns="&mathml;" mathsize="big"><mstyle><mi>f</mi></mstyle></math> with respect
to a variable  <math xmlns="&mathml;" mathsize="big"><mstyle><mi>x</mi></mstyle></math> is any function  <math xmlns="&mathml;" mathsize="big"><mstyle><mi>g</mi></mstyle></math> such that  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mi>D</mi><mo>(</mo><mi>g</mi><mo>,</mo><mi>x</mi><mo>)</mo></mrow></mstyle></math> is equal to
 <math xmlns="&mathml;" mathsize="big"><mstyle><mi>f</mi></mstyle></math>.
</p>


<p>The package <span class="teletype">FunctionSpaceIntegration</span> provides the top-level
integration operation, <span class="spadfunFrom" >integrate</span><span class="index">integrate</span><a name="chapter-8-99"/><span class="index">FunctionSpaceIntegration</span><a name="chapter-8-100"/>,
for integrating real-valued elementary functions.
<span class="index">FunctionSpaceIntegration</span><a name="chapter-8-101"/>
</p>




<div id="spadComm8-117" class="spadComm" >
<form id="formComm8-117" action="javascript:makeRequest('8-117');" >
<input id="comm8-117" type="text" class="command" style="width: 22em;" value="integrate(cosh(a*x)*sinh(a*x), x)" />
</form>
<span id="commSav8-117" class="commSav" >integrate(cosh(a*x)*sinh(a*x), x)</span>
<div id="mathAns8-117" ></div>
</div>


<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mfrac><mrow><mrow><msup><mrow><mo>sinh</mo><mo>(</mo><mrow><mi>a</mi><mo></mo><mi>x</mi></mrow><mo>)</mo></mrow><mn>2</mn></msup></mrow><mo>+</mo><mrow><msup><mrow><mo>cosh</mo><mo>(</mo><mrow><mi>a</mi><mo></mo><mi>x</mi></mrow><mo>)</mo></mrow><mn>2</mn></msup></mrow></mrow><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></mfrac></mstyle></math>
</td></tr>
</table>
</div>




<div class="returnType">
Type: Union(Expression Integer,...)
</div>



<p>Unfortunately, antiderivatives of most functions cannot be expressed in
terms of elementary functions.
</p>




<div id="spadComm8-118" class="spadComm" >
<form id="formComm8-118" action="javascript:makeRequest('8-118');" >
<input id="comm8-118" type="text" class="command" style="width: 28em;" value="integrate(log(1 + sqrt(a * x + b)) / x, x)" />
</form>
<span id="commSav8-118" class="commSav" >integrate(log(1 + sqrt(a * x + b)) / x, x)</span>
<div id="mathAns8-118" ></div>
</div>


<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mrow><msup><mo>&#x222B;</mo><mrow><mi>x</mi></mrow></msup><mrow><mfrac><mrow><mo>log</mo><mo>(</mo><mrow><mrow><msqrt><mrow><mi>b</mi><mo>+</mo><mrow><mo>%</mo><mi>M</mi><mo></mo><mi>a</mi></mrow></mrow></msqrt></mrow><mo>+</mo><mn>1</mn></mrow><mo>)</mo></mrow><mrow><mo>%</mo><mi>M</mi></mrow></mfrac><mo></mo><mrow><mi>d</mi><mo>%</mo><mi>M</mi></mrow></mrow></mrow></mstyle></math>
</td></tr>
</table>
</div>




<div class="returnType">
Type: Union(Expression Integer,...)
</div>



<p>Given an elementary function to integrate, Axiom returns a formal
integral as above only when it can prove that the integral is not
elementary and not when it cannot determine the integral.
In this rare case it prints a message that it cannot
determine if an elementary integral exists.
</p>


<p>Similar functions may have antiderivatives <span class="index">antiderivative</span><a name="chapter-8-102"/>
that look quite different because the form of the antiderivative
depends on the sign of a constant that appears in the function.
</p>




<div id="spadComm8-119" class="spadComm" >
<form id="formComm8-119" action="javascript:makeRequest('8-119');" >
<input id="comm8-119" type="text" class="command" style="width: 17em;" value="integrate(1/(x**2 - 2),x)" />
</form>
<span id="commSav8-119" class="commSav" >integrate(1/(x**2 - 2),x)</span>
<div id="mathAns8-119" ></div>
</div>


<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mfrac><mrow><mo>log</mo><mo>(</mo><mfrac><mrow><mrow><mrow><mo>(</mo><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow><mo>+</mo><mn>2</mn><mo>)</mo></mrow><mo></mo><mrow><msqrt><mn>2</mn></msqrt></mrow></mrow><mo>-</mo><mrow><mn>4</mn><mo></mo><mi>x</mi></mrow></mrow><mrow><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow><mo>-</mo><mn>2</mn></mrow></mfrac><mo>)</mo></mrow><mrow><mn>2</mn><mo></mo><mrow><msqrt><mn>2</mn></msqrt></mrow></mrow></mfrac></mstyle></math>
</td></tr>
</table>
</div>




<div class="returnType">
Type: Union(Expression Integer,...)
</div>





<div id="spadComm8-120" class="spadComm" >
<form id="formComm8-120" action="javascript:makeRequest('8-120');" >
<input id="comm8-120" type="text" class="command" style="width: 17em;" value="integrate(1/(x**2 + 2),x)" />
</form>
<span id="commSav8-120" class="commSav" >integrate(1/(x**2 + 2),x)</span>
<div id="mathAns8-120" ></div>
</div>


<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mfrac><mrow><mo>arctan</mo><mo>(</mo><mfrac><mrow><mi>x</mi><mo></mo><mrow><msqrt><mn>2</mn></msqrt></mrow></mrow><mn>2</mn></mfrac><mo>)</mo></mrow><mrow><msqrt><mn>2</mn></msqrt></mrow></mfrac></mstyle></math>
</td></tr>
</table>
</div>




<div class="returnType">
Type: Union(Expression Integer,...)
</div>



<p>If the integrand contains parameters, then there may be several possible
antiderivatives, depending on the signs of expressions of the parameters.
</p>


<p>In this case Axiom returns a list of answers that cover all the
possible cases.  Here you use the answer involving the square root of
 <math xmlns="&mathml;" mathsize="big"><mstyle><mi>a</mi></mstyle></math> when  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mi>a</mi><mo>&gt;</mo><mn>0</mn></mrow></mstyle></math> and <span class="index">integration:result as list of real
functions</span><a name="chapter-8-103"/> the answer involving the square root of  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mo>-</mo><mi>a</mi></mrow></mstyle></math> when  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mi>a</mi><mo>&lt;</mo><mn>0</mn></mrow></mstyle></math>.
</p>




<div id="spadComm8-121" class="spadComm" >
<form id="formComm8-121" action="javascript:makeRequest('8-121');" >
<input id="comm8-121" type="text" class="command" style="width: 23em;" value="integrate(x**2 / (x**4 - a**2), x)" />
</form>
<span id="commSav8-121" class="commSav" >integrate(x**2 / (x**4 - a**2), x)</span>
<div id="mathAns8-121" ></div>
</div>


<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mrow><mtable><mtr><mtd><mrow><mo>[</mo><mfrac><mrow><mrow><mo>log</mo><mo>(</mo><mfrac><mrow><mrow><mrow><mo>(</mo><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow><mo>+</mo><mi>a</mi><mo>)</mo></mrow><mo></mo><mrow><msqrt><mi>a</mi></msqrt></mrow></mrow><mo>-</mo><mrow><mn>2</mn><mo></mo><mi>a</mi><mo></mo><mi>x</mi></mrow></mrow><mrow><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow><mo>-</mo><mi>a</mi></mrow></mfrac><mo>)</mo></mrow><mo>+</mo><mrow><mn>2</mn><mo></mo><mrow><mo>arctan</mo><mo>(</mo><mfrac><mrow><mi>x</mi><mo></mo><mrow><msqrt><mi>a</mi></msqrt></mrow></mrow><mi>a</mi></mfrac><mo>)</mo></mrow></mrow></mrow><mrow><mn>4</mn><mo></mo><mrow><msqrt><mi>a</mi></msqrt></mrow></mrow></mfrac><mo>,</mo></mrow></mtd></mtr><mtr><mtd></mtd></mtr><mtr><mtd><mrow><mfrac><mrow><mrow><mo>log</mo><mo>(</mo><mfrac><mrow><mrow><mrow><mo>(</mo><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow><mo>-</mo><mi>a</mi><mo>)</mo></mrow><mo></mo><mrow><msqrt><mrow><mo>-</mo><mi>a</mi></mrow></msqrt></mrow></mrow><mo>+</mo><mrow><mn>2</mn><mo></mo><mi>a</mi><mo></mo><mi>x</mi></mrow></mrow><mrow><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow><mo>+</mo><mi>a</mi></mrow></mfrac><mo>)</mo></mrow><mo>-</mo><mrow><mn>2</mn><mo></mo><mrow><mo>arctan</mo><mo>(</mo><mfrac><mrow><mi>x</mi><mo></mo><mrow><msqrt><mrow><mo>-</mo><mi>a</mi></mrow></msqrt></mrow></mrow><mi>a</mi></mfrac><mo>)</mo></mrow></mrow></mrow><mrow><mn>4</mn><mo></mo><mrow><msqrt><mrow><mo>-</mo><mi>a</mi></mrow></msqrt></mrow></mrow></mfrac><mo>]</mo></mrow></mtd></mtr></mtable></mrow></mstyle></math>
</td></tr>
</table>
</div>




<div class="returnType">
Type: Union(List Expression Integer,...)
</div>



<p>If the parameters and the variables of integration can be complex
numbers rather than real, then the notion of sign is not defined.  In
this case all the possible answers can be expressed as one complex
function.  To get that function, rather than a list of real functions,
use <span class="spadfunFrom" >complexIntegrate</span><span class="index">complexIntegrate</span><a name="chapter-8-104"/><span class="index">FunctionSpaceComplexIntegration</span><a name="chapter-8-105"/>,
which is provided by the package <span class="index">integration:result as a
complex functions</span><a name="chapter-8-106"/> <span class="teletype">FunctionSpaceComplexIntegration</span>.
<span class="index">FunctionSpaceComplexIntegration</span><a name="chapter-8-107"/>
</p>


<p>This operation is used for integrating complex-valued elementary
functions.
</p>




<div id="spadComm8-122" class="spadComm" >
<form id="formComm8-122" action="javascript:makeRequest('8-122');" >
<input id="comm8-122" type="text" class="command" style="width: 28em;" value="complexIntegrate(x**2 / (x**4 - a**2), x)" />
</form>
<span id="commSav8-122" class="commSav" >complexIntegrate(x**2 / (x**4 - a**2), x)</span>
<div id="mathAns8-122" ></div>
</div>


<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mfrac><mrow><mo>(</mo><mtable><mtr><mtd><mrow><mrow><msqrt><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></msqrt></mrow><mo></mo><mrow><mo>log</mo><mo>(</mo><mfrac><mrow><mrow><mi>x</mi><mo></mo><mrow><msqrt><mrow><mo>-</mo><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></mrow></msqrt></mrow></mrow><mo>+</mo><mrow><mn>2</mn><mo></mo><mi>a</mi></mrow></mrow><mrow><msqrt><mrow><mo>-</mo><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></mrow></msqrt></mrow></mfrac><mo>)</mo></mrow></mrow><mo>-</mo><mrow><mrow><msqrt><mrow><mo>-</mo><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></mrow></msqrt></mrow><mo></mo><mrow><mo>log</mo><mo>(</mo><mfrac><mrow><mrow><mi>x</mi><mo></mo><mrow><msqrt><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></msqrt></mrow></mrow><mo>+</mo><mrow><mn>2</mn><mo></mo><mi>a</mi></mrow></mrow><mrow><msqrt><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></msqrt></mrow></mfrac><mo>)</mo></mrow></mrow><mo>+</mo></mtd></mtr><mtr><mtd></mtd></mtr><mtr><mtd><mrow><mrow><msqrt><mrow><mo>-</mo><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></mrow></msqrt></mrow><mo></mo><mrow><mo>log</mo><mo>(</mo><mfrac><mrow><mrow><mi>x</mi><mo></mo><mrow><msqrt><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></msqrt></mrow></mrow><mo>-</mo><mrow><mn>2</mn><mo></mo><mi>a</mi></mrow></mrow><mrow><msqrt><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></msqrt></mrow></mfrac><mo>)</mo></mrow></mrow><mo>-</mo><mrow><mrow><msqrt><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></msqrt></mrow><mo></mo><mrow><mo>log</mo><mo>(</mo><mfrac><mrow><mrow><mi>x</mi><mo></mo><mrow><msqrt><mrow><mo>-</mo><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></mrow></msqrt></mrow></mrow><mo>-</mo><mrow><mn>2</mn><mo></mo><mi>a</mi></mrow></mrow><mrow><msqrt><mrow><mo>-</mo><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></mrow></msqrt></mrow></mfrac><mo>)</mo></mrow></mrow></mtd></mtr></mtable><mo>)</mo></mrow><mrow><mn>2</mn><mo></mo><mrow><msqrt><mrow><mo>-</mo><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></mrow></msqrt></mrow><mo></mo><mrow><msqrt><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow></msqrt></mrow></mrow></mfrac></mstyle></math>
</td></tr>
</table>
</div>




<div class="returnType">
Type: Expression Integer
</div>



<p>As with the real case, antiderivatives for most complex-valued
functions cannot be expressed in terms of elementary functions.
</p>




<div id="spadComm8-123" class="spadComm" >
<form id="formComm8-123" action="javascript:makeRequest('8-123');" >
<input id="comm8-123" type="text" class="command" style="width: 33em;" value="complexIntegrate(log(1 + sqrt(a * x + b)) / x, x)" />
</form>
<span id="commSav8-123" class="commSav" >complexIntegrate(log(1 + sqrt(a * x + b)) / x, x)</span>
<div id="mathAns8-123" ></div>
</div>


<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mrow><msup><mo>&#x222B;</mo><mrow><mi>x</mi></mrow></msup><mrow><mfrac><mrow><mo>log</mo><mo>(</mo><mrow><mrow><msqrt><mrow><mi>b</mi><mo>+</mo><mrow><mo>%</mo><mi>M</mi><mo></mo><mi>a</mi></mrow></mrow></msqrt></mrow><mo>+</mo><mn>1</mn></mrow><mo>)</mo></mrow><mrow><mo>%</mo><mi>M</mi></mrow></mfrac><mo></mo><mrow><mi>d</mi><mo>%</mo><mi>M</mi></mrow></mrow></mrow></mstyle></math>
</td></tr>
</table>
</div>




<div class="returnType">
Type: Expression Integer
</div>



<p>Sometimes <span style="font-weight: bold;"> integrate</span> can involve symbolic algebraic numbers
such as those returned by <span class="spadfunFrom" >rootOf</span><span class="index">rootOf</span><a name="chapter-8-108"/><span class="index">Expression</span><a name="chapter-8-109"/>.
To see how to work with these strange generated symbols (such as
 <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mo>%</mo><mo>%</mo><mi>a0</mi></mrow></mstyle></math>), see 
<a href="section-8.3.xhtml#ugxProblemSymRootAll" class="ref" >ugxProblemSymRootAll</a> .
</p>


<p>Definite integration is the process of computing the area between
<span class="index">integration:definite</span><a name="chapter-8-110"/>
the  <math xmlns="&mathml;" mathsize="big"><mstyle><mi>x</mi></mstyle></math>-axis and the curve of a function  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mstyle></math>.
The fundamental theorem of calculus states that if  <math xmlns="&mathml;" mathsize="big"><mstyle><mi>f</mi></mstyle></math> is
continuous on an interval  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mi>a</mi><mo>.</mo><mo>.</mo><mi>b</mi></mrow></mstyle></math> and if there exists a function  <math xmlns="&mathml;" mathsize="big"><mstyle><mi>g</mi></mstyle></math>
that is differentiable on  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mi>a</mi><mo>.</mo><mo>.</mo><mi>b</mi></mrow></mstyle></math> and such that  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mi>D</mi><mo>(</mo><mi>g</mi><mo>,</mo><mi>x</mi><mo>)</mo></mrow></mstyle></math>
is equal to  <math xmlns="&mathml;" mathsize="big"><mstyle><mi>f</mi></mstyle></math>, then the definite integral of  <math xmlns="&mathml;" mathsize="big"><mstyle><mi>f</mi></mstyle></math>
for  <math xmlns="&mathml;" mathsize="big"><mstyle><mi>x</mi></mstyle></math> in the interval  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mi>a</mi><mo>.</mo><mo>.</mo><mi>b</mi></mrow></mstyle></math> is equal to  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mi>g</mi><mo>(</mo><mi>b</mi><mo>)</mo><mo>-</mo><mi>g</mi><mo>(</mo><mi>a</mi><mo>)</mo></mrow></mstyle></math>.
</p>


<p>The package <span class="teletype">RationalFunctionDefiniteIntegration</span> provides
the top-level definite integration operation,
<span class="spadfunFrom" >integrate</span><span class="index">integrate</span><a name="chapter-8-111"/><span class="index">RationalFunctionDefiniteIntegration</span><a name="chapter-8-112"/>,
for integrating real-valued rational functions.
</p>




<div id="spadComm8-124" class="spadComm" >
<form id="formComm8-124" action="javascript:makeRequest('8-124');" >
<input id="comm8-124" type="text" class="command" style="width: 42em;" value="integrate((x**4 - 3*x**2 + 6)/(x**6-5*x**4+5*x**2+4), x = 1..2)" />
</form>
<span id="commSav8-124" class="commSav" >integrate((x**4 - 3*x**2 + 6)/(x**6-5*x**4+5*x**2+4), x = 1..2)</span>
<div id="mathAns8-124" ></div>
</div>


<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mfrac><mrow><mrow><mn>2</mn><mo></mo><mrow><mo>arctan</mo><mo>(</mo><mn>8</mn><mo>)</mo></mrow></mrow><mo>+</mo><mrow><mn>2</mn><mo></mo><mrow><mo>arctan</mo><mo>(</mo><mn>5</mn><mo>)</mo></mrow></mrow><mo>+</mo><mrow><mn>2</mn><mo></mo><mrow><mo>arctan</mo><mo>(</mo><mn>2</mn><mo>)</mo></mrow></mrow><mo>+</mo><mrow><mn>2</mn><mo></mo><mrow><mo>arctan</mo><mo>(</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mo>)</mo></mrow></mrow><mo>-</mo><mi>&#x03C0;</mi></mrow><mn>2</mn></mfrac></mstyle></math>
</td></tr>
</table>
</div>




<div class="returnType">
Type: Union(f1: OrderedCompletion Expression Integer,...)
</div>



<p>Axiom checks beforehand that the function you are integrating is
defined on the interval  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mi>a</mi><mo>.</mo><mo>.</mo><mi>b</mi></mrow></mstyle></math>, and prints an error message if it
finds that this is not case, as in the following example:
</p>



<div class="verbatim"><br />
integrate(1/(x**2-2),&nbsp;x&nbsp;=&nbsp;1..2)<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt;&nbsp;Error&nbsp;detected&nbsp;within&nbsp;library&nbsp;code:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pole&nbsp;in&nbsp;path&nbsp;of&nbsp;integration<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You&nbsp;are&nbsp;being&nbsp;returned&nbsp;to&nbsp;the&nbsp;top&nbsp;level<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;the&nbsp;interpreter.<br />
</div>


<p>When parameters are present in the function, the function may or may not be
defined on the interval of integration.
</p>


<p>If this is the case, Axiom issues a warning that a pole might
lie in the path of integration, and does not compute the integral.
</p>




<div id="spadComm8-125" class="spadComm" >
<form id="formComm8-125" action="javascript:makeRequest('8-125');" >
<input id="comm8-125" type="text" class="command" style="width: 21em;" value="integrate(1/(x**2-a), x = 1..2)" />
</form>
<span id="commSav8-125" class="commSav" >integrate(1/(x**2-a), x = 1..2)</span>
<div id="mathAns8-125" ></div>
</div>


<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mi>potentialPole</mi></mstyle></math>
</td></tr>
</table>
</div>




<div class="returnType">
Type: Union(pole: potentialPole,...)
</div>



<p>If you know that you are using values of the parameter for which
the function has no pole in the interval of integration, use the
string <span class="teletype">``noPole''</span> as a third argument to
<span class="spadfunFrom" >integrate</span><span class="index">integrate</span><a name="chapter-8-113"/><span class="index">RationalFunctionDefiniteIntegration</span><a name="chapter-8-114"/>:
</p>


<p>The value here is, of course, incorrect if  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mi>sqrt</mi><mo>(</mo><mi>a</mi><mo>)</mo></mrow></mstyle></math> is between
 <math xmlns="&mathml;" mathsize="big"><mstyle><mn>1</mn></mstyle></math> and  <math xmlns="&mathml;" mathsize="big"><mstyle><mrow><mn>2</mn><mo>.</mo></mrow></mstyle></math>
</p>




<div id="spadComm8-126" class="spadComm" >
<form id="formComm8-126" action="javascript:makeRequest('8-126');" >
<input id="comm8-126" type="text" class="command" style="width: 28em;" value='integrate(1/(x**2-a), x = 1..2, "noPole")' />
</form>
<span id="commSav8-126" class="commSav" >integrate(1/(x**2-a), x = 1..2, "noPole")</span>
<div id="mathAns8-126" ></div>
</div>


<div class="math">
<table>
<tr><td>
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mfrac><mrow><mo>(</mo><mo>-</mo><mrow><mo>log</mo><mo>(</mo><mfrac><mrow><mrow><mrow><mo>(</mo><mo>-</mo><mrow><mn>4</mn><mo></mo><mrow><msup><mi>a</mi><mn>2</mn></msup></mrow></mrow><mo>-</mo><mrow><mn>4</mn><mo></mo><mi>a</mi></mrow><mo>)</mo></mrow><mo></mo><mrow><msqrt><mi>a</mi></msqrt></mrow></mrow><mo>+</mo><mrow><msup><mi>a</mi><mn>3</mn></msup></mrow><mo>+</mo><mrow><mn>6</mn><mo></mo><mrow><msup><mi>a</mi><mn>2</mn></msup></mrow></mrow><mo>+</mo><mi>a</mi></mrow><mrow><mrow><msup><mi>a</mi><mn>2</mn></msup></mrow><mo>-</mo><mrow><mn>2</mn><mo></mo><mi>a</mi></mrow><mo>+</mo><mn>1</mn></mrow></mfrac><mo>)</mo></mrow><mo>+</mo><mrow><mo>log</mo><mo>(</mo><mfrac><mrow><mrow><mrow><mo>(</mo><mo>-</mo><mrow><mn>8</mn><mo></mo><mrow><msup><mi>a</mi><mn>2</mn></msup></mrow></mrow><mo>-</mo><mrow><mn>32</mn><mo></mo><mi>a</mi></mrow><mo>)</mo></mrow><mo></mo><mrow><msqrt><mi>a</mi></msqrt></mrow></mrow><mo>+</mo><mrow><msup><mi>a</mi><mn>3</mn></msup></mrow><mo>+</mo><mrow><mn>24</mn><mo></mo><mrow><msup><mi>a</mi><mn>2</mn></msup></mrow></mrow><mo>+</mo><mrow><mn>16</mn><mo></mo><mi>a</mi></mrow></mrow><mrow><mrow><msup><mi>a</mi><mn>2</mn></msup></mrow><mo>-</mo><mrow><mn>8</mn><mo></mo><mi>a</mi></mrow><mo>+</mo><mn>16</mn></mrow></mfrac><mo>)</mo></mrow><mfrac><mrow><mo>-</mo><mrow><mo>arctan</mo><mo>(</mo><mfrac><mrow><mn>2</mn><mo></mo><mrow><msqrt><mrow><mo>-</mo><mi>a</mi></mrow></msqrt></mrow></mrow><mi>a</mi></mfrac><mo>)</mo></mrow><mo>+</mo><mrow><mo>arctan</mo><mo>(</mo><mfrac><mrow><msqrt><mrow><mo>-</mo><mi>a</mi></mrow></msqrt></mrow><mi>a</mi></mfrac><mo>)</mo></mrow></mrow><mrow><msqrt><mrow><mo>-</mo><mi>a</mi></mrow></msqrt></mrow></mfrac><mo>)</mo></mrow><mrow><mn>4</mn><mo></mo><mrow><msqrt><mi>a</mi></msqrt></mrow></mrow></mfrac></mstyle></math>
</td></tr>
</table>
</div>




<div class="returnType">
Type: Union(f2: List OrderedCompletion Expression Integer,...)
</div>





</div><a href="book-contents.xhtml" style="margin-right: 10px;">Book Contents</a>
<a href="section-8.7.xhtml" style="margin-right: 10px;">Previous Section 8.7 Laplace Transforms</a><a href="section-8.9.xhtml" style="margin-right: 10px;">Next Section 8.9 Working with Power Series</a>
<a href="book-index.xhtml">Book Index</a></body>
</html>