1
$\begingroup$

I want to determine the Gaussian quadrature formula in $[-1,1]$ with $2$ nodes and the weight function $w(x) = 1-x^2$.

I know you can calculate the weights with the formula $$a_{i} = \int_{-1}^1 w(x) \prod \limits_{j=i,j \neq i }^{n}\ \frac{x-x_{j}}{x_{i}-x{j}}dx$$

but I can't seem to find a formula for the nodes? Furthermore if $\displaystyle \int_{-1}^1f(x)dx = \sum_{i=1}^nw_{i}f(x_{i})$ then what is $n$? Is it $n=3$ because of $1-x^2$ ?

  • 0
    Note that *generically* it is not possible to get a closed form expression for the nodes, because that generically requires the solution of a more or less general tridiagonal eigenvalue problem. Thus this problem can be hard, especially if your $n$ is large. In many special cases (for example when $w$ is constant) we have explicit formulae even for large $n$, however. (By the way, $n$ is the number of nodes, and you must choose it; it determines the accuracy of the method you construct.)2017-01-30

1 Answers 1

0

For a given function $f$ define a quadrature: $$ Q(f) = w_1 f(x_1) + w_2 f(x_2) $$ and an integral $$ I(f) = \int_{-1}^1 f(x) \, dx $$

You want to find four numbers $x_1$, $x_2$, $w_1$, $w_2$ such that $Q(f) = I(f)$ for $f = \omega, \, \omega x , \, \omega x^2 , \, \omega x^3 $, where $\omega = 1 - x^2$. We get a system of equations:

$$ w_2(1-x_2^2)+w_1(1-x_1^2) = 4/3, \quad w_2x_2(1-x_2^2)+w_1x_1(1-x_1^2) = 0, \quad w_2x_2^2(1-x_2^2)+w_1x_1^2(1-x_1^2) = 4/15, \quad w_2x_2^3(1-x_2^2)+w_1x_1^3(1-x_1^2) = 0 $$

Taken $x_2 = -x_1$ and $w_2 = w_1$ turn the second and the last into identities. Remaining two are: $$ 2w_1(1-x_1^2) = 4/3, \quad 2w_1x_1^2(1-x_1^2) = 4/15 $$

And finally $$ w_1 = 5/6, \quad w_2 = 5/6, \quad x_2 = 1/\sqrt{5}, \quad x_2 = -1/\sqrt{5} $$

  • 0
    Thank you! That helps alot but can I ask you how you get the values $4/3, 4/15$ and $0$ ?2017-01-30
  • 0
    For example, $4/15$ is $\int_{-1}^{1} \omega x^2 \, dx = \int_{-1}^{1} (1 - x^2) x^2\, dx$2017-01-30
  • 0
    Ahh, got it, thank you very much!2017-01-30