×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

numerically integrate to infinity

numerically integrate to infinity

numerically integrate to infinity

(OP)
Hello!
I have a function f that I would like to integrate numerically. For this purpose I used quad(f,a,b) where a and b are the borders of integration. Now I want to integrate to b=infinity and this doesn't work with quad. Is there any other function I can use to numerically integrate to infinity?
Thank you very much
Katy

RE: numerically integrate to infinity

It should work if you can find a computer that can count to infinity.

Beyond that, you need to re-think your problem.  

TTFN

RE: numerically integrate to infinity

(OP)
Thank you very much for your smart comment.

Maybe you have missed that Matlab does have rules to calculate with infinity.
So why not implement a numerical integration that takes on the value zero, if the function is numerically zero and infinity if it takes on nonzero equally signed values (for example, I'm not an expert).

Thank you again for you comment, but I really think I didn't need this.

RE: numerically integrate to infinity

Being that you are a computer engineering professional, you should be aware that it's generally not possible to evaluate a numerical integral that way.  

Trying to do something like a quadrature Simpson's rule over an infinite interval is simply not feasible, since the nominal error tolerance is too small.  In order to get the interval sum to be evaluated within the tolerance requires a small step size, which when summed over infinite results in a stack overflow.  If you try to integrate with too large a tolerance, you'll get garbage for an answer.  

In general, you need to re-think your need to integrate to infinity.  In most cases, if the integral is finite, you can simply integrate over a reasonably large range.  The integral of the normal error requires less than 10 sigma to converge to a stable value, and that value is essentially equal to the same integral over infinity.

TTFN

RE: numerically integrate to infinity

(OP)
Okay, I understand.

I am not exactly an engineer. I come from mathematics and work in image processing right now. So I have heard about the Simpson rule, but I have of course no idea how it is implemented (concerning tolerance and co).

In particular I needed a discrete filter from a Gaussian like function. And putting large bounds 10^16 or 10^17 still made a noticable difference, but higher values made the integration impossible.
So I still don't know what to do...

At the beginning I was close to red-flagging you, but now I am really thankful for this comment.

Thanks
Katy

RE: numerically integrate to infinity

Matlab cannot perform numerical calulations with infinities of any sort (at least according to the documentation). It can only give infinity as an answer. If your function is analytiaclly integrable then you may be able to do it algebraically using the symbolic toolbox.

M

--
Dr Michael F Platten

RE: numerically integrate to infinity

What do you mean by "noticeable difference?"  Most sensors and images have nothing meaningful beyond a dynamic range of about 1000:1

In almost everything that's done in non-academic scenarios, we truncate and move on.  There is no physical meaning to an integration over infinity in the real world.  Everything has real limits.

TTFN

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now