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

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?

• Hint: Use the symmetry of the integral. Aug 18 '15 at 15:49
• I second @Michael, the value of this integral is $0$ by default. I posted as an answer, but deleted it because the value is known, but it doesn't help you in your approximations Aug 18 '15 at 15:56
• What if instead of sin(x) I had cos(x)? Aug 18 '15 at 15:59
• Just for fun: The value of the integral with cosine is $\pi J_1(1)$, where $J_1$ denotes the Bessel function it usually does... Aug 18 '15 at 16:04
• You can use Gauss-Chebyshev rule en.wikipedia.org/wiki/Chebyshev%E2%80%93Gauss_quadrature Aug 18 '15 at 18:11

$$I=\int_{-1}^1\sqrt{1-x^2}\cos(x)dx=\int_{-1}^1(1-x^2)^{1/2}\cos(x)dx$$ we can say that: $$(1-x^2)^{1/2}=\left(1\right)+\left(\frac12(-x^2)\right)+\left(\frac12\times\frac{-1}2(-x^2)^2\right)+\left(\frac12\times\frac{-1}2\times\frac{-3}2(-x^2)^3\right)...$$ $$=1+(-1)^12^{-1}x^2+(-1)^32^{-2}x^4+3(-1)^52^{-3}x^6...$$ and we know that: $$\sin(x)=\Im\left[e^{jx}\right]$$ We also know that the formula is symmetrical so it becomes: $$I=2\Im\left[\int_0^1\sum_{i=0}a_ix^{2i}e^{jx}\right]$$ where $$a_ix^{2i}$$ are the terms of that series