A System for Integration Formulas Richa Sarin Senior Project, Math/Computer Science Advisor: Prof. Robert Mayans
A System for Integration Formulas
Richa Sarin
Senior Project, Math/Computer Science
Advisor: Prof. Robert Mayans
Presentation Outline
• Introduction• Integration examples and solutions• Purpose of the project• Integration system, examples• Architecture• Further work• Conclusions
Some Integration Problems
2
13
1
2 2
cos( )
/ 2
Integral Form
, 11
sin ( )1 1
No elementary formula
1erf ( )
2
nn
x
xt
xx dx x dx C n
ndx dx
x Cx x
x dx
e dt x
How do we find the formulas?
• Take Calculus I, II, III.• Look them up in a table of integrals.• Use of computer algebra systems.
–Maple–Derive–Mathematica
How do we find the formulas?
• Some examples from Derive:4
3
4
xx dx C
1
2
1sin
1dx x C
x
1ln( )dx x C
x
How do we find the formulas?
• Sometimes the formulas can be very complicated!• Integral:• Solution:
• What does this answer tell you?
How do we find the formula?
• It is hard to tell the structure of the answer from a complicated formula.
• “Integration is the most esoteric part of mathematics.”
• The mathematics of how you get the integral is missing!
How to find the formulas?
• The symbolic answer does not tell you the underlying concepts and patterns
• Example: Last integral is a Chebyshev integral • Form:
dxcxbax pqr )(
How to find the formulas?
• The symbolic answer does not tell you the techniques, such as substitution, that get you the answer.
• Example:
• Replace sin2(x) and substitute for cos2(x)
dxxxdxx )sin())(cos1()(sin 23
3sin ( )x dx
Aims of the project
• A different approach:
Integral Form Text
• The integral is matched to a general form.– Example:
• The form links to an explanatory text.• The text explains the derivation of the formula
and links to other mathematical texts.
3 2 1 ( )x x dx P x dx
Aims of the project
Example:
• Integral:
• Form: where p,q,r are rationalnumbers.
dxxx )3/2(4)3/1( )1(
∫ Integral Form Text
dxcxbax pqr )(
Aims of the project
• Form• Text:
This integral is called the binomial integral or the Chebyshev integral, and Chebyshev first proved the conditions under which the integral is an elementary function.
First, we substitute u=xq to bring the integral to the form.
Let s=(r+1)/(q-1). Chebyshev proved that this integral is anelementary function iff s, p, or s+p is an integer.
dxcxbax pqr )(
ducubuq
a pq
r
)()1(
)1(
Web Architecture
• The Mathematics Hypertext Project (MHP) is an interconnected structure of Web pages of mathematical texts.
• An interactive HTML page (part of the MHP) reads the integral from the user input.
Web Architecture
• A CGI script in Perl on a university server processes the integral and produces a new page.
• This page contains the list of forms matched by the CGI scripts.
• The user follows the links to the explanatory texts in the MHP.
CGI Script/ Web Architecture
cx
x 4
43
Server Client
MHP Web pages
CGI scriptPattern matcher
New page
Software Architecture
• Integrals Form Text
• Want to integrate
• Each pattern has its own webpage and explanations
)(3 xPxx
dxxx )3/2(4)3/1( )1( dxcxbax pqr )( dxxPdxxx )(1242
Software Architecture
• Function of the CGI script:– Reads the integrand from the user input– Scans and parses the integrand into an
expression tree.– Reads in a file of forms and references to
the texts– Matches the expression to the forms– Lists all the matched forms and links to text
into the new page.
Some Sample Forms
• Form: ∫P(x)dx , where P is a polynomial • Pattern: [P x]• Matches: ∫x3 dx, ∫a(x-1)1000 dx
• Form: ∫cosn(x) sinm(x) dx, where n,m are positive integers
• Pattern: [* [^ [cos x] n] [^ [sin x] m]]]• Matches: ∫sin3(x) cos(x) dx
Forms
dxxfxgxgxf ))(')()(')((
dxexR xP )()(
( )P x dx
dxxxP ))sin(),(cos(
dxcbxaxxR ),( 2
dxexP x ),(
FORM EXAMPLE
dxx 2
dxex
x453
1
3(cos ( )sin( ) 4cos( ))x x x dx
dxex x 2
dxxxx 16522
dxexx x )25( 43
Further work
• Finish the texts• Better pattern matching
– Example: sqrt(x) is the same as x1/2
– Example: can match an xn but not (ax)n
• Google problem: too many matches– Example: integral of x matches xp, P(x), R(x),
many more.• Explicit steps from the integrand to the answer.