Abstract
Boundary Value Problems can be solved in R using shooting, MIRK and collocation methods and these can be found in the R package bvpSolve. The functions in this R package have an interface which is similar to the interface of the initial value problem solvers in the package deSolve. The default input to the solvers is very simple, requiring specification of only one function that calculates the derivatives while the boundary conditions are represented as simple vectors. However, in order to speed-up the simulations, and to increase the number of problems that can be solved, it is also possible to specify the boundary conditions by means of a function and provide analytic functions for the derivative and boundary gradients. In this chapter we demonstrate how to solve BVPs using a variety of well-known test problems, illustrating a wide range of difficulties in solving BVPs. We show how to use (manual and automatic) continuation, how difficult boundary conditions can be handled, and give many examples of how to convert BVPs to standard form. Some BVPs are much better solved using the finite difference methods as explained in the PDE chapter. We give an example of such a boundary value problem at the end of this chapter.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
The ‘—’ in function bound is the ‘OR’ operator.
References
Ames, W., & Lohner, E. (1981). Nonlinear models of reaction–diffusion in rivers. In R. Vichnevetsky & R. Stepleman (Eds.), Advances in computer methods for partial differential equations (Vol. IV, pp. 217–219). New Brunswick: IMACS.
Ascher, U. M., & Petzold, L. R. (1998). Computer methods for ordinary differential equations and differential-algebraic equations. Philadelphia: SIAM.
Ascher, U. M., Christiansen, J., & Russell, R. D. (1979). COLSYS–a collocation code for boundary value problems. In B. Childs et al. (Ed.), Lecture notes in computer science 76 (pp. 164–185). New York: Springer.
Ascher, U. M., Christiansen, J., & Russell, R. D. (1981). Collocation software for boundary-value ODEs. ACM Transactions on Mathematical Software, 7, 209–222.
Ascher, U. M., Mattheij, R. M. M., & Russell, R. D. (1995). Numerical solution of boundary value problems for ordinary differential equations. Philadelphia: SIAM.
Bader, G., & Ascher, U. M. (1987). A new basis implementation for a mixed order boundary value ODE solver. SIAM Journal on Scientific and Statistical Computing, 8, 483–500.
Cash, J. R. (2007). Algorithms for the solution of two-point boundary value problems (http://www.ma.ic.ac.uk/~jcash/BVPsoftware).
Cash, J. R., & Mazzia, F. (2005). A new mesh selection algorithm, based on conditioning, for two-point boundary value codes. Journal of Computational and Applied Mathematics, 184, 362–381.
Cash, J. R., & Mazzia, F. (2006). Hybrid mesh selection algorithms based on conditioning for two-point boundary value problems. Journal of Numerical Analysis, Industrial and Applied Mathematics, 1(1), 81–90.
Cash, J. R., & Mazzia, F. (2009). Conditioning and hybrid mesh selection algorithms for two-point boundary value problems. Scalable Computing: Practice and Experience, 10(4), 347–361.
Cash, J. R., & Wright, M. H. (1991). A deferred correction method for nonlinear two-point boundary value problems: Implementation and numerical evaluation. SIAM Journal on Scientific and Statistical Computing, 12, 971–989.
Cash, J. R., Moore, G. & Wright, R. W. (1995). An automatic continuation strategy for the solution of singularly perturbed linear two-point boundary value problems. Journal of Computational Physics, 122, 266–279.
Moore, G. (1995). Computation and parameterisation of periodic and connecting orbits. IMA Journal of Numerical Analysis, 15, 245–263.
Seydel, R. (1988). From equilibrium to Chaos. New York: Elsevier.
Shampine, L. F., Gladwell, I., & Thompson, S. (2003). Solving ODEs with MATLAB. Cambridge: Cambridge University Press.
Shampine, L. F., Kierzenka, J., & Reichelt, M. W. (2000). Solving boundary value problems for ordinary differential equations in MATLAB with bvp4c. In Matlab Guide, D.J. Higham and N.J. Higham, pp 163–169, Philadelphia: SIAM.
Soetaert, K. (2011). rootSolve: Nonlinear root finding, equilibrium and steady-state analysis of ordinary differential equations. R package version 1.6.2.
Soetaert, K., & Meysman, F. (2012). Reactive transport in aquatic ecosystems: Rapid model prototyping in the open source software R. Environmental Modelling and Software, 32, 49–60.
Soetaert, K., Middelburg, J. J., Heip, C., Meire, P., Van Damme, S., & Maris, T. (2006). Long-term change in dissolved inorganic nutrients in the heterotrophic scheldt estuary (Belgium, the Netherlands). Limnology and Oceanography, 51, 409–423.
Soetaert, K., Cash, J. R., & Mazzia, F. (2011). bvpSolve: Solvers for boundary value problems of ordinary differential equations. R package version 1.2.2.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Soetaert, K., Cash, J., Mazzia, F. (2012). Solving Boundary Value Problems in R. In: Solving Differential Equations in R. Use R!. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-28070-2_11
Download citation
DOI: https://doi.org/10.1007/978-3-642-28070-2_11
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-28069-6
Online ISBN: 978-3-642-28070-2
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)