Menu

#560 integrate((1/2)*u^2-1/u^5,u,1,sqrt(2)); is not correct...

closed
nobody
5
2006-03-13
2004-04-19
No

Sorry, but in the integral
(1/2)*u^2-1/u^5 with u=1 to sqrt(2) them Maxima
program return

SQRT(2) 1
------- - -
3 6

Maxima comand: integrate((1/2)*u^2-1/u^5,u,1,sqrt
(2));

But the answer correct is:

sqrt(2) 17
------- - -----
3 48

See in MuPad, Maple or Mathematica.

sorry by english.
Luis Cláudio - Brasilia - Brazil.
luis_claudio2000@yahoo.com.br

Discussion

  • Barton Willis

    Barton Willis - 2004-04-21

    Logged In: YES
    user_id=895922

    Thank you for reporting this bug; I suspect that
    the following bug is related to the one you found.

    (C2) integrate(1/x^5,x,1,sqrt(2));
    (D2) 0
    (C3) build_info();

    Maxima version: 5.9.0.1cvs
    Maxima build date: 8:30 4/21/2004
    host type: i686-pc-mingw32
    lisp-implementation-type: Kyoto Common Lisp
    lisp-implementation-version: GCL 2.7.0

    If you find more Maxima bugs, please report them.

    Regards,

    Barton

     
  • Barton Willis

    Barton Willis - 2004-04-22

    Logged In: YES
    user_id=895922

    To integrate 1/x^5 from 1 to sqrt(s), Maxima makes a
    change of variable and then it uses residues. But
    when 'solvecase' fails to find the poles, it returns failure and
    polelist returns nil. After that 'res' believes that there are no
    poles so the sum of the residues vanishes.

    I can put a trap in initial-analysis that catches more
    easy cases and prevents Maxima from using the residue
    method---I don't have a fix for the real problem.

    (C4) integrate(1/x^5,x,1,sqrt(2));
    1> (POLELIST
    ((MPLUS SIMP IRREDUCIBLE FACTORED) 1
    ((MTIMES SIMP RATSIMP) 5 ((MEXPT SIMP) 2 ((RAT
    SIMP) 1 2))
    |$x|)
    ((MTIMES SIMP) 20 ((MEXPT SIMP RATSIMP) |$x| 2))
    ((MTIMES SIMP) 20 ((MEXPT SIMP) 2 ((RAT SIMP) 1
    2))
    ((MEXPT SIMP RATSIMP) |$x| 3))
    ((MTIMES SIMP) 20 ((MEXPT SIMP RATSIMP) |$x| 4))
    ((MTIMES SIMP) 4 ((MEXPT SIMP) 2 ((RAT SIMP) 1 2))
    ((MEXPT SIMP RATSIMP) |$x| 5)))
    #<compiled-closure 108d7e8c> #<compiled-closure
    108d7ea8>)
    2> (SOLVECASE
    ((MPLUS SIMP IRREDUCIBLE FACTORED) 1
    ((MTIMES SIMP RATSIMP) 5 ((MEXPT SIMP) 2 ((RAT
    SIMP) 1 2))
    |$x|)
    ((MTIMES SIMP) 20 ((MEXPT SIMP RATSIMP) |$x|
    2))
    ((MTIMES SIMP) 20 ((MEXPT SIMP) 2 ((RAT SIMP) 1
    2))
    ((MEXPT SIMP RATSIMP) |$x| 3))
    ((MTIMES SIMP) 20 ((MEXPT SIMP RATSIMP) |$x|
    4))
    ((MTIMES SIMP) 4 ((MEXPT SIMP) 2 ((RAT SIMP) 1
    2))
    ((MEXPT SIMP RATSIMP) |$x| 5))))
    <2 (SOLVECASE FAILURE)
    <1 (POLELIST NIL)
    (D4) 0
    (C5)

    Compare this to

    (C5) integrate(1/x^5,x,1,2);
    1> (POLELIST
    ((MEXPT SIMP FACTORED)
    ((MPLUS SIMP IRREDUCIBLE) 1 ((MTIMES SIMP
    RATSIMP) 2 |$x|))
    5)
    #<compiled-closure 108d7e8c> #<compiled-closure
    108d7ea8>)
    2> (SOLVECASE
    ((MEXPT SIMP FACTORED)
    ((MPLUS SIMP IRREDUCIBLE) 1 ((MTIMES SIMP
    RATSIMP) 2 |$x|))
    5))
    <2 (SOLVECASE (((MEQUAL SIMP) |$x| ((RAT SIMP) -1 2))
    5))
    <1 (POLELIST
    ((((RAT SIMP) -1 2)
    ((MEXPT SIMP) ((MPLUS SIMP) ((RAT SIMP) 1 2)
    |$x|) 5))
    ((((RAT SIMP) -1 2) 5)) NIL NIL))

    (c6) 15 / 64

    (DEFUN POLELIST (D REGION REGION1)
    (PROG (ROOTS $BREAKUP R RR SS R1 S POLE WFLAG CF)
    (SETQ WFLAG T)
    (SETQ LEADCOEF (POLYINX D VAR 'LEADCOEF))
    (SETQ ROOTS (SOLVECASE D))
    (if (eq roots 'failure) (return ())) ;; <-- this is a
    trouble maker for res
    LOOP1 (COND ((NULL ROOTS)
    (COND ((AND SEMIRAT

    Barton

     
  • Barton Willis

    Barton Willis - 2004-04-22

    fix for residu.lisp

     
  • Barton Willis

    Barton Willis - 2004-04-22

    Logged In: YES
    user_id=895922

    I thought of a fix that isn't terrible. I inserted a
    call to gfactor in solvecases. I also put an
    merror into polelist---this way a user will get
    an error instead of a wrong value should
    solvecases ever fail. The gfactor fix seems to
    fix this problem.

    Barton

     
  • Raymond Toy

    Raymond Toy - 2006-03-13
    • status: open --> closed
     
  • Raymond Toy

    Raymond Toy - 2006-03-13

    Logged In: YES
    user_id=28849

    Maxima returns the correct answer now.

     

Log in to post a comment.