00:01
So for this question, we're going to talk about error analysis for the trapezoidal rule.
00:06
So before we do that, we're asked to find the exact value of the integral first.
00:11
So let us do that.
00:15
So part a, we want to find the exact value of the integral from 0 to 1 of x to the power of 4dx.
00:24
So that is going to be 1 over 5, x the power of 5, and that's going to be evaluated from 0 to 1.
00:33
And that's just equal to 1 over 5 or 0 .2.
00:40
Now part b is asking us to use the trapezoidal rule, and we need to repeat that for different values of n.
00:48
So we need to do it for n equals 4, 8, 16, and 32.
00:53
So i won't be writing all the numbers down because i don't have enough space to write everything down.
01:00
But what you need to do is you need to, so for example, for n equals 4, you need to find your delta x.
01:10
So for n equals 4, our delta x is going to be b minus a over n, so that's 1 over 4.
01:18
So once you have that, you need to write down all your x -is.
01:22
So my x -is, i'll start at 0 because that's my a, and i'm going to go up by a quarter.
01:30
So that's 0 .25, 0 .5, 0 .75, and 1.
01:37
And then once you find those, you need to plug into your 4 .25 ,000, and 1.
01:40
Function x of power 4 and find what your y value is so that'll get us 0 .0 .003906 0 .0 .0 625 0 .3164 and 1.
02:03
And once you have all your values i have written the trapezoidal rule up here in red.
02:09
So you're going to plug these values into this formula.
02:14
And once you do that, you'll get integral from 0 to 1 of x of power 4 x, that is going to be approximately 0 .2207.
02:32
So once you've done that, now you need to repeat the process.
02:36
So you're going to do it for n equals 8, n equals 16, and n equals 32.
02:45
So like i said earlier, i'm not going to write down all these values.
02:50
I have done it already in a separate program.
02:56
So i have the values.
02:58
And you can do the calculations yourself and just double check.
03:03
But for n equals 8, we're going to get, for n equals 8, we will get the value is approximately 0 .205.
03:22
For n equals 16, it's going to be 0 .2013.
03:31
And lastly, for n equals 32, we'll get 0 .203.
03:43
So with these four values, now you're asked to calculate what is the absolute value of the error by subtracting your approximation with the exact answer for.
03:55
From part a.
03:56
So that part's easy.
03:58
All you're doing is you're taking this value and you're subtracting the exact value which is 0 .2 from that.
04:06
So which means our errors we're going to get for n equals 4, that's going to be 0 .0207.
04:28
For an n equals 8, our error is going to be 0 .00 .7...