#1056 integrate(t^(-1.2),t);

closed
nobody
5
2007-03-03
2007-01-10
Anonymous
No

integrate(t^(-1.2),t);
gives

5.000000000000001
- -----------------
0.2
t

must be

5
- -----------------
0.2
t

Discussion

  • Raymond Toy

    Raymond Toy - 2007-01-10
    • status: open --> pending
     
  • Raymond Toy

    Raymond Toy - 2007-01-10

    Logged In: YES
    user_id=28849
    Originator: NO

    No. Compare with 1/(-1.2+1) -> 5.000000000000001

    If you wanted the exact number -6/5, you should have said so instead of using the floating point number 1.2.

    Setting status to pending.

     
  • Nobody/Anonymous

    Logged In: NO

    But
    integrate(t^(-1.2),t,t1,t2); ("positive" for all questions)
    gives true
    5 5
    ----- - -----
    1/5 1/5
    t1 t2

    This is a bug or feature?

     
  • Nobody/Anonymous

    • status: pending --> open
     
  • Raymond Toy

    Raymond Toy - 2007-01-10

    Logged In: YES
    user_id=28849
    Originator: NO

    Good point. I would consider this a bug in the definite integration routines.

    At the very least, it should warn about converting a float to a rational.

     
  • Raymond Toy

    Raymond Toy - 2007-01-16

    Logged In: YES
    user_id=28849
    Originator: NO

    I ran this again, and I actually get warnings about converting a float to a rational.

    I think this is acceptable. I think it would be better if it didn't do this conversion, though.

     
  • Nobody/Anonymous

    Logged In: NO

    no, the result is correct because
    (%i27) 1/(-1.2+1);
    (%o27) - 5.000000000000001
    you are using floating point arithmetic and therefore you have rounding errors
    actually 0.2 cannot be represented as float without rounding errors (if you are using a binary representation). use exact numbers (e.g t^(-6/5) ) if you want an exact result

     
  • Robert Dodier

    Robert Dodier - 2007-03-03

    Logged In: YES
    user_id=501686
    Originator: NO

    Marking this "Rejected". Agreed w/ comments by nobody dated 2007-01-31 02:17.

     
  • Robert Dodier

    Robert Dodier - 2007-03-03
    • labels: --> Problem not in Maxima
     
  • Robert Dodier

    Robert Dodier - 2007-03-03
    • status: open --> closed
     

Log in to post a comment.