daepy.nonlinear

daepy.nonlinear.fsolve(fun, x0, jac=None, method='nleqres', tol=1e-08, maxiter=100, disp=False)

Solve a nonlinear system where fun is a function that evaluates the nonlinear system, x0 is the initial guess, jac is a function that evaluates the jacobian of the system, method is one of

  • ‘nleqres’ a damped global Newton method 1 (the default)

  • ‘lm’ the Leveberg–Marquardt method 2

  • ‘partial_inverse’ Newton-like method which calculates a partial inverse of the Jacobian by calculating a QR decomposition and doing a partial backwards substitution when the step doesn’t converge

  • ‘steepest_descent’ steepest descent method

tol is required residual tolerance, maxiter is the maximum number of iterations and disp controls whether convergence messages are printed. If jac is None then a finite difference approximation of the jacobian is used.

1
  1. Deuflhard. Systems of Equations: Global Newton Methods. In Newton Methods for Nonlinear Problems, Springer Series in Computational Mathematics, pages 109–172. Springer, Berlin, Heidelberg, 2011.

2
  1. Dennis and R. Schnabel. Numerical Methods for Unconstrained Optimization and Nonlinear Equations. Classics in Applied Mathematics. Society for Industrial and Applied Mathematics, January 1996.

daepy.nonlinear.partial_inverse(fun, x, J)
daepy.nonlinear.nleqres(fun, x, J, a=1, maxiter=100)
daepy.nonlinear.lm(fun, x, J, l=0, maxiter=100)
daepy.nonlinear.steepest_descent(fun, x, J, a=1, maxiter=100)