Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I How do you Calculate the Points in Gaussian Quadrature?

  1. May 7, 2017 #1
    How do you calculate the necessary points in a function to numerically integrate it using the Gaussian Quadrature?

    If I were to evaluate a function using two points, the Gaussian Quadrature needs the value of the function at ##\displaystyle{\pm \sqrt{\frac{1}{3}}}## with weights of unity. How did they calculate the ##\displaystyle{\pm \sqrt{\frac{1}{3}}}##?

    I have looked through an example of how the points are located, and in this example, the point is estimated by dividing the length of the function into the number of required points (if the function is to be integrated with two points, the whole function is divided into three parts), and somehow narrow down the location of the point by using this relation:
    \begin{equation*}
    x - \frac{P_n\left(x\right)}{P_n'\left(x\right)}
    \end{equation*}
    where ##x## is the estimated point and the functions on the second term are the Legendre Polynomials. The result of this difference will be the new location of the point. This process is repeated until the result is almost zero.

    If the above equation is acceptable, what is the concept behind the second term (the ratio between the Legendre Polynomials)?
     
  2. jcsd
  3. May 7, 2017 #2
    The abscissas (or points) used in a Gauss-Legendre quadrature of order ##n## are the zeros of the Legendre polynomial of the same order, i.e. ##P_n(x)##. So, for order 2 they are the two roots of ##P_2(x)##. As you noted they are ##\pm \sqrt{1/3}##. The formula you are giving is the Newton method. That is, you can find the root of a function f(x) by using the recursive relation
    ##x_{i+1}=x_i-\frac{f(x_i)}{f'(x_i)}##,
    starting from a guess ##x_0##. The method is derived by doing a Taylor expansion of ##f(x)## around ##x=x_i##.
     
  4. May 8, 2017 #3
    I see. Now it makes sense. Thank you for your help!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: How do you Calculate the Points in Gaussian Quadrature?
Loading...