Consider three-points Gaussian quadrature. The three points on the x-axis and the associated weights are:
x1 =0, x2 = -"\\sqrt{3\/5}" , x3 = "\\sqrt{3\/5}" ; w1 = 8/9, w2 = w3 = 5/9
Apply this 3-points Gaussian quadrature to the polynomial
P(x) = 2x5-x4+x2-1
"P(x)=2x^5-x^4+x^2-1"
"P(x_1)=P(0)=-1"
"P(x_2)=P\\big(-\\sqrt{\\tfrac{3}{5}}\\big)=-2\\cdot \\big(\\tfrac{3}{5}\\big)^2\\cdot \\sqrt{\\tfrac{3}{5}}\u2014\\big(\\tfrac{3}{5}\\big)^2+\\tfrac{3}{5}-1=-\\tfrac{18}{25}\\cdot \\sqrt{\\tfrac{3}{5}}-\\tfrac{19}{25}"
"P(x_3)=P\\big(\\sqrt{\\tfrac{3}{5}}\\big)=2\\cdot \\big(\\tfrac{3}{5}\\big)^2\\cdot \\sqrt{\\tfrac{3}{5}}\u2014\\big(\\tfrac{3}{5}\\big)^2+\\tfrac{3}{5}-1=\\tfrac{18}{25}\\cdot \\sqrt{\\tfrac{3}{5}}-\\tfrac{19}{25}"
"\\int\\limits_{-1}^1P(x)dx\\approx\\sum_{i=1}^3w_iP(x_i)=w_1P(x_1)+w_2P(x_2)+w_3P(x_3)=\\tfrac{8}{9}\\cdot (-1)+\\tfrac{5}{9}(P(x_2)+P(x_3))=-\\tfrac{8}{9}+\\tfrac{5}{9}\\cdot \\big(-\\tfrac{38}{25}\\big)=-\\tfrac{8}{9}-\\tfrac{38}{45}=-\\tfrac{40+38}{45}=-\\tfrac{78}{45}=-\\tfrac{26}{15}=-1\\tfrac{11}{15}"
Answer: "\\int\\limits_{-1}^1P(x)dx\\approx-1\\tfrac{11}{15}" .
Comments
Leave a comment