/usr/share/doc/axiom-doc/hypertex/numnumericfunctions.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 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 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 | <?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">Numeric Functions</div>
<hr/>
Axiom provides two basic floating point types:
<a href="numfloat.xhtml">Float</a> and
<a href="nummachinefloats.xhtml">DoubleFloat</a>. This section
describes how to use numerical operations defined on these types and
the related complex types. As we mentioned in
<a href="axbook/book-contents.xhtml#chapter1">An Overview of Axiom</a>
in chapter 1., the
<a href="numfloat.xhtml">Float</a> type is a software implementation of
floating point numbers in which the exponent and the significand may have
any number of digits. See
<a href="numfloat.xhtml">Float</a> for detailed information about this
domain. The
<a href="nummachinefloats.xhtml">DoubleFloat</a> is usually a hardware
implementation of floating point numbers, corresponding to machine double
precision. The types
<a href="dbcomplexfloat.xhtml">Complex Float</a> and
<a href="dbcomplexdoublefloat.xhtml">Complex DoubleFloat</a> are the
corresponding software implementations of complex floating point numbers.
In this section the term floating point type means any of these four
types. The floating point types immplement the basic elementary functions.
These include (where $ means
<a href="nummachinefloats.xhtml">DoubleFloat</a>,
<a href="numfloat.xhtml">Float</a>,
<a href="dbcomplexfloat.xhtml">Complex Float</a>,
<a href="dbcomplexdoublefloat.xhtml">Complex DoubleFloat</a>):<br/>
<a href="dbopexp.xhtml">exp</a>,
<a href="dboplog.xhtml">log</a>: $ -> $<br/>
<a href="dbopsin.xhtml">sin</a>,
<a href="dbopcos.xhtml">cos</a>,
<a href="dboptan.xhtml">tan</a>,
<a href="dbopcot.xhtml">cot</a>,
<a href="dbopsec.xhtml">sec</a>,
<a href="dbopcsc.xhtml">csc</a>: $ -> $<br/>
<a href="dbopasin.xhtml">asin</a>,
<a href="dbopacos.xhtml">acos</a>,
<a href="dbopatan.xhtml">atan</a>,
<a href="dbopacot.xhtml">acot</a>,
<a href="dbopasec.xhtml">asec</a>,
<a href="dbopacsc.xhtml">acsc</a>: $ -> $<br/>
<a href="dbopsinh.xhtml">sinh</a>,
<a href="dbopcosh.xhtml">cosh</a>,
<a href="dboptanh.xhtml">tanh</a>,
<a href="dbopcoth.xhtml">coth</a>,
<a href="dbopsech.xhtml">sech</a>,
<a href="dbopcsch.xhtml">csch</a>: $ -> $<br/>
<a href="dbopasinh.xhtml">asinh</a>,
<a href="dbopacosh.xhtml">acosh</a>,
<a href="dbopatanh.xhtml">atanh</a>,
<a href="dbopacoth.xhtml">acoth</a>,
<a href="dbopasech.xhtml">asech</a>,
<a href="dbopacsch.xhtml">acsch</a>: $ -> $<br/>
<a href="dboppi.xhtml">pi</a>: () -> $<br/>
<a href="dbopsqrt.xhtml">sqrt</a>: $ -> $<br/>
<a href="dbopnthroot.xhtml">nthRoot</a>: ($,Integer) -> $<br/>
<a href="dbopstarstar.xhtml">**</a>: ($,Fraction Integer) -> $<br/>
<a href="dbopstarstar.xhtml">**</a>: ($,$) -> $<br/>
The handling of roots depends on whether the floating point type is
real or complex: for the real floating point types,
<a href="nummachinefloats.xhtml">DoubleFloat</a> and
<a href="numfloat.xhtml">Float</a>, if a real root exists the one with
the same sign as the radicand is returned; for the complex floating
point types, the principal value is returned. Also, for real floating
point types the inverse functions produce errors if the results are not
real. This includes cases such as asin(1.2), log(-3.2), sqrt(-1,1).
The default floating point type is <a href="numfloat.xhtml">Float</a>
or <a href="dbcomplexfloat.xhtml">Complex Float</a>, just use normal
decimal notation.
<ul>
<li>
<input type="submit" id="p1" class="subbut" onclick="makeRequest('p1');"
value="exp(3.1)" />
<div id="ansp1"><div></div></div>
</li>
<li>
<input type="submit" id="p2" class="subbut" onclick="makeRequest('p2');"
value="exp(3.1+4.5*%i)" />
<div id="ansp2"><div></div></div>
</li>
</ul>
To evaluate functions using
<a href="nummachinefloats.xhtml">DoubleFloat</a> or
<a href="dbcomplexdoublefloat.xhtml">Complex DoubleFloat</a>, a
declaration or conversion is required.
<ul>
<li>
<input type="submit" id="p3" class="subbut" onclick="makeRequest('p3');"
value="(r:DFLOAT:=3.1; t:DFLOAT:=4.5; exp(r+t*%i))" />
<div id="ansp3"><div></div></div>
</li>
<li>
<input type="submit" id="p4" class="subbut" onclick="makeRequest('p4');"
value="exp(3.1::DFLOAT+4.5::DFLOAT*%i)" />
<div id="ansp4"><div></div></div>
</li>
</ul>
A number of special functions are provided by the package
<a href="db.xhtml?DoubleFloatSpecialFunctions">DoubleFloatSpecialFunctions</a>
for the machine precision floating point types. The special functions
provided are listed below, where F stands for the types
<a href="numfloat.xhtml">Float</a>
or <a href="dbcomplexfloat.xhtml">Complex Float</a>. The real versions
of the functions yield an error if the result is not real.
<ul>
<li>
<a href="dbopgamma.xhtml">Gamma</a>: F -> F<br/>
Gamma(z) is the Euler gamma
function, Gamma(Z), defined by<br/>
Gamma(z) = integrate(t^(z-1)*exp(-t),t=0..%infinity)
</li>
<li>
<a href="dbopbeta.xhtml">Beta</a>: F -> F<br/>
Beta(u,v) is the Euler Beta
function B(u,v), defined by <br/>
Beta(u,v)=integrate(t^(u-1)*(1-t)^(b-1),t=0..1)<br/>
This is related to Gamma(z) by<br/>
Beta(u,v)=Gamma(u)*Gamma(v)/Gamma(u+v)
</li>
<li>
<a href="dboploggamma.xhtml">logGamma</a>: F -> F<br/>
logGamma(z) is the natural logarithm of Gamma(z). This can often be
computed even if Gamma(z) cannot.
</li>
<li>
<a href="dbopdigamma.xhtml">digamma</a>: F -> F<br/>
digamma(z), also called psi(z), is the function psi(z), defined by<br/>
psi(z)=Gamma'(z)/Gamma(z)
</li>
<li>
<a href="dboppolygamma.xhtml">polygamma</a>: (NonNegativeInteger, F) -> F<br/>
polygamma(n,z) is the n-th derivative of digamma(z)
</li>
<li>
<a href="dbopbesselj.xhtml">besselJ</a>: (F, F) -> F<br/>
besselJ(v,z) is the Bessel function of the first kind, J(v,z). This
function satisfies the differential equation<br/>
z^(2w)''(z)+zw'(z)+(z^2-v^2)w(z)=0
</li>
<li>
<a href="dbopbessely.xhtml">besselY</a>: (F, F) -> F<br/>
besselY(v,z) is the Bessel function of the second kind, Y(v,z). This
function satisfies the same differential equation as
<a href="dbopbesselj.xhtml">besselJ</a>. The implementation simply
uses the relation<br/>
Y(v,z)=(J(v,z)cos(v*%pi)-J(-v,z))/sin(v*%pi)
</li>
<li>
<a href="dbopbesseli.xhtml">besselI</a>: (F, F) -> F<br/>
besselI(v,z) if the modifed Bessel function of the first kind, I(v,z).
This function satisfies the differential equation<br/>
z^2w''(z)+zw'(z)-(z^2+v^2)w(z)=0
</li>
<li>
<a href="dbopbesselk.xhtml">besselK</a>: (F, F) -> F<br/>
besselK(v,z) is the modifed Bessel function of the second kind, K(v,z).
This function satisfies the same differential equation as
<a href="dbopbesseli.xhtml">besselI</a>. The implementation simply uses
the relation<br/>
K(v,z)=%pi*(I(v,z)-I(-v,z))/(2sin(v*%pi))
</li>
<li>
<a href="dbopairyai.xhtml">airyAi</a>: F -> F<br/>
airyAi(z) is the Airy function Ai(z). This function satisfies the
differential equation<br/>
w''(z)-zw(z)=0<br/>
The implementation simply uses the relation<br/>
Ai(-z)=1/3*sqrt(z)*(J(-1/3,2/3*z^(3/2))+J(1/3,2/3*z^(3/2)))
</li>
<li>
<a href="dbopairybi.xhtml">airyBi</a>: F -> F<br/>
airyBi(z) is the Airy function Bi(z). This function satisfies the
same differential equation as airyAi.
The implementation simply uses the relation<br/>
Bi(-z)=1/3*sqrt(3*z)*(J(-1/3,2/3*z^(3/2))-J(1/3,2/3*z^(3/2)))
</li>
<li>
<a href="dbophypergeometric0f1.xhtml">hypergeometric0F1</a>: (F, F) -> F<br/>
hypergeometric0F1(c,z) is the hypergeometric function 0F1(;c;z). The above
special functions are defined only for small floating point types. If you
give <a href="numfloat.xhtml">Float</a> arguments, they are converted to
<a href="nummachinefloats.xhtml">DoubleFloat</a> by Axiom.
</li>
<li>
<input type="submit" id="p5" class="subbut" onclick="makeRequest('p5');"
value="Gamma(0.5)^2" />
<div id="ansp5"><div></div></div>
</li>
<li>
<input type="submit" id="p6" class="subbut" onclick="makeRequest('p6');"
value="(a:=2.1; b:=1.1; besselI(a+%i*b,b*a+1))" />
<div id="ansp6"><div></div></div>
</li>
</ul>
A number of additional operations may be used to compute numerical
values. These are special polynomial functions that can be evaluated
for values in any commutative ring R, and in particular for values in
any floating-point type. The following operations are provided by the
package <a href="db.xhtml?OrthogonalPolynomialFunctions">
OrthogonalPolynomialFunctions</a>:
<ul>
<li> <a href="dbopchebyshevt.xhtml">chebyshevT</a>:
(nonNegativeInteger,R) -> R
<br/>
chebyshevT(n,z) is the nth Chebyshev polynomial of the first kind,
T[n](z). These are defined by
<br/>
(1-t*z)/(1-2*t*z*t**2)=sum(T[n](z)*t**n,n=0..)
</li>
<li> <a href="dbopchebyshevu.xhtml">chebyshevU</a>:
(nonNegativeInteger,R) -> R
<br/>
chebyshevU(n,z) is the nth Chebyshev polynomial of the second kind,
U[n](z). These are defined by
<br/>
1/(1-2*t*z+t**2)=sum(U[n](z)*t**n,n=0..)
</li>
<li> <a href="dbophermiteh.xhtml">hermiteH</a>:
(NonNegativeInteger,R) -> R
<br/>
hermiteH(n,z) is the nth Hermite polynomial, H[n](z). These are
defined by
<br/>
exp(2*t*z-t**2)=sum(H[n](z)*t**n/n!,n=0..)
</li>
<li> <a href="dboplaguerrel.xhtml">laguerreL</a>:
(NonNegativeInteger,R) -> R
<br/>
laguerreL(n,z) is the nth Laguerre polynomial, L[n](z). These are
defined by
<br/>
(exp(-t*z/(1-t))/(1-t)=sum(L[n](z)*t**n/n!,n=0..)
</li>
<li> <a href="dboplaguerrel.xhtml">laguerreL</a>:
(NonNegativeInteger,NonNegativeInteger,R) -> R
<br/>
labuerreL(m,n,2) is the associated Laguerre polynomial, L<m>[n](z).
This is the nth derivative of L[n](z).
</li>
<li> <a href="dboplegendrep.xhtml">legendreP</a>:
(NonNegativeInteger,R) -> R
<br/>
legendreP(n,z) is the nth Legendre polynomial, P[n](z). These are
defined by
<br/>
1/sqrt(1-2*z*t+t**2)=sum(P[n](z)*t**n,n=0..)
</li>
</ul>
<br/>
<br/>
These operations require non-negative integers for the indices,
but otherwise the argument can be given as desired.
<ul>
<li>
<input type="submit" id="p7" class="subbut"
onclick="makeRequest('p7');"
value="[chebyshevT(i,z) for i in 0..5]" />
<div id="ansp7"><div></div></div>
</li>
</ul>
The expression chebyshevT(n,z) evaluates to the nth Chebyshev polynomial
of the first kind.
<ul>
<li>
<input type="submit" id="p8" class="subbut"
onclick="makeRequest('p8');"
value="chebyshevT(3,5.0+6.0*%i)" />
<div id="ansp8"><div></div></div>
</li>
<li>
<input type="submit" id="p9" class="subbut"
onclick="makeRequest('p9');"
value="chebyshevT(3,5.0::DoubleFloat)" />
<div id="ansp9"><div></div></div>
</li>
</ul>
The expression chebyshevU(n,z) evaluates to the nth Chebyshev polynomial
of the second kind.
<ul>
<li>
<input type="submit" id="p10" class="subbut"
onclick="makeRequest('p10');"
value="[chebyshevU(i,z) for i in 0..5]" />
<div id="ansp10"><div></div></div>
</li>
<li>
<input type="submit" id="p11" class="subbut"
onclick="makeRequest('p11');"
value="chebyshevU(3,0.2)" />
<div id="ansp11"><div></div></div>
</li>
</ul>
The expression hermiteH(n,z) evaluates to the nth Hermite polynomial.
<ul>
<li>
<input type="submit" id="p12" class="subbut"
onclick="makeRequest('p12');"
value="[hermiteH(i,z) for i in 0..5]" />
<div id="ansp12"><div></div></div>
</li>
<li>
<input type="submit" id="p13" class="subbut"
onclick="makeRequest('p13');"
value="hermiteH(100,1.0)" />
<div id="ansp13"><div></div></div>
</li>
</ul>
The expression laguerreL(n,z) evaluates to the nth Laguerre polynomial.
<ul>
<li>
<input type="submit" id="p14" class="subbut"
onclick="makeRequest('p14');"
value="[laguerreL(i,z) for i in 0..4]" />
<div id="ansp14"><div></div></div>
</li>
<li>
<input type="submit" id="p15" class="subbut"
onclick="makeRequest('p15');"
value="laguerreL(4,1.2)" />
<div id="ansp15"><div></div></div>
</li>
<li>
<input type="submit" id="p16" class="subbut"
onclick="makeRequest('p16');"
value="[laguerreL(j,3,z) for j in 0..4]" />
<div id="ansp16"><div></div></div>
</li>
<li>
<input type="submit" id="p17" class="subbut"
onclick="makeRequest('p17');"
value="laguerreL(1,3,2.1)" />
<div id="ansp17"><div></div></div>
</li>
</ul>
The expression legendreP(n,z) evaluates to the nth Legendre polynomial.
<ul>
<li>
<input type="submit" id="p18" class="subbut"
onclick="makeRequest('p18');"
value="[legendreP(i,z) for i in 0..5]" />
<div id="ansp18"><div></div></div>
</li>
<li>
<input type="submit" id="p19" class="subbut"
onclick="makeRequest('p19');"
value="legendreP(3,3.0*%i)" />
<div id="ansp19"><div></div></div>
</li>
</ul>
<br/>
<br/>
Finally, three number-theoretic polynomial operations may be evaluated.
The following operations are provided by the package
<a href="db.xhtml?NumberTheoreticPolynomialFunctions">
NumberTheoreticPolynomialFunctions</a>.
<ul>
<li> <a href="dbopbernoullib.xhtml">bernoulliB</a>:
(NonNegativeInteger,R) -> R
<br/>
bernoulliB(n,z) is the nth Bernoulli polynomial, B[n](z). These are
defined by
<br/>
t*exp(z*t)/(exp t - 1)=sum(B[n](z)*t**n/n! for n=0..)
</li>
<li> <a href="dbopeulere.xhtml">eulerE</a>:
(NonNegativeInteger,R) -> R
<br/>
eulerE(n,z) is the nth Euler polynomial, E[n](z). These are defined by
<br/>
2*exp(z*t)/(exp t + 1)=sum(E[n](z)*t**n/n! for n=0..)
</li>
<li> <a href="dbopcyclotomic.xhtml">cyclotomic</a>:
(NonNegativeInteger,R) -> R
<br/>
cyclotomic(n,z) is the nth cyclotomic polynomial φ(n,z).
This is the polynomial whose roots are precisely the primitive nth
roots of unity. This polynomial has degree given by the Euler
totient function φ(n).
</li>
</ul>
The expression bernoulliB(n,z) evaluates to the nth Bernoulli polynomial.
<ul>
<li>
<input type="submit" id="p20" class="subbut"
onclick="makeRequest('p20');"
value="bernoulliB(3,z)" />
<div id="ansp20"><div></div></div>
</li>
<li>
<input type="submit" id="p21" class="subbut"
onclick="makeRequest('p21');"
value="bernoulliB(3,0.7+0.4*%i)" />
<div id="ansp21"><div></div></div>
</li>
</ul>
The expression eulerE(n,z) evaluates to the nth Euler polynomial.
<ul>
<li>
<input type="submit" id="p22" class="subbut"
onclick="makeRequest('p22');"
value="eulerE(3,z)" />
<div id="ansp22"><div></div></div>
</li>
<li>
<input type="submit" id="p23" class="subbut"
onclick="makeRequest('p23');"
value="eulerE(3,0.7+0.4*%i)" />
<div id="ansp23"><div></div></div>
</li>
</ul>
The expression cyclotomic(n,z) evaluates to the nth cyclotomic polynomial.
<ul>
<li>
<input type="submit" id="p24" class="subbut"
onclick="makeRequest('p24');"
value="cyclotomic(3,z)" />
<div id="ansp24"><div></div></div>
</li>
<li>
<input type="submit" id="p25" class="subbut"
onclick="makeRequest('p25');"
value="cyclotomic(3,(-1.0+0.0*%i)**(2/3))" />
<div id="ansp25"><div></div></div>
</li>
</ul>
<br/>
<br/>
Drawing complex functions in Axiom is presently somewhat awkward compared
to drawing real functions. It is necessary to use the
<a href="dbopdraw.xhtml">draw</a> operations that operate on functions
rather than expressions.
This is the complex exponential function. When this is displayed in color,
the height is the value of the real part of the function and the color is
the imaginary part. Red indicates large negative imaginary values, green
indicates imaginary values near zero and blue/violet indicates large
positive imaginary values.
<ul>
<li>
<input type="submit" id="p26" class="subbut"
onclick="makeRequest('p26');"
value='draw((x,y)+->real exp complex(x,y),-2..2,-2*%pi..2*%pi,colorFunction==(x,y)+->imag exp complex(x,y),title=="exp(x+%i*y)",style=="smooth")' />
<div id="ansp26"><div></div></div>
</li>
</ul>
This is the complex arctangent function. Again, the height is the real part
of the function value but here the color indicates the function value's phase.
The position of the branch cuts are clearly visible and one can see that the
function is real only for a real argument.
<ul>
<li>
<input type="submit" id="p27" class="subbut"
onclick="makeRequest('p27');"
value='vp:=draw((x,y)+->real atan complex(x,y),-%pi..%pi,-%pi..%pi,colorFunction==(x,y)+->argument atan complex(x,y),title=="atan(x+%i*y)",style=="shade"); rotate(vp,-160,-45); vp' />
<div id="ansp27"><div></div></div>
</li>
</ul>
This is the complex Gamma function.
<ul>
<li>
<input type="submit" id="p28" class="subbut"
onclick="makeRequest('p28');"
value='draw((x,y)+->max(min(real Gamma complex(x,y),4),-4),-%pi..%pi,-%pi..%pi,style=="shade",colorFunction==(x,y)+->argument Gamma complex(x,y),title=="Gamma(x+%i*y)",var1Steps==50,var2Steps==50)' />
<div id="ansp28"><div></div></div>
</li>
</ul>
This shows the real Beta function near the origin.
<ul>
<li>
<input type="submit" id="p29" class="subbut"
onclick="makeRequest('p29');"
value='draw(Beta(x,y)/100,x=-1.6..1.7,y=-1.6..1.7,style=="shade",title=="Beta(x,y)",var1Steps==40,var2Steps==40)' />
<div id="ansp29"><div></div></div>
</li>
</ul>
This is the Bessel function J(alpha,x) for index alpha in the range -6..4 and
argument x in the range 2..14.
<ul>
<li>
<input type="submit" id="p30" class="subbut"
onclick="makeRequest('p30');"
value='draw((alpha,x)+->min(max(besselJ(alpha,x+8),-6), 6),-6..4,-6..6,title=="besselJ(alpha,x)",style=="shade",var1Steps==40,var2Steps==40)' />
<div id="ansp30"><div></div></div>
</li>
</ul>
This is the modified Bessel function I(alpha,x) evaluated for various real
values of the index alpha and fixed argument x=5.
<ul>
<li>
<input type="submit" id="p31" class="subbut"
onclick="makeRequest('p31');"
value="draw(besselI(alpha,5),alpha=-12..12,unit==[5,20])" />
<div id="ansp31"><div></div></div>
</li>
</ul>
This is similar to the last example except the index alpha takes on complex
values in a 6x6 rectangle centered on the origin.
<ul>
<li>
<input type="submit" id="p32" class="subbut"
onclick="makeRequest('p32');"
value='draw((x,y)+->real besselI(complex(x/20,y/20),5),-60..60,-60..60,colorFunction==(x,y)+->argument besselI(complex(x/20,y/20),5),title=="besselI(x+i*y,5)",style=="shade")' />
<div id="ansp32"><div></div></div>
</li>
</ul>
</body>
</html>
|