Thursday, November 19, 2015

int_0^1 sinx/x dx Use a power series to approximate the value of the integral with an error of less than 0.0001.

From the Power Series table for trigonometric function, we have:
sin(x) =sum_(n=0)^oo (-1)^n x^(2n+1)/((2n+1)!)
             = x -x^3/(3!) +x^5/(5!) - x^7/(7!) +...
Applying it on the integral int_0^1 sin(x)/x dx where the integrand is f(x)=sin(x)/x, we get:
int_0^1 sin(x)/x dx = int_0^1 sin(x)*1/x dx
                 =int_0^1 sum_(n=0)^oo (-1)^n x^(2n+1)/((2n+1)!) *1/xdx
                   =int_0^1sum_(n=0)^oo (-1)^n x^(2n+1)/((2n+1)!) *x^(-1)dx
                    =int_0^1sum_(n=0)^oo (-1)^n x^(2n+1-1)/((2n+1)!) dx
                    =int_0^1sum_(n=0)^oo (-1)^n x^(2n)/((2n+1)!) dx
                   =int_0^1 [1 -x^2/(3!) +x^4/(5!) - x^6/(7!) +...] dx
 Or 
int_0^1 sin(x)/x dx =int_0^1 sin(x)/x dx
                   =int_0^1 1/x* [x -x^3/(3!) +x^5/(5!) - x^7/(7!) +...] dx
                    = int_0^1 [x/x -x^3/(3!x) +x^5/(5!x) - x^7/(7!x) +...] dx
                    =int_0^1 [1 -x^2/(3!) +x^4/(5!) - x^6/(7!) +...] dx
To determine the indefinite integral, we integrate each term using Power rule for integration: int x^n dx = x^(n+1)/(n+1) .
int_0^1 [1 -x^2/3! +x^4/5! - x^6/7! +...] dx= [x -x^3/(3!*3) +x^5/(5!*5) - x^7/(7!*7) +...]_0^1
           = [x -x^3/(1*2*3*3) +x^5/(1*2*3*4*5*5) - x^7/(1*2*3*4*5*6*7*7) +...]_0^1
           = [x -x^3/(6*3) +x^5/(120*5) - x^7/(5040*7) +...]_0^1
           = [x -x^3/18 +x^5/600- x^7/35280+...]_0^1
Apply definite integral formula: F(x)|a^b =F(b)-F(a) .
F(1)= 1-1^3/18 +1^5/600- 1^7/35280+...
         =1-1/18 +1/600- 1/35280+...
F(0)= 0-0^3/18 +0^5/600- 0^7/35280+...
         =0-0+0-0+...
All the terms are 0 then F(0)=0 .
We can stop on the 4th term  (1/35280 ~~2.8345x10^(-5)) since we only need an error less than 0.0001.
F(1)-F(0)= [1-1/18 +1/600- 1/35280]- [0]
                     =1-1/18 +1/600- 1/35280
                      = 0.9460827664
 Then, the approximated integral value will be:
int_0^1 sin(x)/x dx~~0.9461

No comments:

Post a Comment

Why is the fact that the Americans are helping the Russians important?

In the late author Tom Clancy’s first novel, The Hunt for Red October, the assistance rendered to the Russians by the United States is impor...