00:01
We are going to estimate the value of pi by estimating the integral from 0 to 1 of 1 over 1 plus x square, which is equal to arc tangent of 1, which is equal to pi 4th, by the trappiser rule with 6 sub -indibles in part a, and by simpsom's rule with 3 sub -intervals in part b.
00:28
We will round off the results of 4 decimal places.
00:31
So let's define the function we are integrating here.
00:40
Let's say f of x equal 1 over 1 plus x square.
00:50
And we consider that function defined on the close interval 0 1.
00:58
And we know that the primitive of 1 over 1 plus x square is arc tangent that is inverse of the tangent function at x.
01:08
And so the interval from 0 to 1 of 1 over 1 plus x square will be the difference of arc tangent of 1 minus arc tangent of 0.
01:21
Where arc tangent of 0 is 0 because the tangent of 0 is 0.
01:27
So the inverse of the tangent is also 0 at 0.
01:30
So that's why this integral is equal to arc tangent of 1 and because the tangent of 5.
01:40
Fourths is 1 is equal to 1 then the arc tangent of 1 is by 4th from here we will estimate by by by by 4 the estimation of the integral so we start by using the trapezoidal rule with six sub intervals and we know the trapezoidal rule in general tn is b minus a over 2 n times the image of x 0 plus 2 image of x1 plus of 2 to image of xn minus 1 plus the image of the last node xn that's general expression of 10 and trapezo the rule and here we're going to use 6 of intervals this implies that this step size h which is b minus a over n is equal in this case to 1 minus 0 over n that is 6 that is 1 over 6 that is 1 over 6 that's the step size h now with that we can write the nodes which are x i equal 0 which is the left and point of the interval of integration plus i times h and that is i over 6 and the index i goes from value 0 up to value 6 with that we can now write the trapezoid rule with 6 of intervals.
03:33
It is equal to this factor b minus a over 2 n is h halves times f at x0 plus 2 f at x1 plus of 2 f at x5 would be x n minus 1 plus f at x6 which is the last note.
03:59
Now we put the value, so t6, so the rule with six of intervals is h, we calculated hereup is 16, so it's 16 over 2 times f, the first note is 0 plus 2.
04:19
Remember the formula for the notes was found here is i over 6, so f at x1 becomes f at 1 6.
04:32
After that we will have 2f add 2 6, that is 1 3rd, and like that up to f at 5 over 6, plus the image of the last note, which is 1.
04:52
So this is 1 over 12 times.
05:02
Now we apply the function is 1 over 1 plus x square, so here is 1 plus 2 times 1 over 1 plus 1 6 square, that is 2 over 1 plus 1 6 square, that is 2 over.
05:15
1 plus 1 over 6 square.
05:21
Then the next image will be 2.
05:24
The image is 1 over 1 plus 1 3rd square times 2 is 2 over 1 plus 1 3rd square, plus 1 3rd square.
05:36
Plus 2 over 1 plus 5 over 6 square.
05:44
And f at 1 is 1 over 1 plus 1 square, that is 1 1 1 1 1 1 1 1⁄.
05:51
And now we use a calculator at this point and we get t6.
05:57
Trapezoid rule with six sub intervals is approximately equal to 0 .7842 roundoff to four decimal places.
06:13
So this is the approximation to the integral given by travisoidal rule using six sub intervals...