00:01
In the first part, we do three iterations by hand of the bisection method applied to the function x cubed minus 2 using a equal 0 and b equal 2.
00:12
In part 2, for the function x minus exponential of negative x squared, we do a calculation by hand with a calculator to find the root of the equation f of x equals 0 on the closed interval 0, 1 to an accuracy of 0 .1.
00:29
So let's go with first part so the function is x cubed minus 2 and the interval is a closed interval from 0 to 2 so we have first this function f is continuous on the closing to 0 to simply because this is a polynomial function that is continuous everywhere in the real numbers since f is a polynomial function and f at the endpoint 0 is equal to negative 2 which is negative and f at the endpoint 2 is 2 cubed minus 2 is 8 minus 2 equals 6 which is positive so we have a change in sign of the function at the end points and the function is continuous on the closed interval so we can apply bolzano theorem or intermediate value theorem that's equivalent so bolzano theorem implies that the equation f of x equal 0 has at least a solution on the interval open interval 0 2 or in other words we can say also that f has a 0 on that interval okay so the bisection method then calculates the midpoint and from the two sub intervals determined by the midpoint of the interval 0 2 we choose the sub interval where we have again a change of sign at the end points for the function function f because we apply again full sinus theorem and we know the root we are looking for is inside that subinterval so that's the first iteration we're going to do of the method so the first thing we do is to calculate the midpoint of the subinterval or the interval in this case 0 2 let's call that c which is the sum of the endpoints divided by 2 that is 1 so that's a midpoint and f at 1 is 1 cubed minus 2 that is 1 minus 2 that is negative 1 which is negative so let's see let's use some colors here so f is negative at zero and is positive at two and we found that is negative at one so you see the change in sign becomes between these two evaluations that is between one and two so the new interval or let's say we redefine in that iteration we redefine ab the original interval which was zero two we we redefine it to be the new sub interval where we have a change in sign.
04:29
Which is a sub interval which is smaller than the original.
04:34
It's the half of the original because was determined by the midpoint of the original interval.
04:40
So that's it.
04:44
I said here the change in different colors, that means the change in sign.
04:49
So we have one, two.
04:52
Because at one, you see we have red, we had negative and at 2 we have green which is positive good so that's the new interval and for the same reason f being continuous on this closed interval and changing sign at the end points means the root we are looking for is inside this interval which is half the size as the original okay so that's the first iteration so having redefined ab we apply the same method again that is the iteration number two starts by calculating the midpoint of the new interval that is 1 2 and that is c equal the sum of the endpoints 1 plus 2 divided by 2 and that is 3 half or 1 .5 and now we evaluate f at that midpoint three half and that is three half cube minus two and if you do all these calculations carefully you get one fraction that is in decimal is one point three seven five and that's a positive value so positive this mark in green so so you see that we have at 1, we saw here, we have negative, and at 3 half, we have positive.
06:32
So the changing sign now is from 1 to 3 half, because 3 half is greater than 1.
06:41
So we redefine, again, ab, which was in the previous iteration was 1, 2, now is 1, close interval, one three and now we do another iteration that is we start by calculating the midpoint of this new interval one three half okay one three half is equal 1 plus 3 half divided by 2 and that is is 5 fourths.
07:35
And now we evaluate f at that midpoint 5 fourths, which is 5 fourths cubed minus 2.
07:48
And doing the calculations, you get this is negative 0 .046875, which is negative.
08:03
Let's put it in red then.
08:08
And so we're going to have a change in sign between 5 4 and 3 half so we redefine a b as 5 4 5 4 3 half and we stop there but of course if we want to give an approximation to the root after three iterations one thing we can do given that we have redefined a b is to calculate the midpoint of this sub interval which inside which we know the the root lies and that will be the approximation to the root instead of using this midpoint but we have done only the iterations that we because we have been said to perform the iterations that's all we wanted to do in this case and so we go to part two another observation is important to notice here is that because we are solving the equation f of x equals zero in this using this method then we expect that the value of the function at the midpoints at each iteration is going to be a smaller value in absolute value and you see that it's happening f at the first midpoint was negative 1, the second was the f at the next midpoint is 3 half was 1 .37 and f at 5 fourth is negative 0 .04.
10:10
So the absolute value of the image of the midpoints are decreasing and that's what we expect.
10:16
Okay so now we're going to do part two where the function is x minus exponential of negative x square on the closed interval 0 1 and again f is continuous because we are combining algebraically the first we have a composition the exponential function and negative x square negative x square is a polynomial is continuous exponential function is continuous the composition is continuous x is polynomial is continuous so we are subtracting continuous functions the results of continuous function on the real numbers indeed and in particular on the closed interval 0 1.
11:03
So f is continuous on 0 1 and let's see at the end points f at 0 is 0 minus exponential of negative 0 square which is negative e to the 0 is negative 1 it's a negative value and f at 1 is 1 minus exponential of negative 1 square that is 1 minus e to the negative 1 or 1 minus 1 over e and that is e minus 1 over e and this number is is positive since the euler number, the base of the natural logarithm is a number that is greater than 2.
11:51
It's 2 .7.
11:54
And so this number is greater than 2, so this fraction here is positive.
12:00
So we have a change in sign for this function, this continuous function at the endpoint 0, 1 of the closed interval 0, 1.
12:08
So we know by both an ethereum or where intermediate value theorem we know that f of x equals 0 has at least a root on 0 1 indeed in the open interval because at the end points the function is negative and positive there is no root at the end points okay so what we're going to do now is to iterate and in this case we have an accuracy to achieve that's the difference from part one now we're going to iterate by section method but we stop when we have the accuracy of 0 .1 that means that the length of the interval or the sub interval we are we get at the iteration when that interval is its length is length less than 0 .1 we stop there so as you see in the previous sample in part one the intervals are decreasing one half in size from one iteration to the next one and so we know those lengths of those into sub intervals is going to decrease and we are going to achieve at a moment some moment we're going to achieve that accuracy so what we do is to calculate in this case additionally the lengths of the sub intervals to compare with 0 .1 so the iteration number one is calculate the midpoint of interval 0 1 that is c equals 0 plus 1 over 2 that is 1 half and f at that midpoint is 1 half minus exponential of negative 1 half square and here we use a calculator to find the approximate value of that and you can see this is about negative 0 .2788 which is negative so we're going to use colors again so we had negative at the endpoint 0 and we have positive at 1.
14:54
And now we got negative at the midpoint 1 half...