In this segment we'll talk about an example of using bisection method to
solve a nonlinear equation.
So, the example which we're asked to solve is to find the root of this equation right here,
and we are supposed to use the initial bracket to be one comma four. We're supposed to conduct
three iterations; we're supposed to find the absolute relative approximate error
at the end of each iteration. And based on that, we're supposed to say that hey,
how many significant digits are at least correct at the end of each iteration?
So, before we start applying the bisection method what we have to make sure is that the
equation isn't given in the form of f of x equal to 0.
We are given x cubed equal to 20, so the first thing which I have to do is I have to rewrite
the equation in the form of f of x equal to 0, which turns out to be x cubed minus 20 equal to 0
because that's what the algorithm is written for. It's written for
equations which are the form f of x equal to 0. Then also we are given that hey, the initial
estimates, not initial estimates, the initial guesses for the bracket are given by 1 comma 4,
that the root is lying between one comma four. That's what it means the lower limit and the upper
limit of the guess, of the root is given as this. But uh, before we again apply the iteration,
we've got to make sure that this bracket here this bracket of 1 comma 4 is a valid one,
so let's go and see if the, what is the value of the function at the lower limit; will be
1 cubed minus 20, that’s minus 19. What is the value of the function at the upper limit which
is 4? So, it'll be 4 cubed minus 20 and this turns out to be 44. So, this gives us that
the value of the function at the lower limit multiplied by the value of the function at the
upper limit is minus 19 times 44 is less than zero, which basically then tells us that the
1 comma 4 or initial bracket is valid. So, because it means that the function is changing sign
between 1 and 4, that it is going through the x-axis. So, that makes this initial
bracket of one comma four to be valid and now we are ready to conduct iterations.
So, let's look at iteration number one, we have our lower limit to be equal to 1,
upper limit equal to 4 so that gives us the midpoint between the lower and upper limit
will be x_l plus x_u divided by 2 which is 1 plus 4 divided by 2, and that’s 2.5. And so,
that's the first estimate of our root; 2.5 is the first estimate of the root.
Can we calculate epsilon, can we calculate the absolute relative approximate error?
No, we can't, cannot be calculated because we don't have a previous estimate of the root.
We only have a new estimate of the root, but we don't have previous estimates so that's
the end of the iteration one. Let's go and see what happens at the, for iteration two.
So, iteration two, what we're going to have is as follows. Our x_m is 2.5, we just found out,
so let's go and find out what the value of the function at x m is, which is the value of the
function at 2.5, which will be 2.5 cubed minus 20. And that number turns out to be -4.375. Now, keep
in mind that now, what we have to do is we have to see whether the function at the lower limit times
the function at the midpoint now, what is the sign of that? We know that the lower limit is 1, the
midpoint is 2.5 which we just found out, and the, what is the value of the function at 1? It's -19,
the value of the function at 2.5 is -4.375, which means it is greater than zero. What that means, is
that the function does not lie between 1 and 2.5 because it is not changing sign between 1 and 2.5.
So, what that means is that we had 1 and 4, and we had 2.5, so it is not between these two numbers,
so it has to be between these two numbers where the function change sign. So, this becomes my
new lower limit, and the upper limit stays the same. So, we'll have x_l equal to 2.5, and x_u
equal to 4, and what this does is that this gives me the new estimate of the root to be the
midpoint between x_l and x_u. The redefined x_l and x_u, and that turns out to be equal to 3.25.
Now what I want to do is I want to calculate what the absolute relative approximate error is, which
will be the current approximation, which is 3.25 minus the previous approximation, which is 2.5,
divided by the current approximation, 3.25, times 100, and this number here turns out to be 23.1%.
Now if I want to find out what is m is, what I mean by m is what is the number of significant
digits which are at least correct in the estimate of root of 3.25, it will be zero. So,
zero number of significant digits can be at least trusted in my solution of 3.25 because the
absolute relative approximate value which I get is nowhere close to 5%, because we know that if it is
less than or equal to 5%, we can claim at least one significant digit to be correct. If it is
0.5%, then we can claim two to be correct. If it is 0.05, we can claim three to be correct, and so
on and so forth. So, in here, we cannot claim any of the significance to be correct as epsilon a is
greater than five percent. Let's go and see if we have any better luck with the third iteration.
So, let's look at iteration number three.
So, in iteration number three, what I have is that my x_m, which I just found out, is 3.25.
So, the first thing which I have to do is I have to find the value of the function at this
midpoint which I found from the previous one. So, turns out to be a quantity which is 14.33.
And that's the case, what is then the multiplication of the function value at
the lower and the midpoint, uh, lower limit and the midpoint would be equal to hey,
what was the lower limit in the previous one? It was 2.5, what was the midpoint now? Which is 3.25,
and that gives me that three point two, sorry 2.5, it was -4.375, and 3.25 I just found out,
and this turns out to be less than zero. So, what that tells me is that I had my 2.5
and 4 as my lower and upper limit, my midpoint was 3.25. I found out that hey, the function
is changing sign between 2.5 and 3.25, as is the case here. So, that means that the root does lie
between this new bracket now of 2.5 and 3.25. So, if that is the case, this becomes my lower limit
and this becomes my upper limit, so let's write that down. The lower is 2.5, the upper limit is
3.25, which gives me that the estimate of the root is now the midpoint between these two,
and this number here turns out to be equal to 2.875.
So, that is my value at the end of the third iteration.
Let's go and calculate our absolute relative approximate error, which is the current
approximation minus the previous approximation divided by the current approximation,
and if I multiply by 100 to get the value in terms of percent, I get 13 percent.
And what I’m finding out this 13 is still, epsilon a is greater than 5 percent, and so I can I still
will have to say only I cannot trust any of the significant digits in my solution right here.
So, what you got to think about is that we'll have to conduct even more iterations to be able to get
this number to be down. So, we can start trusting some significant digits in our estimate of the
root, but also gives you a glimpse that although bisection method is guaranteed convergence,
because you know the root lies between the lower and upper limits of your bracket, but
the convergence seems to be slow. And that is the end of this segment.