Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Integral with some symmetries

Subject: Integral with some symmetries

From: Amitalok Budkuley

Date: 25 Apr, 2009 20:10:03

Message: 1 of 8

Hi,

I have to evaluate an integral. Please follow the image to look at the form of the integral.

http://img25.imageshack.us/img25/629/equationmatlab.gif

The limits are constants.
All xi,yi are constants (have specific meanin in the context i need to use the integral)
n-is again a constant.
Is there a possible way by conversion into polar co-ordinates??
Is a bound on the value possible??


thank you.

Subject: Integral with some symmetries

From: Bruno Luong

Date: 25 Apr, 2009 21:19:01

Message: 2 of 8

"Amitalok Budkuley" <amitalok86@gmail.com> wrote in message <gsvqmr$h9g$1@fred.mathworks.com>...
> Hi,
>
> I have to evaluate an integral. Please follow the image to look at the form of the integral.
>
> http://img25.imageshack.us/img25/629/equationmatlab.gif
>
> The limits are constants.
> All xi,yi are constants (have specific meanin in the context i need to use the integral)
> n-is again a constant.
> Is there a possible way by conversion into polar co-ordinates??
> Is a bound on the value possible??

If I understand correctly and do not make any mistake in reasoning, your function can be extended in a continuous function everywhere, including at the "poles" {(xi,yi)}. So with some minimum care in the coding, quad2d() should be able to compute this integral without much of trouble.

Bruno

Subject: Integral with some symmetries

From: Roger Stafford

Date: 26 Apr, 2009 02:26:02

Message: 3 of 8

"Amitalok Budkuley" <amitalok86@gmail.com> wrote in message <gsvqmr$h9g$1@fred.mathworks.com>...
> I have to evaluate an integral. Please follow the image to look at the form of the integral.
>
> http://img25.imageshack.us/img25/629/equationmatlab.gif
>
> The limits are constants.
> All xi,yi are constants (have specific meanin in the context i need to use the integral)
> n-is again a constant.
> Is there a possible way by conversion into polar co-ordinates??
> Is a bound on the value possible??

  As Bruno has indicated, your integrand does not actually have singularities at the points (xi,yi) even though the numerator and denominator each do. They cancel each other out and the result is a continuous function in x and y. However, it is to be hoped that 'quad2d' does not accidentally call on your integrand function with an (x,y) pair which is exactly at or very close to one of the points (xi,yi). That might cause your defined function to produce an overflow or a NaN before performing the final division. I can think of a way of computing the integrand function so as to avoid such a problem, but it does make that function considerably more complicated. It would have to make tests on each di^2 to check that none are too small, and if one of them is, to suitably alter the formula used so as to avoid trouble.

  By the way, what sort of region is enclosed in R? Is it a rectangle aligned with the axes or perhaps a circle?

  Final note: I am guessing that there should be a (y-yi)^2 rather than just (y-yi) in the definition of di^2 in your website image.

Roger Stafford

Subject: Integral with some symmetries

From: Bruno Luong

Date: 26 Apr, 2009 07:06:03

Message: 4 of 8

A note to what Roger said: To check whereas a point passed as input of the function (called by QUAD) is close to one of the poles, one can use my function ISMEMBERF http://www.mathworks.de/matlabcentral/fileexchange/23294 in FEX. Right now this function check using L-infinity norm. However it should be suitable for the purpose here.

Bruno

Subject: Integral with some symmetries

From: Amitalok Budkuley

Date: 26 Apr, 2009 09:22:02

Message: 5 of 8

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gt0gnq$rce$1@fred.mathworks.com>...
> "Amitalok Budkuley" <amitalok86@gmail.com> wrote in message <gsvqmr$h9g$1@fred.mathworks.com>...
> > I have to evaluate an integral. Please follow the image to look at the form of the integral.
> >
> > http://img25.imageshack.us/img25/629/equationmatlab.gif
> >
> > The limits are constants.
> > All xi,yi are constants (have specific meanin in the context i need to use the integral)
> > n-is again a constant.
> > Is there a possible way by conversion into polar co-ordinates??
> > Is a bound on the value possible??
>
> As Bruno has indicated, your integrand does not actually have singularities at the points (xi,yi) even though the numerator and denominator each do. They cancel each other out and the result is a continuous function in x and y. However, it is to be hoped that 'quad2d' does not accidentally call on your integrand function with an (x,y) pair which is exactly at or very close to one of the points (xi,yi). That might cause your defined function to produce an overflow or a NaN before performing the final division. I can think of a way of computing the integrand function so as to avoid such a problem, but it does make that function considerably more complicated. It would have to make tests on each di^2 to check that none are too small, and if one of them is, to suitably alter the formula used so as to avoid trouble.
>
> By the way, what sort of region is enclosed in R? Is it a rectangle aligned with the axes or perhaps a circle?
>
> Final note: I am guessing that there should be a (y-yi)^2 rather than just (y-yi) in the definition of di^2 in your website image.
>
> Roger Stafford

Hi Roger & Bruno,

Your analysis of the possible pit falls and issues with evaluating the integral are very correct. In fact, while integrating i had the "Max functon count reached:singularity likely" error in quad2. In fact, it was near the (xi,yi) points. However, i noticed that by appropriately scaling the integral value previous to integrating it, i got rid of that specific problem.

But, now i intend to get some analytic answer to the integral value. Could it be possible to use some series results on integrals to arrive at some value of integral or a bound.
Thank You.

Subject: Integral with some symmetries

From: Bruno Luong

Date: 26 Apr, 2009 10:18:01

Message: 6 of 8

"Amitalok Budkuley" <amitalok86@gmail.com> wrote in message <gt193q$ao3$1@fred.mathworks.com>...

>
> But, now i intend to get some analytic answer to the integral value. Could it be possible to use some series results on integrals to arrive at some value of integral or a bound.

My very wild guess tells it is doable!

First step: transform 2d integral on 1D integral over the boundary of R (is it a rectangle?).

It seems you can decomposes the function as sum of canonical terms:

I = integral on R of Sum on set {I, J} S(I,J),
where S(I,J) := [ prod_(i in I) di^2/prod_(j in J) d_j^2 ]

Each S{I,J} is a fractional polynomial on y (coefficients depending on x), where analytic solution exists.

It is slightly more complicated to integrate on x,you might need to carry out the change the variables: (x - x_i)^2/(y - y-i) = sh(u_i) ^2. This might lead to a polynomial fraction on {u} (coefficients depending y), and an analytic solution follows (as with integration with respect to y). This might lead to an 1D integration of u_i and x on the boundary of R, then:

Second Step: do again some work on integration on left/right and bottom/top boundary.

A lot of work to be done, but doable. But I have not though deeply. Just submit few random ideas so you can get inspired, hopefully.

Bruno

Subject: Integral with some symmetries

From: Amitalok Budkuley

Date: 26 Apr, 2009 13:36:01

Message: 7 of 8

Thanks for the contribution guys.
Bruno, I will look into what you said right away.But at this stage, i find it extremely hard to perform integration like the way you said in the second stage.
Anyway,I will just put some of my thoughts on the problem too. They may be a little raw or impractical.
1) Let us order the d_i such that d1>d2>d3...dn so that (d^-1)1<(d^-1)2..<(d^-1)n.
From now on, i will call (d^-1)k=Dk.
So, we have Dn>Dn-1....>D2>D1.

2)For the denominator, let sum(j=1 to i-1){Dj^2}=f_i
So, denominator is given as sum(i=1 to n){ Di^2*f_i}
So, of the form sum{i=1 to n}{ai*bi}.
Also, since Dn>Dn-1....>D2>D1, we have
fn>fn-1...f2>f1.

3) We can use the chebyshev sum inequality
http://en.wikipedia.org/wiki/Chebyshev%27s_sum_inequality
and maybe proceed to evaluate the bound on the integral.
Of course, i do not have ideas on how to do that.
Let me know your views.

thanks again
cheers

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <gt1ccp$813$1@fred.mathworks.com>...
> "Amitalok Budkuley" <amitalok86@gmail.com> wrote in message <gt193q$ao3$1@fred.mathworks.com>...
>
> >
> > But, now i intend to get some analytic answer to the integral value. Could it be possible to use some series results on integrals to arrive at some value of integral or a bound.
>
> My very wild guess tells it is doable!
>
> First step: transform 2d integral on 1D integral over the boundary of R (is it a rectangle?).
>
> It seems you can decomposes the function as sum of canonical terms:
>
> I = integral on R of Sum on set {I, J} S(I,J),
> where S(I,J) := [ prod_(i in I) di^2/prod_(j in J) d_j^2 ]
>
> Each S{I,J} is a fractional polynomial on y (coefficients depending on x), where analytic solution exists.
>
> It is slightly more complicated to integrate on x,you might need to carry out the change the variables: (x - x_i)^2/(y - y-i) = sh(u_i) ^2. This might lead to a polynomial fraction on {u} (coefficients depending y), and an analytic solution follows (as with integration with respect to y). This might lead to an 1D integration of u_i and x on the boundary of R, then:
>
> Second Step: do again some work on integration on left/right and bottom/top boundary.
>
> A lot of work to be done, but doable. But I have not though deeply. Just submit few random ideas so you can get inspired, hopefully.
>
> Bruno

Subject: Integral with some symmetries

From: Amitalok Budkuley

Date: 26 Apr, 2009 13:38:01

Message: 8 of 8


>
> First step: transform 2d integral on 1D integral over the boundary of R (is it a rectangle?).
>


By the way, the region R can be any normal onvenient region. I have taken it to be a rectangle of known area with simple limits. if a circle helps, it can be used too.

thanks

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us