Computer algebra systems, mathematical representation, and the DLMF
description
Transcript of Computer algebra systems, mathematical representation, and the DLMF
Computer algebra systems, Computer algebra systems, mathematical representation, and the mathematical representation, and the DLMFDLMF
Richard Fateman, Bruce Char, Jeremy JohnsonUniversity of California, Berkeley
Drexel University, Philadelphia
National Institute of Standards and Technology
DLMF Seminar Series, November 6, 2000
Computer Algebra and DLMF 2
Desiderata for the Digital Library of Desiderata for the Digital Library of Mathematical FunctionsMathematical Functions
Traditional usage New modes of interaction
– Examples
New ambitions
Computer Algebra and DLMF 3
Non-digital tradition: Finding Out StuffNon-digital tradition: Finding Out Stuff
Individually owned reference works Access to libraries’ references works Access to colleagues by letter, phone,
email Paper and pencil exploration Numerical experimentation
Computer Algebra and DLMF 4
Wolfram Research’s Special Functions Wolfram Research’s Special Functions site: 3 versionssite: 3 versions
Huge posters Interactive web site/ Mathematica
notebooks Printed form (or the equivalent PDF)
Computer Algebra and DLMF 5
The postersThe posters
Computer Algebra and DLMF 6
The web site (here, the Arcsin page)The web site (here, the Arcsin page)
Computer Algebra and DLMF 7
WRI’s Categories/ Some SubcategoriesWRI’s Categories/ Some Subcategoriesprimary definitionspecific valuesgeneral characteristicsseries representations generalized power series at various points q-series exponential fourier series dirichlet series asymptotic series other seriesintegral reprsentations on the real axis contour integrals multiple integral representationanalytic continuationsproduct representationslimit representations
continued fractionsgenerating functionsgroup representationsdifferential equationsdifference equationstransformations addition formulas etcoperationsintegral transformsidentitiesrepresentations through more general functionsrelations with other functionszerosinequalitiestheorems other informationhistory and applicationsreferences
Computer Algebra and DLMF 8
Click on “Series Representations”…Click on “Series Representations”…
Computer Algebra and DLMF 9
This is not very usefulThis is not very useful These are blurry pictures of math formulas. The most plausible next step seems to be to copy
them down on paper and check by hand. There is a possibility of making typos or fresh algebra
mistakes. The notation might be different from what you are
using. Sparse (or no) info on singularities, regions of
validity. To run some numbers through, you need to write a
computer program (Fortran? Matlab? C++?)
Computer Algebra and DLMF 10
Notebook form (I)Notebook form (I)
ArcSin[z] == z^3/6 + z + (3*z^5)/40 + \[Ellipsis] ==
Sum[(Pochhammer[1/2, k]*z^(2*k + 1))/((2*k + 1)*k!),
{k, 0, Infinity}] ==
z*Hypergeometric2F1[1/2, 1/2, 3/2, z^2] /; Abs[z] < 1
Input form
One could imagine that a “system independent” language such as proposed by the OpenMath consortium would replace this language. Note however that agreement on the semantics of \[Ellipsis] would be difficult.
Computer Algebra and DLMF 11
Notebook form (II)Notebook form (II)Displayed form (one version)
In reality, Mathematica does not look quite as good as this in the interactive mode.
Computer Algebra and DLMF 12
Notebook form (III)Notebook form (III)TeX form
{Condition}(\arcsin (z) =
{\frac{{{\Mfunction{z}}^3}}{6}} + z +
{\frac{3\,{z^5}}{40}} + \ldots =
\Mfunction{\sum}_{k = 0}^{\infty }
{\frac{\Mfunction{Pochhammer}({\frac{1}{2}},k)\,
{{\Mfunction{z}}^{2\,k + 1}}}{\left( 2\,k + 1
\right) \,k!}} =
\Mfunction{z}\,\Mfunction{Hypergeometric2F1}(
{\frac{1}{2}},{\frac{1}{2}},{\frac{3}{2}},{z^2}),
\Mfunction{Abs}(z) < 1))
Useful in case you wanted to paste/edit this into another paper, using Mathematica TeX macros.
Computer Algebra and DLMF 13
Computing Inside the NotebookComputing Inside the NotebookHow good is the 3-term approximation at z= ½ ?
ArcSin[z] == z + z^3/6 + (3*z^5)/40 + ... /. z -> 1/2
Pi/6 == 2009/3840 + ... Surprised?
N[ Pi/6 == 2009/3840 + ...] 0.523599 == 0.523177 + ...
N[ Pi/6 == 2009/3840 + ..., 30] 0.523599 == 0.523177 + ...
N[ Pi/6 == 2009/3840 + ..., 30] 0.52359877559829887307710723055 == 0.52317708333333333333333333333 + ...
Computer Algebra and DLMF 14
Simplification Inside the NotebookSimplification Inside the Notebook
In[30] := z* Hypergeometric2F1[1/2, 1/2, 3/2, z^2]
Note: this is how Mathematica interactive output looks.
This should be the same as ArcSin[z] for |z|<1. And yes, z/Sqrt[z^2] is not the same as 1.
Computer Algebra and DLMF 15
All commercial computer algebra All commercial computer algebra systems (CAS) have essentially the same systems (CAS) have essentially the same notebook paradigmnotebook paradigm Macsyma Maple Mathematica Axiom MuPad Scientific Word / Maple Derive
Computer Algebra and DLMF 16
Advice on coding a reference chapterAdvice on coding a reference chapter
Computer Algebra and DLMF 17
What about legacy “knowledge”? Can What about legacy “knowledge”? Can we convert from scanned text?we convert from scanned text?
Example from integral table
In practice, we can do some parsing using OCR if we know about the domains.
But in general, we cannot read “with understanding”.
Computer Algebra and DLMF 18
What about using LaTeX as source and What about using LaTeX as source and then converting to OpenMath/ CAS?then converting to OpenMath/ CAS?
Generally speaking: not automatically
TeX does not distinguish semantically between 1*2*3 and 123. Or between x cos x and xfoox.It has no notion of precedence of operators
Gradshteyn and Rhyzik, Table of Integrals and Series (Academic Press) was re-typeset completely in TeX TWICE, because the first version did not reflect semantics. MathML, XML, and OpenMath are inadequate.
Computer Algebra and DLMF 19
Using OpenMath as original source is Using OpenMath as original source is pretty much out of the question.pretty much out of the question.
Intent is to code:
x cos x
<OMOBJ>
<OMA>
<OMS cd = "arith1" name="times"/>
<OMV name="x"/>
<OMA>
<OMS cd="transc1" name="cos"/>
<OMV name="x"/>
</OMA>
</OMA>
</OMOBJ>
Computer Algebra and DLMF 20
Using MathML as original source is Using MathML as original source is pretty much out of the question, too.pretty much out of the question, too.
<math> <msqrt> <mfrac> <mrow><mn>2</mn><mi>π</mi></mrow> <mrow><mi>κ</mi></mrow> </mfrac> <mfenced open="(" close=")"> <mn>1</mn> <mi>−</mi> <mi>β</mi> <msup> <mrow><mn>2</mn></mrow> </msup> <mi>/</mi><mn>2</mn></mfenced></msqrt></math>
Computer Algebra and DLMF 21
What can a CAS do better?What can a CAS do better?
•Semantics for what makes sense to the CAS is immediate.
•Presentation for what doesn’t make sense to the CAS
•Advantage: There is an immediate computational ontology
•Immediate syntactic disambiguation
•Easy translation into MathML for display•Easy translation into OpenMath, if anyone else cares.
Computer Algebra and DLMF 22
What about using Java Applets?What about using Java Applets?
Pro: – an applet provides more intimate interaction with a user.
• Examples from Math Forum …
Con: – Only Java-enabled clients can use such applets.– Java standardization is problematical– High quality numerical software in Java?– Symbolic computation in Java?– Poor access to underlying computer.
Computer Algebra and DLMF 23
What about Server Side software?What about Server Side software?
Pro: – arbitrarily powerful – could be huge database
and super-fast computer– always up-to-date– controlled by validation team? – Can collect / re-distribute new data
Computer Algebra and DLMF 24
What about Server Side software?What about Server Side software?
Con: – Risk/cost of computation at server – Communication requirement
• Cost• Connection reliability
Computer Algebra and DLMF 25
What about no software?What about no software?
Pro: – You can “run” DLMF without a computer – You can work on a desert island
Con: – Anyone with a computer or electricity will be
disappointed
Computer Algebra and DLMF 26
What about only browser software?What about only browser software?
Pro: – You can “run” DLMF on an appliance ($300)
Con: – Loss in the marketplace of ideas
• In some respects it will suffer from comparison with software, some of which is free today
• Students who are used to (say) Mathematica will use other resources, even if less authoritative
Computer Algebra and DLMF 27
What about numeric-only software?What about numeric-only software?
Pro: – You print numeric tables as needed
Con: – Symbolic data is endlessly tabulated instead.
etc
Computer Algebra and DLMF 28
What about symbolic softwareWhat about symbolic software
Now we can consider including algorithms for – trig(n/m )– Indefinite integrals (replacing 10-20,000)– Summation, Limits– Definite integrals (a challenge still)– Implicit application of identities, reduction of argument
or order by recursion, etc.– Generation of any number of terms in series– Expansion in Chebyshev or other polynomials– Exact arithmetic or “bigfloat” arithmetic
Computer Algebra and DLMF 29
A challenge: Include a CAS in DLMFA challenge: Include a CAS in DLMF
Free Macsyma (c. 1982) (buy) Commercial system
– Macsyma, Maple, Mathematica, Axiom …alternatively
Require the user to have a CAS separately (like requiring a Fortran compiler to use GAMS)
Computer Algebra and DLMF 30
What do we want? What can we What do we want? What can we attempt?attempt? Exhaustive hierarchical hyperlinks to everything known Human readable form Computer usable form + ALGORITHMS Searchable form /Unique identifiers for formulas Provenance of information Annotations from other users Corrections current or past Cross-reference hyperlinks to all of mathematics Applications A bridge across paper/pencil computer gap A tireless, accurate and efficient robot to help us
Computer Algebra and DLMF 31
Computers do more than arithmeticComputers do more than arithmetic
Many persons who are not conversant with mathematical studies imaginethat because the business of [Babbage's Analytical Engine] is to giveits results in numerical notation, the nature of its processes mustconsequently be arithmetical and numerical, rather than algebraical andanalytical. This is an error. The engine can arrange and combine itsnumerical quantities exactly as if they were letters or any othergeneral symbols; and in fact it might bring out its results inalgebraic notation, were provisions made accordingly.
-- Ada Augusta, Countess of Lovelace, (1844)