CHAPTER 03.04: NEWTON-RAPHSON METHOD: Advantages & Drawbacks for Newton-Raphson Method: Part 1 of 2
In this segment, we will talk about the advantages and drawbacks of Newton-Raphson method. Newton-Raphson method is a method used to solve nonlinear equations, and some of the advantages of Newton-Raphson method, as we have seen from examples, is that it converges fast, but, of course, only if it converges, and the convergence is quadratic for Newton-Raphson method.
And also, one of the good things about Newton-Raphson method is it requires only one guess. If you look at bisection method, which isn't an open method, requires two guesses, not only just two guesses, but also which have to bracket the root, then we have secant method, which requires you to have two guesses, but again, in that case, you don't necessarily have to bracket the root. So those are the two main advantages of Newton-Raphson method, that it converges fast if it converges, and then it requires only one guess. So, if it converges is something which is the topic to talk about when we talk about drawbacks of Newton-Raphson method. So let's look at some of the drawbacks which Newton-Raphson method has, and the reason why we talk about drawbacks in Newton-Raphson method is because that gives you an opportunity of figuring out how to avoid some of the pitfalls or drawbacks of Newton-Raphson method, so as to use it usefully. Let's look at the first one.
The first drawback of Newton-Raphson method is division by 0. And we're going to take a pragmatic example to show you that how division by 0 can creep up if we are solving a real life problem also, it's not just because we have . . . it happens because . . . by coincidence, that's not the case. Here we have the problem of a ball which is floating in water, and what we want to do is we want to find out how much is the distance to which the ball has submerged under water. So, in order to be able to do that, let's suppose we take two parameters here, that the diameter of the ball is 0.11, so this diameter of the ball is 0.11 meters, and the specific gravity of the ball is given as 0.6. If you use Archimedes principle that the buoyancy force is balanced by the weight of the ball, this is what you're going to get as the resulting equation, you're going to get a cubic equation which you will need to solve to be able to figure out what is the depth to which that ball has . . . is submerged under water. Now, we can very well see that if we were going to use some . . . any kind of numerical method to solve the . . . solve this nonlinear equation, we can very well see that x is between 0 and 0.11, that is the . . . that's the domain in which we should be looking for x if we are looking for the root of this particular equation. You can see that, hey, we have a cubic equation right here, and that cubic equation is going to have three roots, and those three roots might be all real, or you might have one real root and two complex roots, so, in case, if it turns out to be three real roots, we do know that, hey, x has to be between 0 and 0.11, and if we were talking about some initial guesses and things like that, it looks like 0 would be a good initial guess to use, or 0.11 would be a good initial guess to use, because those are the two extremes of the value of x.
Let's go ahead and see that how does that translate into the pitfall of division by 0. Now here is the equation which we are writing for the floating ball problem, the derivative of this function here is given by this case here, and if we use Newton-Raphson method, this is what turns out to be the Newton-Raphson method for solving this nonlinear equation for the floating ball problem. You're already finding out that if I choose my initial guess to be 0 . . . if I choose my initial guess to be 0, what's going to happen is that I'm going to get division by 0 there, although 0 looks like to be a good guess to use, because we know that the value of x is somewhere between 0 and 0.11. So that's what we are getting as a pitfall right there, that we start with 0 as an initial guess, and we get division by 0. Now if I were to graph that cubic, the function on the left-hand side of that equation, of that cubic equation, this is what I get, and you can very well see that why do we get division by 0 issues. This point here is . . . right here, this point is 0, that's x equal to 0, and in fact this point here is 0.11, so there are two places where the slope of the function is 0, you're getting two, and where the slope of the function is 0, that you are finding out that the slope is parallel to the x-axis, and you are going to get division by 0 in Newton-Raphson method, because the slope of the function is in the denominator of the Newton-Raphson method formula. So here we have a pragmatic . . . pragmatic problem where 0 and 0.11 would have seemed to be good initial guesses to use, because those are the two extremes in which x can vary between 0 and 0.11, and it turns out that both of those guesses are bad guesses to use for Newton-Raphson method, or we get simply division by 0 for that problem.
Now, let's look at the second drawback of Newton-Raphson method, is that root jumping might take place. This is a very simple function of sine x equal to 0, and we already know that the roots of sine of x are 0, let's suppose, they are pi, 2 pi, 3 pi, and so on and so forth, so we already know that those are roots of the sine of x equal to 0. Now what we mean by root jumping is, let's suppose if I was trying to home on this particular root here, and I choose this as my initial guess, this is 2.4 pi, this becomes my initial guess of 2.4 pi, so if I . . . if I'm drawing a tangent, it so happens that I get here, then I end up here, and I would draw the tangent right there, so I end up right here, and then I go right here, and then I have a tangent here, so what you are finding out is that if I start with 2.4 as my initial guess, I don't end up with the closest root of that particular equation, which in this case would have turned out to be 2 pi or 3 pi, but it turns out to be homing onto the, or zeroing on the root at x equal to 0, so that's what we call a root jumping, that you may start with an initial guess which is close to the root which you are interested in, if you . . . if the nonlinear equation has multiple roots, but you might end up with some other root which you are not interested in. |