00:01
We are going to use the trapezoidal rule, the midpoint rule and simpson's rule to approximate the interval from 0 to pi half of cubic root of 1 plus cosine of x with force of intervals.
00:18
So let's define the function f of x equal cubic root of 1 plus cosine of x on the interval 0 by half.
00:44
And the lower limit of integration is 0, a equals 0.
00:50
The upper limit is b equal pi half.
00:53
The numbers of intervals n is 4.
00:57
And with that, we can calculate the step size delta x equal b minus a over n, which is equal to pi half minus 0 over 4, that is pi over 8.
01:14
So that's the step size, pi over 8.
01:26
With that, we can now write the expression for the nodes.
01:31
We'll be using xy, x, sorry, equals a plus i times delta x, that is 0 plus i times pi over 8, and that is i pi over 8.
01:49
4 i equals 0 1 up to 4 that is in this case we can write all the values now not too much of them 0 1 2 3 and 4 as the 5 value that takes i and the midpoints we will be using fault trap so and the midpoint rule we get x x x x bar is x sub i plus x sub i plus 1 over 2 that is is the average of the two consecutive nodes and that's equal to using this expression we found before is i by over 8 plus i plus 1 by over 8 and that over 2 and if we simplify this, we get 2i plus 1 pi over 16.
03:10
4, in this case i from 0 up to 3, because we have force midpoints because we have force of intervals.
03:27
0, 1, 2, 3...