Find the value of the integral $\int_0^1 \frac{\sin(x)}{x}dx$

208 Views Asked by At

Given the integral

$$\int_0^1 \frac{\sin(x)}{x}dx$$

I have to find the value of the integral with an accuracy better than $10^{-4}$, however, I am pretty lost.

I am given a hint saying that I should replace $\sin(x)$ with the Taylor polynomium of order $2n$ and evaluate the remainder $Rnf(x)$. I know that the Taylor series is given by $$ \sum_{n=1}^\infty \frac{f^{(n)}(x_0)}{n!}(x-x_0)^n $$ so by replacing with $2n$ we have $$ \sum_{n=1}^\infty \frac{f^{(2n)}(x_0)}{2n!}(x-x_0)^{2n} $$ but am I really expected to calculate this? And if so how would I even do this?

Can you help me in the right direction? Thanks in advance.

3

There are 3 best solutions below

1
On BEST ANSWER

We know that the Taylor Series for $\sin x$ is $$ \sin x = \sum_{n=0}^\infty (-1)^n \dfrac{x^{2n+1}}{(2n+1)!} $$ Then the Taylor Series for $\dfrac{\sin x}{x}$ is $$ \dfrac{\sum_{n=0}^\infty (-1)^n \dfrac{x^{2n+1}}{(2n+1)!}}{x} = \sum_{n=0}^\infty (-1)^n \dfrac{x^{2n}}{(2n+1)!} $$ Then we have $$ \begin{aligned} \int_0^1 \dfrac{\sin x}{x} \;dx&= \int_0^1 \sum_{n=0}^\infty (-1)^n \dfrac{x^{2n}}{(2n+1)!} \;dx \\ &=\sum_{n=0}^\infty \int_0^1 (-1)^n \dfrac{x^{2n}}{(2n+1)!} \;dx \\ &= \sum_{n=0}^\infty (-1)^n \dfrac{x^{2n+1}}{(2n+1)(2n+1)!} \bigg|_0^1 \\ &= \sum_{n=0}^\infty \dfrac{(-1)^{n}}{(2n+1)(2n+1)!} \end{aligned} $$ But this is an Alternating Series so the error in summing the first $k$ terms (compared to the final infinity sum) is at most the magnitude of the $k+1$ term. You want the error to be at most $10^{-4}=0.0001$. So you just want a $k$ so that $$ \bigg|\dfrac{(-1)^{n}}{(2k+1)(2k+1)!}\bigg| < 0.0001 $$ Trying a few terms we find that $k=3$ works. So we need only sum $$ \sum_{n=0}^{2} \dfrac{(-1)^{n}}{(2n+1)(2n+1)!}= 1-\dfrac{1}{18}+\dfrac{1}{600} \approx 0.946111 $$ We can check this as $$ \int_0^1 \dfrac{\sin x}{x} \;dx \approx 0.9460830703671841 $$ Note that I used the properties of Alternating Series, but here this is equivalent to using Taylor's Remainder Theorem, that if you only sum the first $k$ terms of a convergent Taylor Series, the magnitude error in the sum is at most $$ M \dfrac{R^{k+1}}{(k+1)!} $$ where $R$ is the distance from the center you chose for the Taylor Series and the point you are evaluating at and $M$ is a bound on your derivative, i.e. if you are using the Taylor Series centered at $x=a$ and you are evaluating the series at $x=b$, then $R= |b-a|$ and $M$ is a number so that $|f^{(k+1)}(x)| \leq M$ for all $x$ between $a$ and $b$.

0
On

On taking $x_0=0$, we get the taylor polynomial of $\sin x$ to be $$\sin x=x-\dfrac{x^3}{3!}+\dfrac{x^5}{5!}-\dfrac{x^7}{7!}+\cdots+\dfrac{(-1)^nx^{2n+1}}{(2n+1)!}+R_n(x)=\sum_{k=0}^n\dfrac{(-1)^kx^{2k+1}}{(2k+1)!}+R_n(x)$$ Dividing it by $x$ and integrating we get $$\int_0^1\dfrac{\sin x}xdx = \int_0^1\left(\sum_{k=0}^n\dfrac{(-1)^kx^{2k}}{(2k+1)!}+R_n(x)\right)dx\\ =\sum_{k=0}^n\dfrac{(-1)^k}{(2k+1)(2k+1)!}+\int_0^1R_n(x)dx$$

Now note that $R_n(x)=O(x^{2n+3})$ and therefore, we can safely ignore this term after a good approximation is reached.

0
On

I am not sure if this is allowed but if someone in the future might need help to understand these particular problems, in general, the following Youtube-video made it so much clearer:

https://www.youtube.com/watch?v=3ZOS69YTxQ8