How to I approximate $I = \int_{-1}^{1} \sqrt{1-x^2}\cos(x)dx$ s.t. the error is bounded?

103 Views Asked by At

Edit: Because the original question was pretty trivial, I want to ask the same question but with:$I = \int_{-1}^{1} \sqrt{1-x^2}\cos(x)dx$.

How to I approximate $I = \int_{-1}^{1} \sqrt{1-x^2}\sin(x)dx$ s.t. the error is bounded? I know that the formula for approximation will be some sort of linear combination of $f(x_i)$ s.t. the $x_i$'s are roots of some orthogonal polynomial. The hint for this question was to not do Gram-Schmidt, so I'm guessing I need to use Legender polynomials, but isn't the error still going to include some derivative of $f$ and thus not be bounded. I'm sure I'm missing something. In the general case, how do I know whether I need to find a basis for orthogonal polynomials using a weight function or use Legender?