home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / sci / math / symbolic / 3009 < prev    next >
Encoding:
Text File  |  1992-11-17  |  31.9 KB  |  768 lines

  1. Newsgroups: sci.math.symbolic
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!spool.mu.edu!yale.edu!ira.uka.de!chx400!bernina!neptune!monagan
  3. From: monagan@inf.ethz.ch (Michael)
  4. Subject: Maple V Release 2
  5. Message-ID: <1992Nov17.175606.20110@neptune.inf.ethz.ch>
  6. Keywords: Maple
  7. Sender: news@neptune.inf.ethz.ch (Mr News)
  8. Nntp-Posting-Host: rutishauser-gw.inf.ethz.ch
  9. Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH), Zurich, CH
  10. Date: Tue, 17 Nov 1992 17:56:06 GMT
  11. Lines: 755
  12.  
  13. Here is a summary of the new facilities in Release 2.
  14. I'm sending this in two parts because it's large.
  15. I've put a LaTeX version in the file maple/5.2/tex/summary.tex
  16. in the Maple share library if you want a better copy.
  17. You can get the files using anonymous ftp from
  18. daisy.uwaterloo.ca  or  neptune.inf.ethz.ch
  19.  
  20. Michael Monagan
  21.  
  22.  
  23.  
  24.      New features that have been added for Maple V Release 2
  25.      -------------------------------------------------------
  26.  
  27. Development of Improved User Interfaces
  28. =======================================
  29.  
  30. New user interfaces for Maple which include as a minimum 3-dimensional graphics,
  31. and some command line editing facility have been designed since the release of
  32. Maple V for the X Window system, Sunview, Macintosh, Amiga DOS, Vax VMS, NeXT,
  33. and the PC under Windows and MS/DOS.  The new user interfaces for Release 2
  34. will include worksheets, output real mathematical formulae, and a help browser.
  35.  
  36. 1: Maple worksheets
  37. -------------------
  38. Beginning with the Macintosh user interface for Maple V, the new user
  39. interfaces will all support the concept of a "worksheet" which integrates text,
  40. Maple input commands, Maple output, and graphics into one document.  Worksheets
  41. have been standardized and are being ported to other platforms for Release 2.
  42. They provide editable input and text fields, simple commands for re-executing
  43. parts of worksheets etc.  A collection of examples of applications of Maple
  44. will be now be distributed in the form of worksheets.  A new save facility is
  45. being added that will also save the state of a worksheet as well as the display.
  46.  
  47. 2: Two-dimensional output
  48. -------------------------
  49. Beginning with Release 2 of the X Window interface, new interfaces will
  50. display output using mathematical, Greek, and italics fonts, with proper
  51. subscripts and superscripts for improved display of mathematical formulae.
  52.  
  53. 3: Help topic browser
  54. ---------------------
  55. Beginning with Sunview user interface in Maple V, new user interfaces will
  56. include a help browser for accessing the on-line help information.
  57.  
  58. 4: Unix Maple interface
  59. -----------------------
  60. Now supports command line editing using a vi and emacs like editor.
  61. Hitting the interrupt key Ctrl-C twice will no longer kill a Maple session, it
  62. will only interrupt the current calculation.  The quit key Ctrl-\ can be used
  63. to immediately kill the Maple session.  Also, running a Maple session in a
  64. shell under the X Window system, interface(plotdevice=x11); will allow you to
  65. access the X plotting facilities.
  66.  
  67. 5: X Window interface
  68. ---------------------
  69. The interface has been redesigned to follow Motif style conventions.  The help
  70. index is accessible from a menu.  The user input fields and the Maple output
  71. fields are completely separated.  Hardcopy output (PostScript) is available for
  72. worksheets including output of mathematical formulae.  Input, text and output
  73. fonts can be set interactively.
  74.  
  75. 6: Improved error messages
  76. --------------------------
  77. The new type checking facility results in better error messages, e.g.
  78.  
  79.   > f := proc(n:integer) if n < 0 then 0 else n fi end:
  80.   > f(x);
  81.   Error, f expects its 1st argument, n, to be of type integer, but received x
  82.  
  83. Not all Maple functions have been updated yet to make use of this new facility.
  84. This should be completed by the next version of Maple.
  85.  
  86. 6: On-line tutorial
  87. -------------------
  88.  
  89. An on-line introductory tutorial has been added for Release 2.  For more
  90. information see ?tutorial .  Note you can write your own tutorial using the
  91. readline, parse and printf commands.
  92.  
  93.  
  94.  
  95. Graphics
  96. ========
  97.  
  98. The Maple plotting facility consists of two parts, the rendering of the picture
  99. which is written in C, and the point generation which is done in Maple.  The
  100. basic 2 dimensional plotting command is plot(f(x),x=a..b);.  It creates a
  101. PLOT data structure which contains the points, which then is displayed by
  102. the user interface.  The 3 dimensional plotting command is
  103. plot3d(f(x,y),x=a..b,y=c..d);.  It creates a PLOT3D data structure.
  104. Thus the PLOT and PLOT3D data structures define the what can be displayed.
  105. Details on these data structures can be obtained from  ?plot3d,structure
  106.  
  107. 1: Improvements to rendering and the PLOT and PLOT3D data structures
  108. --------------------------------------------------------------------
  109. - better (more robust but slower) hidden line removal algorithm
  110. - the PLOT3D data structure supports text and polygon primitives
  111. - PLOT and PLOT3D include support for 2 and 3 D frame sequence animation
  112. - the PLOT3D data structure supports a contour plot style option,
  113.    which is also accessible interactively from the style menu
  114. - The plotting primitives in the PLOT and PLOT3D data structures have
  115.    been made more flexible e.g. each object can have its style and
  116.    colour assigned individually.
  117. - a wider choice of colours, with more user control of surface colouring
  118.    (PLOT3D).
  119. - addition of Lighting models
  120. - We have also made the PLOT and PLOT3D data structures compatible.
  121.  
  122. 2: Device support
  123. -----------------
  124. - encapsulated postscript, colour postscript and grayscale shading postscript
  125.   output are now supported
  126. - addition of HP Laserjet output
  127. - a wider selection of output devices for PLOT3D are supported in particular
  128.    any device that is supported in 2 dimensions including tektronics, i300
  129.    imagen laser printer, Unix plot, DEC ln03 laser printer etc.
  130.  
  131. 3: New plotting facilities and improvements (plots package)
  132. -----------------------------------------------------------
  133. This is a list of the new plotting tools.  All are written in Maple, making
  134. use of the PLOT and PLOT3D data structures.  For details see the section
  135. on the plots package in the section on the Library Packages.
  136. - 2d and 3d animation
  137. - 2d and 3d implicit plotting
  138. - 2d and 3d vectorfield and gradient plots
  139. - Density plots
  140. - Plotting of dsolve(...,numeric) procedures in odeplot
  141. - Plotting of polygons and polyhedra
  142. - Log and log-log plots
  143. - Phase portraits and direction field plots, plotting of 1-st order and
  144.    2-nd order differential equations (in DEtools package)
  145. - Ability to specify color function for objects in plot3d, tubeplot,
  146.    vectorfield and gradient plots, etc.
  147.  
  148.  
  149. New and Enhanced Mathematical Facilities
  150. ========================================
  151.  
  152. 1: New mathematical functions known to Maple
  153. --------------------------------------------
  154. - The floor and ceiling functions floor(x) and ceil(x)
  155. - The Elliptic integrals where 0<k<1 and c = sqrt(1-k^2)
  156.   LegendreE(x,k) = int( (1-k^2*t^2)/sqrt(1-t^2)/sqrt(1-k^2*t^2), t=0..x )
  157.   LegendreEc(k) = int( (1-k^2*t^2)/sqrt(1-t^2)/sqrt(1-k^2*t^2), t=0..1 )
  158.   LegendreEc1(k) = int( (1-k^2*t^2)/sqrt(1-t^2)/sqrt(1-c^2*t^2), t=0..1 )
  159.   LegendreF(x,k) = int( 1/sqrt(1-t^2)/sqrt(1-k^2*t^2), t=0..x )
  160.   LegendreKc(k) = int( 1/sqrt(1-t^2)/sqrt(1-k^2*t^2), t=0..1 )
  161.   LegendreKc1(k) = int( 1/sqrt(1-t^2)/sqrt(1-c^2*t^2), t=0..1 )
  162.   LegendrePi(x,k,a) = int( 1/(1-a*t^2)/sqrt(1-t^2)/sqrt(1-k^2*t^2), t=0..x )
  163.   LegendrePic(k,a) = int( 1/(1-a*t^2)/sqrt(1-t^2)/sqrt(1-k^2*t^2), t=0..1 )
  164.   LegendrePic1(k,a) = int( 1/(1-a*t^2)/sqrt(1-t^2)/sqrt(1-c^2*t^2), t=0..1 )
  165. - Routines for complex numbers Re(z), Im(z), argument(z), conjugate(z), csgn(z)
  166. - Routines for computing the magnitude of a number ilog[b](x), ilog10(x)
  167. - Utility routine polar(z) to allow computing with complex numbers in polar
  168.    form i.e. polar(a,b) = a \cos (b) + i a \sin (b)
  169. - The logarithmic integral Li(x) = Ei(ln(x)) for x > 1
  170. - The exponential integrals Ei(n,x) = int(exp(t)/t^n,t=1..infinity) for Re(x)>0
  171.    extended by analytic continuation to the complex plane except for 0
  172.    when n=1.  Note Ei(x) is the Cauchy principle value.
  173. - Ssi(x) the shifted sine integral
  174. - W(n,x), the W function satisfying exp(W(x))*W(x) = x where n, any integer,
  175.    specifies a branch cut.  Note W(x) is the principle branch
  176. - erfc(n,x) = int(erfc(n-1,t),t=x..infinity), for n=1,2,... where
  177.    erfc(0,x) = erfc(x).  Note erfc(n,z) corresponds to "i^n erfc z" notation
  178.    in Abramowitz & Stegun 
  179. - The derivatives of signum, csgn, trunc, frac, round, floor, ceil implemented
  180.    as signum(1,x), csgn(1,x) etc.
  181.  
  182. 2: Enhanced numerical facilities
  183. --------------------------------
  184. - automatic complex numerical arithmetic, i.e. +, -, *, /, ^
  185. - extend evalf to the complex domain for all elementary functions and erf(z),
  186.    erfc(z), erfc(n,z), GAMMA(z), GAMMA(a,z) (incomplete Gamma function),
  187.    Beta(u,v), Psi(z), Psi(n,z), W(z), W(n,z) (all branches), Ei(z),
  188.    Ci(z), Si(z), Chi(z), Shi(z), Ssi(z)
  189. - Dawson's integral dawson(x) = exp(-x^2) * int(exp(t^2),t=0..x)
  190. - Elliptic integrals, LegendreE(x,k), LegendreEc(k), LegendreEc1(k),
  191.    LegendreF(x,k), LegendreKc(k), LegendreKc1(k), LegendrePi(x,k,a),
  192.    LegendrePic(k,a), LegendrePic1(k,a)
  193. - Li(x) = Ei(ln(x) the logarithmic integral defined only for real x>1
  194. - fsolve has a new algorithm for solving a univariate polynomial over R or C
  195.   which should always succeed and, all digits should be accurate to 0.6 ulps.
  196. - Addition of the Remez algorithm for minimax rational function approximation
  197. - Addition of an adaptive double exponential algorithm for numerical integration
  198. - Addition of Levin's u transform for the numerical evaluation of infinite
  199.    sums, products and limits
  200. - The routines gauselim, gaussjord, rowspace, colspace, eigenvals, eigenvects,
  201.   inverse, det, in the linalg package now all handle matrices of
  202.   floating point and complex floating point entries
  203.  
  204. 3: Algebraic numbers and algebraic functions
  205. --------------------------------------------
  206. The evala facility in Maple V supports polynomial operations over algebraic
  207. number fields.  This facility is used in indefinite integration, eigenvectors,
  208. and solving polynomial equations.  E.g. Maple can factor the polynomial
  209.  
  210.        3               1/2   2           1/2                         1/2
  211.       x  + (- 28 + 16 2   ) x  + (- 288 2    + 384) x - 1792 + 1280 2
  212.  
  213. over the algebraic number field  Q(sqrt(2))  as follows
  214.  
  215.   > a := x^3+(-28+16*sqrt(2))*x^2+(-288*sqrt(2)+384)*x-1792+1280*sqrt(2):
  216.   > factor(a,sqrt(2));
  217.                                        1/2               1/2
  218.                    (x - 8) (x - 8 + 8 2   ) (x - 12 + 8 2   )
  219.  
  220. Because Maple can do this factorization, it means Maple can compute the
  221. eigenvalues (also the eigenvectors -- see below) of the following matrix, e.g.
  222.  
  223.   > A := matrix( [[5-5*sqrt(2), -2+4*sqrt(2), 5+sqrt(2)],
  224.   >               [-5+sqrt(2),  10-4*sqrt(2), 3+3*sqrt(2)],
  225.   >               [-3+3*sqrt(2), -2+4*sqrt(2), 13-7*sqrt(2)]] ):
  226.   > eigenvals(A);
  227.  
  228.                                       1/2         1/2
  229.                            8, 12 - 8 2   , 8 - 8 2
  230.  
  231. The generalization of the evala facility to algebraic functions in Release 2
  232. means that we can replace the sqrt in the above problem by a sqrt of a formula
  233. and not just an integer, e.g. sqrt(a).  Examples in the following sections
  234. illustrate other new capabilities in Maple which use the evala facility for
  235. integration, polynomial factorization, and symbolic eigenvector calculation.
  236. See also the sections on computing with field extensions describing the
  237. functions Norm, Trace, Indep, and Primfield.
  238.  
  239. 4: Polynomial factorization over algebraic number and function fields
  240. ---------------------------------------------------------------------
  241. Maple V can factor multivariate polynomials over the rational numbers Q and
  242. univariate polynomials over algebraic number fields Q(alpha) as in the above
  243. example.  Release 2 can factor multivariate polynomials over algebraic number
  244. fields.  For example let's factor the polynomial x^6+y^6 over the rationals
  245. then over Q(i) the complex rationals.
  246.  
  247.   > factor(x^6+y^6);
  248.                             2    2    4    2  2    4
  249.                           (x  + y ) (x  - x  y  + y )
  250.  
  251.   > factor(x^6+y^6,I);
  252.  
  253.               2            2    2            2
  254.             (x  - I x y - y ) (x  + I x y - y ) (x - I y) (x + I y)
  255.  
  256. Release 2 can also factor multivariate polynomials over algebraic
  257. function fields e.g. let's factor the following polynomial over Q(sqrt(a)).
  258.  
  259.   > f := x^3 + (16*a^(1/2)-28)*x^2 + (64*a-288*a^(1/2)+256)*x
  260.   >      -512*a+1280*a^(1/2)-768:
  261.   > factor(f,sqrt(a));
  262.  
  263.                                 1/2          1/2
  264.                    (x - 12 + 8 a   ) (x + 8 a    - 8) (x - 8)
  265.  
  266. Two new factorization routines split and AFactor have been added to the
  267. library.  split(a,x) factors a univariate polynomial in x into linear factors
  268. over its splitting field.  evala(AFactor(a)) does a complete factorization
  269. of a multivariate polynomial, i.e. over the algebraic closure of Q, e.g.
  270.  
  271.   > evala(AFactor(x^2-2*y^2));
  272.  
  273.                               2                       2
  274.                 (x - RootOf(_Z  - 2) y) (x + RootOf(_Z  - 2) y)
  275.  
  276. The RootOf value that you see in the output above is Maples notation for
  277. the algebraic numbers which are the solutions to the polynomial equation
  278. _Z^2 - 2 = 0.  In this case, the solutions are +- sqrt(2), i.e. they can
  279. be written in terms of exact radicals.
  280.  
  281. 5: Symbolic eigenvalue and eigenvector computation.
  282. ---------------------------------------------------
  283. The eigenvector routine linalg[eigenvects] returns the eigenvectors of a matrix
  284. represented exactly in terms of the roots of the characteristic polynomial.
  285. For example, for our matrix A used previously, we obtain the eigenvectors
  286.  
  287.   > A := matrix( [[5-5*sqrt(2), -2+4*sqrt(2), 5+sqrt(2)],
  288.   >               [-5+sqrt(2),  10-4*sqrt(2), 3+3*sqrt(2)],
  289.   >               [-3+3*sqrt(2), -2+4*sqrt(2), 13-7*sqrt(2)]] ):
  290.   > eigenvects(A);
  291.  
  292.             1/2               1/2                  1/2
  293.     [8 - 8 2   , 1, {[ -1, - 2   , 1 ]}], [12 - 8 2   , 1, {[ 1, -1, 1 ]}],
  294.  
  295.         [8, 1, {[ 1, 1, 1 ]}]
  296.  
  297. The output is a sequence of lists [e,m,b] where e is the eigenvalue, m
  298. its multiplicity, and b a basis for the eigenspace for e.  In Maple V, the
  299. eigenvects command could handle algebraic numbers, including rational numbers.
  300. Now it can handle algebraic functions, hence matrices of polynomials, e.g.
  301.  
  302.   > A := matrix(4,4,[[a,a,a,0], [b,b,0,c], [b,0,c,c], [0,a,a,a]]);
  303.                                    [ a  a  a  0 ]
  304.                                    [            ]
  305.                                    [ b  b  0  c ]
  306.                               A := [            ]
  307.                                    [ b  0  c  c ]
  308.                                    [            ]
  309.                                    [ 0  a  a  a ]
  310.  
  311.   > factor(charpoly(A,x));
  312.  
  313.           3    2        2      2                            2      2
  314. (x - a) (x  - x  a - c x  - b x  + b c x - c a x - b x a + c  a + b  a + a b c)
  315.  
  316.   > alias(alpha=RootOf(op(2,"),x)): # Denote the roots of the cubic by alpha
  317.   > eigenvects(A);
  318.  
  319.        [a, 1, {[ - c/b, 0, 0, 1 ]}],
  320.  
  321.                                            2
  322.                               2 b a - alpha  + alpha c + alpha a + c a
  323.            [alpha, 1, {[ 1, - ----------------------------------------,
  324.                                               a (b - c)
  325.  
  326.                                                2
  327.                           b a + alpha b - alpha  + alpha a + 2 c a
  328.                           ----------------------------------------, 1 ]}]
  329.                                           a (b - c)
  330.  
  331. Note: the optional argument 'radical' to the eigenvects command asks Maple
  332. to express roots of polynomials as exact radicals where possible instead of in
  333. terms of the RootOf representation.
  334.  
  335. 6: ODEs with Bessel and hypergeometric function solutions
  336. ---------------------------------------------------------
  337. Many more cases are handled with a better algorithm, which gives results
  338. in terms of Bessel functions rather than hypergeometric functions, e.g.
  339.  
  340. > (1-x)*x*diff(y(x),x,x) + (1/3- 23/2*x)*diff(y(x),x) -5*y(x);
  341.  
  342.                     /   2      \
  343.                     |  d       |                  /  d      \
  344.           (1 - x) x |----- y(x)| + (1/3 - 23/2 x) |---- y(x)| - 5 y(x)
  345.                     |   2      |                  \ dx      /
  346.                     \ dx       /
  347.  
  348. > dsolve(",y(x));
  349.  
  350.              y(x) = _C1 hypergeom([1/2, 10], [1/3], x)
  351.  
  352.                          2/3
  353.                   + _C2 x    hypergeom([7/6, 32/3], [5/3], x)
  354.  
  355. 7: Symbolic Fourier transform
  356. -----------------------------
  357. The call fourier(f(s),s,w) computes the fourier transform
  358.  
  359.                infinity
  360.                   /
  361.                  |             - I t w
  362.      F(w) =      |      f(t) e          dt
  363.                  |
  364.                 /
  365.             - infinity
  366.  
  367. For example,
  368.  
  369.   > fourier(s,s,w);
  370.                                2 I Pi Dirac(1, w)
  371.  
  372.   > fourier(1/(4 - I*t)^(1/3),t,w);
  373.  
  374.                      1/2
  375.                     3    GAMMA(2/3) exp(- 4 w) Heaviside(w)
  376.                     ---------------------------------------
  377.                                        2/3
  378.                                       w
  379.  
  380. 8: New limit algorithm
  381. ----------------------
  382. The idea behind the new algorithm is the following.  First locate the most
  383. varying part of the expression.  Treat this indeterminate as a symbol and
  384. compute a series expansion in this symbol alone.  If there is no constant
  385. coefficient in the resulting series, you are done, otherwise, recurse on
  386. that constant coefficient.  Here are some examples
  387.  
  388.   > f := exp(exp(exp(Psi(Psi(Psi(n))))))/n;
  389.  
  390.                            exp(exp(exp(Psi(Psi(Psi(n))))))
  391.                       f := -------------------------------
  392.                                           n
  393.  
  394.   > limit(f,n=infinity);
  395.                                        0
  396.  
  397.   > f := n*(GAMMA(n-1/GAMMA(n))-GAMMA(n)+ln(n));
  398.  
  399.                        /              1                       \
  400.                 f := n |GAMMA(n - --------) - GAMMA(n) + ln(n)|
  401.                        \          GAMMA(n)                    /
  402.  
  403.   > limit( f, n=infinity );
  404.                                       1/2
  405.  
  406. 9: Symbolic simplifications for min, max, trunc, round, ceil, floor, Re, Im
  407. ---------------------------------------------------------------------------
  408. These routines now do quite a number of symbolic simplifications.
  409. Note, interval arithmetic is used by the signum function in these examples
  410. to prove that the constant Pi < sqrt(10) and that cos(2) < 0.
  411.  
  412.   > min( min(Pi,sqrt(10)), min(a+1,a-1), a );
  413.  
  414.                                  min(Pi, a - 1)
  415.  
  416.   > Re( ln(Pi-sqrt(10)) + sqrt(cos(2)) );
  417.  
  418.                                             1/2
  419.                                 ln(- Pi + 10   )
  420.  
  421. 10: Norms and traces in algebraic number and function fields
  422. ------------------------------------------------------------
  423. Norm(alpha,L,K) and Trace(alpha,L,K) compute the norm (trace) of an algebraic
  424. number or function in L over field K.  I.e. the input is over the field L and
  425. the output is over the field K a subfield of L.  The fields L and K are
  426. specified by sets of RootOf's which define the field extensions.  For example
  427.  
  428.   > alias( s2 = RootOf(x^2-2=0), s3 = RootOf(x^2-3=0) ):
  429.   > L := {s2,s3}:   # so L = Q(sqrt(2),sqrt(3)) and
  430.   > K := {s2};      #    K = Q(sqrt(2))
  431.   > evala(Trace(x-s2-s3,L,K));
  432.                                    2 x - 2 s2
  433.  
  434.   > evala(Norm(x-s2-s3,L,K));
  435.                                  2
  436.                                 x  - 2 s2 x - 1
  437.  
  438.   > evala(Norm(x-s2-s3)); # K = Q
  439.  
  440.                                   4       2
  441.                                  x  - 10 x  + 1
  442.  
  443. 11: Computing with field extensions: Indep, Primfield
  444. -----------------------------------------------------
  445. These are tools for computing with nested field extensions.  Indep(L) searches
  446. for relations between between the set of field extensions (RootOfs) L.
  447. Primfield(L,K) computes a primitive element alpha for a set of field
  448. extensions L over the subfield K of L, e.g.
  449.  
  450.   > evala(Primfield({s2,s3}));
  451.                                               3                        3
  452.       [ [%1 = s3 + s2], [s3 = 11/2 %1 - 1/2 %1 , s2 = - 9/2 %1 + 1/2 %1 ]]
  453.  
  454.                                      4        2
  455.   %1 :=                     RootOf(_Z  - 10 _Z  + 1)
  456.  
  457. The result is a list of two elements.  The first element defines the primitive
  458. element alpha as a RootOf the minimal polynomial over K.  We see that the
  459. minimal polynomial in this example is x^4-10*x^2+1.  It equates alpha in terms
  460. of L, i.e. here alpha = sqrt(3)+sqrt(2).  The second entry expresses the field
  461. extensions of K in terms of alpha.  Here sqrt(2) = alpha^3/2-9*alpha/2, and
  462. sqrt(3) = 11/2*alpha-alpha^3/2.
  463.  
  464. 12: Continued fractions
  465. -----------------------
  466. The cfrac routine in the numtheory package now computes continued fraction
  467. expansions for real numbers, polynomials, series, and formulae.  Several forms
  468. are available including simple, regular, simregular, etc.  The utility routines
  469. nthconver, nthnumer, nthdenom return the nth convergent, numerator, denominator
  470. e.g. here is the continued fraction for Pi, and the first few convergents
  471.  
  472.   > with(numtheory):
  473.   > cf := cfrac(Pi,5);
  474.  
  475.                                              1
  476.                       cf := 3 + --------------------------
  477.                                                1
  478.                                 7 + ----------------------
  479.                                                  1
  480.                                     15 + -----------------
  481.                                                    1
  482.                                          1 + -------------
  483.                                                       1
  484.                                              292 + -------
  485.                                                    1 + ...
  486.  
  487.   > seq( nthconver(cf,i), i=0..5 );
  488.  
  489.                                 333  355  103993  104348
  490.                        3, 22/7, ---, ---, ------, ------
  491.                                 106  113   33102   33215
  492.  
  493.   > cf := cfrac(exp(x),x,4,simregular);
  494.                                             x
  495.                    cf := 1 + -------------------------------
  496.                                                 x
  497.                              1 - 1/2 -----------------------
  498.                                                     x
  499.                                      1 + 1/6 ---------------
  500.                                                         x
  501.                                              1 - 1/6 -------
  502.                                                      1 + ...
  503.   > seq(nthconver(cf,i),i=0..3);
  504.  
  505.                                                           2
  506.                               1 + 1/2 x  1 + 2/3 x + 1/6 x
  507.                     1, 1 + x, ---------, ------------------
  508.                               1 - 1/2 x       1 - 1/3 x
  509.  
  510. 13: Diophantine approximation
  511. -----------------------------
  512. The functions  minkowski  and  kronecker  in the number theory package solve
  513. the linear diophantine approximation problem, namely, given real or p-adic
  514. numbers a[i][j] and epsilon[i], and m equations of the form
  515.  
  516.          || sum( a[i][j]*x[j], j=1..m ) || <= epsilon[i],   for i=1..m
  517.  
  518. where || z || means, in the real case, the distance between z and the nearest
  519. integer z, for p-adic case || z || means p-adic valuation (see function valuep
  520. in padic package), solve for integers x[j].  I.e. find integers x[j] and y[i]
  521. such that  abs( sum(a[i][j]*x[j],j=1..n) - y[i] ) <= epsilon[i]  for i=1..m
  522. (in the real case).  This homogeneous case is solved by the minkowski function
  523. where the equations are input in the form
  524.  
  525.       abs( sum( a[i][j]*x[j], j=1..m ) - y[i] ) <= epsilon[i],   for i=1..m
  526.  
  527. For example
  528.  
  529.   > eqn1 := abs(  E*x1 + 2^(1/2)*x2 - y1 ) <= 10^(-2):
  530.   > eqn2 := abs( 3^(1/3)*x1 + Pi*x2 - y2 ) <= 10^(-4):
  531.   > minkowski( {eqn1,eqn2}, {x1,x2}, {y1,y2} );
  532.  
  533.               [x1 = 7484], [x2 = -2534], [y1 = 16760], [y2 = 2833]
  534.  
  535. The non-homogeneous case (more difficult) i.e. for real or p-adic alpha[i],
  536. equations of the form
  537.  
  538.  
  539.     || sum( a[i][j]*x[j], j=1..n ) + alpha[i] || <= epsilon[i],   for i=1..m
  540.  
  541. are solved by the kronecker function.
  542.  
  543.  
  544. New and Enhanced Integration Facilities
  545. =======================================
  546.  
  547. 1: Dirac and Heaviside
  548. ----------------------
  549. Integration now knows about the Heaviside and Dirac functions, e.g.
  550.  
  551.   > int(f(x)*Dirac(x),x=-infinity..infinity);
  552.  
  553.                                    f(0)
  554.  
  555.   > int(f(x)*Heaviside(x),x=-3..4);
  556.  
  557.                                      4
  558.                                     /
  559.                                    |
  560.                                    |  f(x) dx
  561.                                    |
  562.                                   /
  563.                                   0
  564.  
  565. 2: Elliptic integrals
  566. ---------------------
  567. Integration now recognizes Elliptic integrals and reduces them to a normal
  568. form in terms of Legendre functions
  569.  
  570.   > f := sqrt( (1-x^2) * (1/25 + x^2/4) );
  571.  
  572.                                       2 1/2          2 1/2
  573.                       f := 1/10 (1 - x )    (4 + 25 x )
  574.  
  575.   > int(1/f,x=1/2..1);
  576.  
  577.                     10    1/2                1/2         1/2
  578.                    ---- 29    LegendreF(1/2 3   , 5/29 29   )
  579.                     29
  580.  
  581.   > evalf(");
  582.  
  583.                                   2.327355206
  584.  
  585. 3: Algebraic functions
  586. ----------------------
  587. Integration of algebraic functions is now using the Risch-Trager algorithm.
  588. This includes a full implementation of the algebraic part including integrands
  589. which involve parameters and algebraic numbers, e.g.
  590.  
  591.   > alias(alpha=RootOf(y^3-x^2-a,y); # i.e. alpha = (x^2+a)^(1/3)
  592.   > f := (4*alpha^2*x^3+(5*x^4+3*x^2*a)*alpha-3*x^2-3*a)/(x^2+a)/x^2;
  593.  
  594.                        2  3       4      2               2
  595.                 4 alpha  x  + (5 x  + 3 x  a) alpha - 3 x  - 3 a
  596.            f := ------------------------------------------------
  597.                                      2       2
  598.                                    (x  + a) x
  599.  
  600.   > int(f,x);
  601.                             x - 1                      2
  602.                         - 3 ----- + 3 x alpha + 3 alpha
  603.                               x
  604.  
  605. and an implementation of the transcendental part for algebraic functions
  606. which do not contain parameters, e.g.
  607.  
  608.   > alias(alpha=RootOf(y^2-x^3-1,y)); # i.e. beta = sqrt(x^3+1)
  609.   > f := (3*x^4-6*x^3+5*x^2-2*x+2)/(x^5-2*x^4-x+2*x^3+1)*beta
  610.   >     +(3*x^4+5*x^2-5*x^3-2*x)/(x^5-2*x^4-x+2*x^3+1);
  611.  
  612.                 4      3      2                      4      2      3
  613.             (3 x  - 6 x  + 5 x  - 2 x + 2) beta   3 x  + 5 x  - 5 x  - 2 x
  614.        f := ----------------------------------- + ------------------------
  615.                    5      4          3             5      4          3
  616.                   x  - 2 x  - x + 2 x  + 1        x  - 2 x  - x + 2 x  + 1
  617.  
  618.   > int(f,x);
  619.                                    2    3
  620.                                   x  + x  + 1 - 2 x beta
  621.                       2 beta - ln(----------------------)
  622.                                         3    2     2
  623.                                       (x  - x  + 1)
  624.  
  625. 4: Integration of the W function
  626. --------------------------------
  627. Indefinite integration now uses an inverse function transformation to
  628. transform integrals involving the W function (where note W(x) is the function
  629. defined to satisfy exp(W(x))*W(x)=x) of linear arguments to elementary
  630. defined to satisfy e^{W}(x)} W}(x) = x ) of linear arguments to elementary
  631. functions, hence the following integrals are computed
  632.  
  633.   > int(x/W(x),x);
  634.                                     2           2
  635.                                    x           x
  636.                               1/2 ---- + 1/4 -----
  637.                                   W(x)           2
  638.                                              W(x)
  639.   > int(1/W(x),x);
  640.                                 x
  641.                               ---- - Ei(1, - W(x))
  642.                               W(x)
  643.  
  644. 5: The exponential integral, error function, and related integrals
  645. ------------------------------------------------------------------
  646. Indefinite integration of the forms g(x)*sin(f(x)) and g(x)*cos(f(x)) where
  647. g(x) is a rational function in x and f(x) is a quadratic polynomial in x are
  648. expressed in terms of the Fresnel integrals FresnelC(x) and FresnelS(x),
  649. and the cosine and sine integrals Ci(x) and Si(x).  Note, Maple V can do
  650. these examples, but the answer involves complex error functions and
  651. Exponential integrals of complex arguments
  652.  
  653.   > int( 5*x^4*sin(2*x^2+1), x );
  654.  
  655.                   3        2         15           2
  656.            - 5/4 x  cos(2 x  + 1) + ---- x sin(2 x  + 1)
  657.                                        16
  658.  
  659.             15    1/2 /                    x                          x   \
  660.          - ---- Pi    |cos(1) FresnelS(2 -----) + sin(1) FresnelC(2 -----)|
  661.             32        |                    1/2                        1/2 |
  662.                       \                  Pi                         Pi    /
  663.  
  664.   > int( sin(u*x^2-v)/x, x );
  665.  
  666.                                    2                     2
  667.                   1/2 cos(v) Si(u x ) - 1/2 sin(v) Ci(u x )
  668.  
  669. 6: New classes of definite integrals
  670. ------------------------------------
  671. Several new classes of infinite indefinite integrals are now handled.
  672. These are computed by evaluating derivatives of special functions
  673. and exploiting symmetry.  For example, for p>0 and q>0, the class
  674.  
  675.                     infinity
  676.                        /
  677.                       |       (a - 1)          s     q
  678.                       |      x        exp(- p x  - ----) dx
  679.                       |                              s
  680.                      /                              x
  681.                      0
  682.  
  683. in general can be expressed in terms of the Bessel K function e.g.
  684.  
  685.   > assume(p>0);
  686.   > assume(q>0);
  687.   > int( x^2*exp(-p*x^3-q/x^3), x=0..infinity );
  688.  
  689.                             1/2                1/2   1/2
  690.                           q~    BesselK(1, 2 p~    q~   )
  691.                       2/3 -------------------------------
  692.                                          1/2
  693.                                        p~
  694.  
  695. Note, the appearance of p~ and q~ in this answer indicates that assumptions
  696. about p and q have been made.
  697. Also, several classes involving Bessel functions e.g. for u>0,v>0, the class
  698.  
  699.             infinity
  700.               /
  701.               |              s    w                  s/2
  702.               |     exp(- u t )  t    BesselJ(v , c t    )   dt
  703.               |
  704.              /
  705.              0
  706.  
  707. in general results in 1 F 1, the confluent hypergeomic function, e.g.
  708.  
  709.   > int( exp(-t)*t^2*BesselJ(1,sqrt(t)), t=0..infinity );
  710.  
  711.                       15    1/2
  712.                      ---- Pi    hypergeom([7/2], [2], -1/4)
  713.                       16
  714.  
  715. Also classes involving the error functions, e.g. for u>0
  716.  
  717.   > assume(u>0);
  718.   > Int( exp(-u*x^2)*erf(b*x), x=0..infinity ) = 
  719.   > int( exp(-u*x^2)*erf(b*x), x=0..infinity );
  720.  
  721.                                                              b
  722.                 infinity                            arctan(-----)
  723.                    /                                         1/2
  724.                   |                2                       u~
  725.                   |      exp(- u~ x ) erf(b x) dx = -------------
  726.                   |                                    1/2   1/2
  727.                  /                                   Pi    u~
  728.                  0
  729.  
  730. 7: Handling singularities in an indefinite integral
  731. ---------------------------------------------------
  732. Definite integration now uses a new algorithm to resolve integrals which have
  733. discontinuities (removable or non-removable) in the result from indefinite
  734. integration.  For example,
  735.  
  736.   > int( 1/(5+3*cos(x)), x=0..13*Pi/2 );
  737.  
  738.                             1/2 arctan(1/2) + 3/2 Pi
  739.  
  740. This result was obtained by first computing the indefinite integral
  741.  
  742.   > int( 1/(5+3*cos(x)), x );
  743.  
  744.                            1/2 arctan(1/2 tan(1/2 x))
  745.  
  746. then by taking limits given the following information about the discontinuities
  747.  
  748.   > readlib(discont)(",x);
  749.                                 {2 Pi _Z1 + Pi}
  750.  
  751. A second example showing that Maple can prove that this integral diverges,
  752. instead of returning unevaluated -- meaning I don't know.
  753.  
  754.   > int(1/x^2,x=-1..1);
  755.                                     infinity
  756.  
  757. Also, the addition of the CauchyPrincipalValue option to int handles
  758.  
  759.   > int( 1/x, x=-1..1, CauchyPrincipalValue);
  760.  
  761.                                        0
  762.  
  763.   > int( exp(-t)/t, t=-2..infinity, CauchyPrincipalValue );
  764.  
  765.                                     - Ei(2)
  766.  
  767.  
  768.