Definite Integration tests - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Definite Integration tests

Description:

Definite Integration tests tests suggested by Dave Rusin 5/7/2002 sci.math.symbolic The story A colleague teaching a graduate complex analysis course mentioned that ... – PowerPoint PPT presentation

Number of Views:168
Avg rating:3.0/5.0
Slides: 14
Provided by: RichardJ96
Category:

less

Transcript and Presenter's Notes

Title: Definite Integration tests


1
Definite Integration tests
  • tests suggested by Dave Rusin
  • 5/7/2002
  • sci.math.symbolic

2
(No Transcript)
3
The story
  • A colleague teaching a graduate complex analysis
    course mentioned
  • that one of his better students reported that he
    liked computing definite
  • (real) integrals with the standard
    line-integral-and-residue techniques,
  • but that, in the end, these were nothing that
    Mathematica could not do.
  • So the instructor asked me for some challenge
    problems for the student
  • to feed to Mma. I found some in old notes (taken
    from this newsgroup
  • and elsewhere). Since software evolves, it is
    reasonable to
  • expect that old challenge problems are challenges
    no longer
  • indeed some progress seems to be evident. (I
    tested with Mathematica
  • version 4.1 and Maple version 7 on a Sun
    Solaris.)

4
The story
  • The case of definite integrals is particularly
    interesting to me
  • since the great hype which accompanied early
    releases of Mathematica
  • induced people to gleefully report its errors,
    many of which were
  • indeed definite integrals computed in "closed
    form".
  • So this became an afternoon project of tracking
    down some definite
  • integrals which show software struggling. I am
    interested in
  • (i) other examples of definite integrals which
    can be done by
  • a grad student in complex analysis, but not
    by these packages
  • (Examples from the residue calculus
    particularly welcome.)
  • (ii) more examples of definite integrals which
    the packages (still) do wrong
  • (iii) lessons about the science -- as opposed to
    the art -- of computing
  • closed-form expressions for definite
    integrals what's the algorithm?

5
The story
  • I am aware of the Risch "algorithm" for computing
    _indefinite_
  • integrals, so my interest is in definite
    integrals which can
  • be computed only because the limits of
    integration are "special".
  • I don't know, for example, how to determine
    whether the
  • integrals of rational functions of coordinates
    over _closed loops_
  • on a Riemann surface can be expressed in some
    closed form.
  • (For example, it was recently discussed in this
    group that the
  • length of the curve yx2(4-x) from x0 to x4
    can be given
  • in a "closed form" which is quite lengthy.)
  • For all but the third, fourth, and fifth of the
    examples below, the
  • antiderivatives actually _may_ be written using
    the primitives known
  • to the software, but -- particularly for some
    important choices of
  • the parameters a, b -- the definite integrals
    are clearly simpler
  • than the antiderivatives in form. (I'm not
    wholly sure how to
  • quantify "simpler".) Also, sometimes the software
    knows the general
  • antiderivative but cannot seem to compute the
    definite integral correctly!

6
The story
  • Attached below are the integrals I considered,
    showing input and output
  • for first Maple and then Mathematica. Here they
    are in TeX form in
  • case you're writing a final exam right about
    now...
  • \int_01 (1-xa)1/a \,
    dx
  • \int_-\infty\infty ei a x\overx2b2
    \, dx
  • \int_0\infty x-b (\log(x))a
    \log(1xx2) \, dx
  • \int_-\pi\pi (1-a \cos(x)-b \cos(2
    x))-1/2 \, dx
  • \int_0\pi/2 1\over1(\tan(x))a
    \, dx
  • \int_02\pi \log(a\sin(x))
    \, dx
  • \int_0\pi/2 1\over(a\sqrt\cos(x))
    2 \, dx
  • dave

7
The story
  • int((1-xa)(1/a), x0 .. 1)
  • Definite integration Can't determine if the
    integral is convergent.
  • Need to know the sign of --gt -1/a
  • Will now try indefinite integration and then take
    limits.
  • (1 - 2/a) 1/2
  • 2 Pi
    GAMMA(1/a 1)
  • --------------------------
    -----
  • (2/a - 1) GAMMA(1/a -
    1/2)
  • Hmm if it needs to know the sign of -1/a,
    shouldn't that be
  • in the answer somewhere?
  • ................
  • Integrate(1-xa)(1/a), x, 0, 1

  • 1
  • SqrtPi
    Gamma1 -

8
The story
  • int(exp(Iax)/(x2b2), x -infinity ..
    infinity)
  • Gives the answer 0 but if I add the
    assumptions agt0 and bgt0 I get
  • exp(-a b) Pi
  • --------------
  • b
  • ................
  • IntegrateExpI a x/(x2b2), x, -Infinity,
    Infinity

  • -2
  • 2
    Sqrtb Pi
  • ( otherwise no answer )

9
The story
  • Note the integrals converge, and closed-form
    solutions exist, for
  • int( x(-b)log(x)alog(1xx2), x0 ..
    infinity)
  • Integrate x(-b) Logxa Log1xx2,
    x,0,Infinity
  • for all b in (1, 2) and all counting numbers a
    this was in a sci.math
  • thread last November. (Hint differentiation with
    respect to b allows
  • us to assume a0. The other logarithm term is
    ln(1-x3) - ln(1-x). )
  • But both systems leave these integrals
    unevaluated. So I restricted to
  • the case b3/2. First Maple
  • int( x(-3/2)log(x)alog(1xx2), x0 ..
    infinity)
  • infinity
  • Uh oh... It even gives this response when a
    2, and yet it decides
  • evalf( Int( x(-3/2)log(x)2log(1xx2), x0 ..
    infinity) )
  • 208.8558862
  • ................

10
The story
  • int(1/(1-acos(x)-bcos(2x))(1/2),x-Pi .. Pi)
  • Lengthy answer is slighly shortened by
    simplify() but not pretty!
  • It is expressed using lim_x-gt0 and
    lim_x-gt0- , and
  • runs about 16 lines using lprint .
  • Here is the simplified result of running the
    computation with a1/2, b2/5
  • / 1/2
    1/2 1/2
  • 1/2 2 (11
    473 )
  • 8 5 2 EllipticK(1) - EllipticF(1/2
    ---------------------, 1)

  • 1/2 1/2
  • \ (-5
    473 )
  • 1/2 1/2 1/2 \
  • 2 (21 473 )
    / 1/2 1/2
  • - EllipticF(1/2 ---------------------, 1)
    / (44 2 473 )
  • 1/2 1/2
    /

11
The story
  • int(1/(1(tan(x))a), x 0.. Pi/2)
  • Integrate1/(1(Tanx)a), x, 0, Pi/2
  • No answer from either of them. (Hint replace x
    by pi/2 - x .)
  • (In a Jan. 1999 thread it was shown that MuPad
    can do this one
  • without help, and the others can be coaxed into
    giving an answer.)
  • Note that antiderivates _can_ be given for many
    values of a but
  • that this is neither necessary nor particularly
    helpful, and as far
  • as I can tell the antiderivative is not
    expressible in closed form
  • for all a.
  • int(log(asin(x)), x0..2Pi)
  • The answer, after using simplify() , is

12
The story
  • int(log(asin(x)), x0..2Pi)
  • The answer, after using simplify() , is
  • 2 1/2
    2 1/2
  • a I (-a 1) I
    a - I (-a 1) I
  • 2 Pi ln(a) - 2 Pi ln(----------------------) - 2
    Pi ln(----------------------)
  • 2 1/2
    2 1/2
  • a I (-a 1)
    a - I (-a 1)
  • But note that branches of the logarithms must be
    chosen carefully!
  • The answer must be real if a is real and
    greater than 1. In that case,
  • the integeral 2 pi (cosh-1(a) - log 2).
    This is zero if a5/4, so try it
  • int(log(5/4sin(x)), x0..2Pi)

  • 2
  • 2 Pi ln(5) - 2 Pi ln(1 2 I) - 2 Pi
    ln(2 I) I Pi

13
The story
  • int(1/(asqrt(cos(x)))2, x0..Pi/2)
  • Here is the answer in compressed form (obtained
    very quickly)
  • 2((a4-1)(1/2)arctan((a21)/((a21)(a2-1))(1/2
    ))a4arctan(
  • (a21)/((a21)(a2-1))(1/2)))/(a21)/(a2-1)/(a4-1
    )(1/2)a/(a21)
  • 2(1/2)EllipticK(1/22(1/2))2a/(a21)/(a2-1)2
    (1/2)
  • EllipticK(1/22(1/2))-2a/(a21)/(a2-1)2(1/2)E
    llipticE(1/22(1/2))
  • -a(a41)/(a21)/(a2-1)22(1/2)EllipticPi(-1/(a2
    -1),1/22(1/2))
  • This function has a singularity at a1 the
    numerical value when
  • a.99999 is about .5406924657909949240642166 -
    24836532.758693 i, and
  • that imaginary part grows proportionally to
    1/(1-a) for a lt 1.
  • On the other hand, the integrals are all real
    and nicely behaved at a1
  • the real part of the previous expression seems
    to get the integral.
  • Maple will do the case a1 separately if asked
    numerically it's OK
Write a Comment
User Comments (0)
About PowerShow.com