• Lucid Dreaming - Dream Views




    Results 1 to 5 of 5
    1. #1
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935

      How can I approximate integrals?

      Is there a way to approximate an infinite integral? I know that a Riemann sum can give me integral for finite integrals, but I want infinite integrals too.

      0∫∞ f(x)

    2. #2
      Rational Spiritualist DrunkenArse's Avatar
      Join Date
      May 2009
      Gender
      Location
      Da Aina
      Posts
      2,941
      Likes
      1092
      I don't understand your notation. You mean over the whole real line? That's not too hard but I want to make sure that thats what you want before I explain it.

      EDIT: Oh wait. you mean approximate. as in without finding the antiderivative. fuck man, im no good at that numerical shit. If it's for a general class of function though, i might be able to help anyway.
      Last edited by PhilosopherStoned; 08-12-2009 at 12:15 AM.
      Previously PhilosopherStoned

    3. #3
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      Yes, the entire length of the line. Yes, approximate, not the real thing. I can do the real thing easily, but I need to make this in C++.

    4. #4
      Rational Spiritualist DrunkenArse's Avatar
      Join Date
      May 2009
      Gender
      Location
      Da Aina
      Posts
      2,941
      Likes
      1092
      OK. Here's a paper that I found. It's based on changing coordinates from x to x=1/t dx=t^-2dt which lets you integrate x over the real line by integrating t over [0, 1].
      Previously PhilosopherStoned

    5. #5
      Member Achievements:
      1 year registered Veteran First Class 5000 Hall Points

      Join Date
      Sep 2004
      Gender
      Location
      Seattle, WA
      Posts
      2,503
      Likes
      217
      It's simple. take the integral from 0 to t of f(x), and then evaluate the limit as t -> inf.

      EDIT: sorry, didn't realize you wanted to approximate. I suppose the first thing you need to do is determine if it converges or diverges. After that, if and only if it converges, you can cut off your riemann sum after you hit the right kind of precision. Note that for converging integrals (where f(x) -> 0 as x -> inf, pretty much), the higher order terms will always tend to zero, so you can be pretty consistent with your precision.
      Last edited by Replicon; 08-16-2009 at 01:24 AM.

    Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •