# forum.alglib.net

ALGLIB forum
 It is currently Mon Sep 16, 2024 8:26 pm

 All times are UTC

### Forum rules

1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Question about gqgenerategaussjacobiPosted: Wed Jun 23, 2010 2:56 pm

Joined: Wed Jun 23, 2010 2:51 pm
Posts: 2
Hello,

I'm using the routine gqgenerategaussjacobi to generate points and weights for Gauss-Jacobi integration. When debugging my code I observed that the weights of the generated rules don't add up to 1, but rather to 1.0666... . Is this intentionally? And if the answer is yes, is there any particular reason for choosing the weights in such way?

Top

 Post subject: Re: Question about gqgenerategaussjacobiPosted: Wed Jun 23, 2010 4:56 pm

Joined: Fri May 07, 2010 7:06 am
Posts: 922
MKl wrote:
I'm using the routine gqgenerategaussjacobi to generate points and weights for Gauss-Jacobi integration. When debugging my code I observed that the weights of the generated rules don't add up to 1, but rather to 1.0666...

It's alright. Sum of weights is equal to integral(a,b,1*W(x)dx) (try to calculate this integral using Gauss-Jacobi formula and you will see why).

This integral is equal to 2.0 only in the Gauss-Legendre case (alpha=beta=0.0). Note - to 2.0, not to 1.0. In the general case it may have arbitrary value.

Top

 Post subject: Re: Question about gqgenerategaussjacobiPosted: Fri Jun 25, 2010 10:56 pm

Joined: Wed Jun 23, 2010 2:51 pm
Posts: 2

I'm using Gauss-Jacobi rules to calculate the expectation of functions of beta distributed variables and therefore expected the sum of weights to be one. Thanks again for pointing out my mistake.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 3 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: Google [Bot] and 7 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for: