A modification to the regularly used methods for the fitting of nonlinear functions by least squares is presented. The modified method converges in fewer cycles of the iterative solution than the unmodified Newtonmdash;Raphson method, and in certain cases, the modification makes the iteration converge from starting vectors for which the unmodified method diverges. A numerical example is given, where the modification is used with the Newtonmdash;Raphson method to obtain an analytical expression for the Thomasmdash;Fermimdash;Dirac potential function of an atom. The solutions from the modified method are discussed in relation to the results of the unmodified ones for different starting values of the parameters.
展开▼