From: Anna Kaladze on
Dear all,
I have a non-integrable function, f(u). The problem it is involved in an inner integral of a double integral, and the inner one has a variable limit of integration. Like this:
"Integral [(Integral of F(u), du)] dt"
The outer integral (where the integrand is [(Integral of F(u), du)]) has finite limits (1 and 2, and the variable of integration is t). The inner integral (where integrand is F(u)) has a low limit 0, but the upper limit is t (in principle, t takes the value from 0 to 1). Can someone help me to deal with this issue? If the inner integral had constant limits, there would have been no problem even for a dummy like myself, but the inner one's upper limit is t. Thanks a lot.
Anna.
From: Roger Stafford on
"Anna Kaladze" <anna.kaladze(a)gmail.com> wrote in message <i3rs7s$a7p$1(a)fred.mathworks.com>...
> Dear all,
> I have a non-integrable function, f(u). The problem it is involved in an inner integral of a double integral, and the inner one has a variable limit of integration. Like this:
> "Integral [(Integral of F(u), du)] dt"
> The outer integral (where the integrand is [(Integral of F(u), du)]) has finite limits (1 and 2, and the variable of integration is t). The inner integral (where integrand is F(u)) has a low limit 0, but the upper limit is t (in principle, t takes the value from 0 to 1). Can someone help me to deal with this issue? If the inner integral had constant limits, there would have been no problem even for a dummy like myself, but the inner one's upper limit is t. Thanks a lot.
> Anna.
- - - - - - - - -
Matlab's quad2d will accept variable limits on the inner integral.

Roger Stafford
From: Steven_Lord on


"Anna Kaladze" <anna.kaladze(a)gmail.com> wrote in message
news:i3rs7s$a7p$1(a)fred.mathworks.com...
> Dear all,
> I have a non-integrable function, f(u). The problem it is involved in an
> inner integral of a double integral, and the inner one has a variable
> limit of integration. Like this:
> "Integral [(Integral of F(u), du)] dt"

Assuming that f(u) and F(u) are the same function, I think you're out of
luck here. You've said f(u) is non-integrable, yet you're trying to
integrate it as part of a double integral!

Or are f(u) and F(u) actually different functions that are related in some
way? If that's the case, SAY SO when you post your question, please.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

From: Anna Kaladze on
Yes, thanks a lot for the answer and sorry, F(u) and f(u) are the SAME functions -- just a typo.
Is there any code I can to write to solve the problem? I mean technically it is possible to solve the problem in Excel (one column for the inner integral where t argument will take the value from 0 to whatever), and then sum-up the values in that column using the trapezoidal rule. A smaller step size would give a reasoanble degree of approximation). But is there a way to do something like that in MATLAB? Thanks a lot.
From: Roger Stafford on
"Anna Kaladze" <anna.kaladze(a)gmail.com> wrote in message <i3spl3$t1v$1(a)fred.mathworks.com>...
> Yes, thanks a lot for the answer and sorry, F(u) and f(u) are the SAME functions -- just a typo.
> Is there any code I can to write to solve the problem? I mean technically it is possible to solve the problem in Excel (one column for the inner integral where t argument will take the value from 0 to whatever), and then sum-up the values in that column using the trapezoidal rule. A smaller step size would give a reasoanble degree of approximation). But is there a way to do something like that in MATLAB? Thanks a lot.
- - - - - - - - - - - -
It's the statement "I have a non-integrable function, f(u)" that you made in the first post that is the stumbling block here. In mathematics and in matlab circles too, when you say a function is non-integrable, it is because that function is sufficiently ill-behaved over the desired integration range that it is impossible to obtain an integral for it. Perhaps it ascends to infinity in the wrong way, the range is infinite and it doesn't get small fast enough, or it is seriously discontinuous. An example is the integral of 1/x^2*sin(1/x) from 0 to 2/pi which is not well-behaved as it approaches x = 0. The integrated value keeps oscillating endlessly back and forth more and more rapidly from -1 to +1 as the lower limit approaches zero and consequently is non-integrable over that full range.

I am guessing since you are still talking about trying to get your function's integral that this isn't what you meant by "non-integrable". If so, you should take the advice you were given more seriously. The double quadrature routine 'quad2d' allows for varying limits of integration in its inner integral, which is what it sounds like you are faced with when you say, "The inner integral (where integrand is F(u)) has a low limit 0, but the upper limit is t (in principle, t takes the value from 0 to 1)." I suggest you look into it.

Roger Stafford