From: bhargava sista on 19 Apr 2010 01:45 Hi, I am using QUAD to perform a numerical integration. My function is pretty complex and is giving me a warning: 'Warning: Minimum step size reached; singularity possible.' This is resulting in a significant error for my problem. Is there any way to control the number of integration points or any other way of solving this issue? Hoping to get a solution for this problem. Thank you very much, -Bhargava Sista
From: Roger Stafford on 19 Apr 2010 02:53 "bhargava sista" <bhargavasista(a)gmail.com> wrote in message <hqgql4$cm1$1(a)fred.mathworks.com>... > Hi, > > I am using QUAD to perform a numerical integration. My function is pretty complex and is giving me a warning: 'Warning: Minimum step size reached; singularity possible.' > > This is resulting in a significant error for my problem. Is there any way to control the number of integration points or any other way of solving this issue? Hoping to get a solution for this problem. Thank you very much, > > -Bhargava Sista It is highly likely that 'quad' has indeed encountered a singularity in the integrand function, either a value approaching infinity or a derivative approaching infinity. Rather than trying to ignore the problem by trying to limit step size, my recommendation would be to attempt to find the singularity and gain an understanding of its nature. Some kinds of singularity are non-integrable and you would therefore be attempting to obtain a finite result from an integral that is really infinite. If the singularity is actually integrable, there are often transformations of variables that can be performed that would render the problem solvable by 'quad'. The 'quad' function itself isn't intelligent enough to perform singularity analyses and devise transformations of variables for you in such situations. You have to do that for yourself. For example, the integral from x = 0 to x = 1, of (1+x^2)/sqrt(x) with respect to x, possesses the finite answer, 8/3, even though the integrand becomes infinite at x = 0. 'quad' would have a real headache with it. If you were faced with an integrand which had a square-root-like singularity at one end similar to this, a substitution like y = sqrt(x) could remove that singularity and make life much easier for 'quad' (and you!) Roger Stafford
From: Roger Stafford on 19 Apr 2010 03:08 "Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message <hqgukh$fi3$1(a)fred.mathworks.com>... > ...... > For example, the integral from x = 0 to x = 1, of (1+x^2)/sqrt(x) with respect to x, possesses the finite answer, 8/3, even though the integrand becomes infinite at x = 0. 'quad' would have a real headache with it. > ...... --------- Oops! I erred on the above integral. It should be 12/5. (My old calculus instructor would have given me a scolding for getting a simple integral like that wrong.) Roger Stafford
|
Pages: 1 Prev: K means clustering Next: query about network control system |