During my wandering in Mathematica.se, I gradually noticed that a certain kind of differential equation solving problem is "troubling" us all the time, that is, the boundary value problem (BVP) of nonlinear ordinary differential equations (ODEs).

The shooting method, which is used by the Mathematica function NDSolve, seems to be the only method that users of Mathematica.SE know about. Sometimes it works well, but in more cases (according to my personal feeling), it's painful to find a proper initial guess.

It's often that case that a proper guess cannot be found. Here is an example that caused me to post this question.

So, is shooting method the only general numerical method for solving BVP of nonlinear ODEs?

If so, is there a good way to get a proper initial guess?

If not, what's the alternative? If possible, please give some introduction or links for existing solvers implementing these alternatives.


2 Answers 2


Is the shooting method the only general numerical method for solving BVP of nonlinear ODE(s)?


Most other methods consist of three parts:

  1. Discretization. This may be done with finite differences, finite volumes, finite elements (Galerkin or collocation), spectral methods, and so forth. This reduces the problem from an infinite-dimensional one to a finite-dimensional system of nonlinear algebraic equations.
  2. A nonlinear solver. Usually this is a Newton-type method, meaning that you linearize the problem locally and compute an update. This reduces the problem to a sequence of linear algebraic systems.
  3. A linear solver.

Unlike shooting, these methods are easily generalized to elliptic problems in higher dimensions. If you read any introductory book on numerical methods, you will find a description of some method of this kind. For an existing solver, see e.g. MATLAB's bvp4c.

These methods still require an initial guess. Good initial guesses are usually based on some insight specific to the problem. I believe there is not a general technique for finding good initial guesses for arbitrary BVPs. You should keep in mind that nonlinear BVPs may have multiple solutions, and which one you obtain will depend on your initial guess.


No it is not. There is also

  • multiple shooting
  • collocation
  • finite differences
  • fixed point iterations

and probably some more.

  • $\begingroup$ Er…do you have any introduction for these method or existed solvers etc. recommended? $\endgroup$
    – xzczd
    Commented Sep 15, 2014 at 10:46
  • $\begingroup$ The standard reference is Ascher, Mattheij & Russell: Numerical Solution of Boundary Value Problems for Ordinary Differential Equations $\endgroup$
    – Jan
    Commented Sep 15, 2014 at 10:53
  • $\begingroup$ A quick google for collocation for bvp gave some hints for solver by the authors mentioned above. Multiple shooting and finite differences are easy to implement but very limited by memory requirements. Fixed point iterations are also quickly implemented but there is no guarantee for convergence. $\endgroup$
    – Jan
    Commented Sep 15, 2014 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.