System of linear equations to solve formula for integral

31 Views Asked by At

Determine the coefficients a,b and c so that the formula is valid for all polynomails of degree 5.

$\int_{0}^{1} f(x)dx=\frac{1}{90}[af(0)+bf(0.25)+cf(0.5)+bf(0.75)+af(1)]$

This question is in my linear algebra course and the chapter is on gaussian elimination. What I've come to is that if you calculate a,b,c for $f(x)=x^p, p=\{0,1,2,3,4,5\}$ then that solutions should be valid for any polynomial of degree 5 since the formula is linear.

My problem is

  1. I can't seem to get the right answer
  2. Is there some insight in creating functions like this. It seems related to Taylor series almost.

Edit: I soved it, but second question remains.

For

$f_0(x)=x^0: \int_{0}^{1}=1, formula=\frac{1}{90}(2a+2b+c)$

$f_1(x)=x^1: \int_{0}^{1}=\frac{1}{2}, formula=\frac{1}{90}(a+b+\frac{1}{2}c)$

$f_2(x)=x^2: \int_{0}^{1}=\frac{1}{3}, formula=\frac{1}{90}(a+\frac{5}{8}b+\frac{1}{4}c)$

$f_3(x)=x^3: \int_{0}^{1}=\frac{1}{4}, formula=\frac{1}{90}(a+\frac{7}{16}b+\frac{1}{8}c)$

$f_4(x)=x^4: \int_{0}^{1}=\frac{1}{5}, formula=\frac{1}{90}(a+\frac{41}{128}b+\frac{1}{16}c)$

$f_5(x)=x^5: \int_{0}^{1}=\frac{1}{6}, formula=\frac{1}{90}(a+\frac{61}{256}b+\frac{1}{32}c)$

This creates a linear equations system:

$90A=\begin{pmatrix}2&2&1\\1&1&\frac{1}{2}\\1&\frac{5}{8}&\frac{1}{4}\\1&\frac{7}{16}&\frac{1}{8}\\1&\frac{41}{128}&\frac{1}{16}\\1&\frac{61}{256}&\frac{1}{32}\end{pmatrix}, \vec{x}=\begin{pmatrix}a\\b\\c\end{pmatrix},\vec{b}=\begin{pmatrix}1\\\frac{1}{2}\\\frac{1}{3}\\\frac{1}{4}\\\frac{1}{5}\\\frac{1}{6}\end{pmatrix}$

If you solve$A\vec{x}=\vec{b}$ you get $a=7,b=32,c=12$

$f(x)=(Ax^5+Bx^4+Cx^3+Dx^2+Ex+F)$

Since $\int_{0}^{1} f(x)dx$ can be integrated by its addends you get

$\int_{0}^{1}f(x)dx=$

$A[7(f_5(0)+f_5(1))+32(f_5(0.25)+f_5(0.75))+12(f_5(0.5))]+ B[7(f_4(0)+f_4(1))+32(f_4(0.25)+f_4(0.75))+12(f_4(0.5))]+ C[7(f_3(0)+f_3(1))+32(f_3(0.25)+f_3(0.75))+12(f_3(0.5))]+ D[7(f_2(0)+f_2(1))+32(f_2(0.25)+f_2(0.75))+12(f_2(0.5))]+ E[7(f_1(0)+f_1(1))+32(f_1(0.25)+f_1(0.75))+12(f_1(0.5))]+ F[7(f_0(0)+f_0(1))+32(f_0(0.25)+f_0(0.75))+12(f_0(0.5))]$

Which is equal to $7[f(0)+f(1)]+32[f(0.25)+f(0.75)]+12f(0.75)$, hence the formula is valid for all polynomials of degree 5.

Edit2:

For which polynomials is this formula true, and, more generally, is there a given number of constants needed to express a polynomial's, of degree p, integral by a formula?