Skip to main content

Section 10.3 Potential issues

All of the issues of single-variable method in Section 9.2 are present here as well. In particular, the problem with derivative \(f'(x)\) being zero (or close to it) now becomes the problem with the Jacobian matrix \(J\) being singular (not invertible) or close to being such. This is when Matlab displays the warning “Matrix is close to singular or badly scaled. Results may be inaccurate.” Note that despite this warning, the final outcome may be an accurate solution. Indeed, the issue with solving the linear system for \(\mathbf h\) may result in a wrong value of \(\mathbf h\) at some step. But this only means that at that particular step, the algorithm jumps where it should not have. It may still converge to a solution afterwards if at the new value of \(\mathbf x\) the Jacobian matrix behaves better. The script in Example 10.2.3 displays the norm of \(\mathbf F(\mathbf x)\) at the end as a reassurance that the method indeed found a solution, despite the possible problems at intermediate steps.

A new issue is the scaling of variables. When the components of unknown vector have very different orders of magnitude, it is hard to understand what changes are significant or not. Suppose we are solving a system involving the distance and speed of New Horizons probe which is traveling at the speed of about 14 km/s and has distance about \(6.43\times 10^9\) km from the Sun (as of 2020). So the vector we work with will look like [14; 6.43e9]. The difference between this vector and, for example, [20; 6.43e9] looks relatively small: the difference has norm about \(10^{-9}\) times the norm of the original vector, one billionth. But of course the difference between 14 and 20 is quite significant. To avoid this, one should try to use units in which the quantities involved have about the same order of magnitude. For New Horizons, one could measure distance in astronomical units (AU) which makes it about 43. So the vector becomes [14; 43] which is much better numerically.