Using the Gauss quadrature method how can we obtain the points and weights for any distribution function like gamma distribution or beta distribution etc.?
Are you asking if Gauss Quadrature could be modified so as to automatically compensate for a particular distribution (or weighting function)? If it could be, then it would no longer be Gauss Quadrature. Are you perhaps asking if there is some method like Gauss Quadrature that incorporates a distribution (or weighting function)? That's a different matter. There are other methods that have associated weighting functions, though not gamma or beta that I know of. It's easy enough to adapt GQ. If you provide a specific example, I'd be glad to integrate it for you and send you the source code.
Respected Benton sir, sorry that I may have not stated the problem clearer. Sir, I actually need the approximation of distribution functions like normal distributions by the GQ method. In doing so, how can we obtain the points and weights of the approximation?
I explain where the abscissas and weights for Newton-Cotes and Gauss Quadrature come from in Chapters 2 and 3, respectively, in this book http://www.amazon.com/dp/B07BS1DN1S The eBook will be free on March 16 but you can click on "Look Inside" and read all of Chapters 1, 2, and 3 without getting the book. The software (to find the weights and abscissas plus a lot more) is always free at the link listed in the Foreward. Gauss Quadrature is unique in that the weights and abscissas can be found using orthogonal polynomials. The weights and abscissas for Newton-Cotes are found using a matrix solver. To find the weights and abscissas for a special application, such as you describe, I would modify the code to find Newton-Cotes. The process is the same, only the objectives are different; so you basically solve the same problem with a different objective function. If it turns out to be nonlinear, you can get free software to do that at the same location and also read about it in Chapters 1, 2, and 3 of this book https://www.amazon.com/dp/B07FL7JR1J using "Look Inside" without getting it either. It won't be free until April 6. The eBooks are not copy protected so you can lend the to other students.