0
$\begingroup$

I have problem with this example so if somebody can explain how I can solve it or how I can simplify o write $f(x)$ function it will be great!

Find Gaussian formula in form:

$\int^{1}_{-1}|x|\cdot f(x) dx=w_0\cdot f(x_0)$

and with that formula solve next integral:

$\int^{1}_{-1}|x|\cdot \sin(x) dx$

I will probably be able to solve but I really don't know what to do with $\sin(x)$, because we only do exaples of this kind:

$\int \sqrt x f(x)dx=w_0\cdot f(x_0)$ to solve $\int x^2dx$ so in that case I know that I should write $f(x)$ as $x^k$ but here in case with $\sin(x)$ or any other function I'm in front of wall and don't have any idea.

I would be really happy if somebody have time to write this down also for other functions not only for $\sin(x)$.

Thank you!

1 Answers 1

0

Gaussian one-point formula is exact on affine functions. Since the weight function is even, the nodes are symmetric wrt. $0$, so $x_0=0$. Observe that the node $x_0$ is a root of a polynomial of degree $1$ orthogonal wrt. the weight function $|x|$. This is indeed $0$. Next, to determine $w_0$ let us integrate the $1$ function with the weight function $|x|$. The integral is $1$, so (because our quadrature is exact on affine functions), $$1=\int_{-1}^1 |x|\text{d}x=w_0\cdot 1$$ and finally $$\int_{-1}^1 f(x)|x|\text{d}x=f(0)$$ is our Gaussian formula. Applied to $f(x)=\sin x$ gives of course $0$. This example tells us that Gaussian quadratures are always exact on polynomials of the highest possible degree, nevertheless they could be exact on certain other functions.