0

I need to evaluate a definite integral of a function which is zero almost everywhere, for instance something like a Gaussian with an artificial cutoff, such that any function value below some threshold is returned as 0.

I don't know beforehand where the function is above this threshold, I only have a very rough estimate.

Now if I take a look on e.g. the adaptive Simpson's method then it will estimate the whole integral as 0 if the first few recursive calls happen to be outside the region, where the function returns a non-zero value.

I guess I'll face the same problems with most adaptive integration methods... So how is this problem usually solved.

Can you give me some keywords please?

OD IUM
  • 335
  • Well, if it is "zero almost everywhere" the integral will be zero! A gaussian with an artificial cutoff has non-trivial support where it is nonzero. – mjw Feb 17 '20 at 18:30
  • You need to elaborate your question, as such it has a trivial answer. – copper.hat Feb 17 '20 at 18:34
  • If I choose the integration bounds properly, such that f(xmin) !=0 and f(xmax) !=0, why would the definite integral be zero? – OD IUM Feb 17 '20 at 18:34
  • 2
    The phrase "almost everywhere" has a technical meaning in this context, which I don't think is what you mean. I think what you mean is that it is zero in a "large" part of its domain for some loose meaning of the word "large". Without knowing anything about where that might happen, this is indeed a problem, similar to any other problem where you are trying to integrate a function with serious regularity issues. It is just a bit more severe than the usual situation because it may be hard to detect that it is even there in the first place. – Ian Feb 17 '20 at 18:35
  • (Cont.) But knowing that it is there, you can revise your algorithm to keep dividing until you get something nonzero at the very least, and then maybe keep dividing after that. – Ian Feb 17 '20 at 18:35
  • The term "almost everywhere" has a specific meaning which it seems like you're unaware of; that is going to cause confusion in this question, because if a function is zero "almost everywhere" then its integral is zero. Probably it will help to edit your question to avoid that term. – littleO Feb 17 '20 at 18:36
  • @Ian I'm sorry, I was not aware of it... My first guess was to perform some kind of root-finding to adjust the given integrations bounds. As I know that my function is concave I'm sure that there are only two roots – OD IUM Feb 17 '20 at 18:38
  • @littleO Actually, even if the function is zero almost everywhere in the measure sense, the computed integral may be nonzero: numerical methods evaluate the integrand at finitely many points. – Jean-Claude Arbaut Feb 17 '20 at 18:38
  • @Ian I've tried this...but some integrands are indeed zero everywhere and not even worth evaluating – OD IUM Feb 17 '20 at 18:41
  • @ODIUM I'm not sure I understand your meaning. Are you saying that you have the underlying representation as $g(x)=\begin{cases} f(x) & |f(x)|>c \ 0 & \text{otherwise} \end{cases}$ or whatever it is? Then you could try to find the crossover points where $|f(x)|=c$ and integrate on some domain determined by them. Or you could just use brute force as I suggested (keep refining until you find that narrow region that contributes, since you know it exists). – Ian Feb 17 '20 at 18:41
  • @Ian yes,l that's what Im trying to say.. Maybe this problem is similar to integrating discontinuous functions...I'll give it a try – OD IUM Feb 17 '20 at 18:42

0 Answers0