Results 1 to 9 of 9

Math Help - Why can't I evaluate improper integrals in maxima?

  1. #1
    s3a
    s3a is offline
    Super Member
    Joined
    Nov 2008
    Posts
    597

    Why can't I evaluate improper integrals in maxima?

    It doesn't allow me. Here's an example:

    Maxima 5.13.0 Maxima, a Computer Algebra System
    Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
    Distributed under the GNU Public License. See the file COPYING.
    Dedicated to the memory of William Schelter.
    This is a development version of Maxima. The function bug_report()
    provides bug reporting information.
    (%i1) integrate(1/(x^2), x, 0, INF);
    Is INF positive, negative, or zero?

    positive
    ;
    Integral is divergent
    -- an error. To debug this try debugmode(true);
    (%i2)


    I would be really grateful if someone could tell me how to do it.
    Thanks!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Aug 2007
    From
    USA
    Posts
    3,110
    Thanks
    2
    You ARE doing it and it IS giving you the correct answer. Why do you want a divergent integral to give some other result? Perhaps it is your expectation that is in need of repair.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by s3a View Post
    It doesn't allow me. Here's an example:

    Maxima 5.13.0 Maxima, a Computer Algebra System
    Using Lisp GNU Common Lisp (GCL) GCL 2.6.7 (aka GCL)
    Distributed under the GNU Public License. See the file COPYING.
    Dedicated to the memory of William Schelter.
    This is a development version of Maxima. The function bug_report()
    provides bug reporting information.
    (%i1) integrate(1/(x^2), x, 0, INF);
    Is INF positive, negative, or zero?

    positive
    ;
    Integral is divergent
    -- an error. To debug this try debugmode(true);
    (%i2)


    I would be really grateful if someone could tell me how to do it.
    Thanks!
    1. Maxima is case sensitive INF and inf are not the same thing.

    2. It is the lower bound not the upper where the problem lies.


    3. The latest stable version is something over 5.20 (not that there appears to be much change between versions, but the latest version of the front end wxmaxima is significantly different from the older versions.

    CB
    Follow Math Help Forum on Facebook and Google+

  4. #4
    s3a
    s3a is offline
    Super Member
    Joined
    Nov 2008
    Posts
    597
    I see. So what is the difference between INF and inf? INF is positive infinity, negative infinity and 0 (unless I am mistaken) but what is inf? Also, is there any way that I can make Maxima tell me what type of divergent integral it is? (=whether the outcome is positive or negative infinity)

    Another question I have is: why does it say "error" if it's giving the right answer and I am entering the question properly?
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by s3a View Post
    I see. So what is the difference between INF and inf? INF is positive infinity, negative infinity and 0 (unless I am mistaken) but what is inf? Also, is there any way that I can make Maxima tell me what type of divergent integral it is? (=whether the outcome is positive or negative infinity)

    Another question I have is: why does it say "error" if it's giving the right answer and I am entering the question properly?
    Try:

    integrate(1/x^2,x,a,inf)

    you will be asked if a is positive, negative or zero, tell it positive and it returns 1/a.

    Now ask for the limit as a goes to zero, and you must specify if from both sides, the left or right.

    If you say from both then you get no result as the limit from the right is +inf and from the left -inf.

    (INF is not anything, if you use it it will be treated as an unassigned variable)

    CB
    Follow Math Help Forum on Facebook and Google+

  6. #6
    s3a
    s3a is offline
    Super Member
    Joined
    Nov 2008
    Posts
    597
    Ok so integrate(1/x^2,x,a,inf) returns 1/a but integrate(1/x^2,x,0,inf) for example gives an error. Why?
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by s3a View Post
    Ok so integrate(1/x^2,x,a,inf) returns 1/a but integrate(1/x^2,x,0,inf) for example gives an error. Why?
    Because it is undefined

    CB
    Follow Math Help Forum on Facebook and Google+

  8. #8
    s3a
    s3a is offline
    Super Member
    Joined
    Nov 2008
    Posts
    597
    I see. I was plugging in values blindly. Thanks!

    Edit: Just something I wanted to add: Every time the integral is divergent, will it give me the word "error" and "Integral is divergent" along with the debugging message?
    For example, will it always say the following (like is it normal or part of the process for it to say that a divergent integral is an error and suggest debugging)?:

    "Integral is divergent
    -- an error. To debug this try debugmode(true);" ?
    Last edited by s3a; March 24th 2010 at 05:06 PM.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by s3a View Post
    I see. I was plugging in values blindly. Thanks!

    Edit: Just something I wanted to add: Every time the integral is divergent, will it give me the word "error" and "Integral is divergent" along with the debugging message?
    For example, will it always say the following (like is it normal or part of the process for it to say that a divergent integral is an error and suggest debugging)?:

    "Integral is divergent
    -- an error. To debug this try debugmode(true);" ?
    Probably, but CAS systems are too complex to be able to make absolutely categorical statements like that.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. improper integrals
    Posted in the Calculus Forum
    Replies: 3
    Last Post: June 4th 2011, 11:34 PM
  2. Contour Integrals (to Evaluate Real Integrals)
    Posted in the Differential Geometry Forum
    Replies: 2
    Last Post: January 17th 2011, 09:23 PM
  3. improper integrals
    Posted in the Calculus Forum
    Replies: 3
    Last Post: April 29th 2010, 05:36 PM
  4. Evaluate an improper integral - help!
    Posted in the Calculus Forum
    Replies: 3
    Last Post: March 7th 2010, 12:10 PM
  5. improper integrals
    Posted in the Calculus Forum
    Replies: 3
    Last Post: May 2nd 2009, 10:59 AM

Search Tags


/mathhelpforum @mathhelpforum