Skip to main content

Solution of BVPs Using bvp4c and bvp5c of MATLAB

  • Chapter
  • First Online:
Boundary Value Problems for Engineers

Abstract

MATLAB provides a platform to solve BVPs which consist of two residual control based, adaptive mesh solvers named as bvp4c and bvp5c .

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 99.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    MATLAB demo program twoode solves given BVP twice, using the guess \( y(x) = 1,y^{\prime } (x) = 0 \) and then \( y(x) = - 1,y^{\prime } (x) = 0 \).

  2. 2.

    The numbers (even their ratios) are likely to change with MATLAB version/operating system/processor model . The numbers were obtained using MATLAB version 2016a, 64 bit, run on a computer with 2.5 GHz Intel CoreTM i5-2430 M processor.

  3. 3.

    Private communication with Dr. Jacek Kierzenka, Mathworks Inc.

  4. 4.

    (Elapsed time) The code was run on a laptop with 2.5 GHz Intel Core i5TM 2430 M single core computer.

  5. 5.

    For more detailed analysis and derivations of these equations, readers may refer to the book by Longuski et al. [24].

  6. 6.

    In 1744, Euler wrote his treatise on variational techniques in which he devoted an entire chapter, “De Curvis Elasticis”, working out a complete characterization of those curves which are solutions to the elastica problem, and these are nowadays known as “elasticae”. Remarkably, the elastica appears as yet another shape of the solution of a fundamental physics problem, the capillary. Laplace investigated the equation for the shape of the capillary in 1807. Since then, the subject has attracted many researchers and it is still an active field of investigation.

    In a broad sense elasticae are curves which are stationary points of the elastic energy functional. The elastic energy of a smooth curve is the integral of its squared curvature.

    The closed-form solutions of the elastica rely heavily on Jacobi elliptic functions [26,27,28.

  7. 7.

    These boundary conditions and used coefficient values differ from those reported in [39].

  8. 8.

    See, [47] for the application of this code using “function” functions, which is somehow seems an accustomed way of writing BVP codes using bvp4c (Incidently, the reader may notice that their equations contain minor mistakes—subscript of y5 is written twice as y3 in the equations -, but it is in correct form within the code).

  9. 9.

    This problem is derived from [48], referred to there as Swirling Flow III (SWF-III).

  10. 10.

    Llewellyn Hilleth Thomas (1903–1992) was a British physicist and applied mathematician.

  11. 11.

    Enrico Fermi (1901–1954) was an American physicist of Italian origin and the creator of the world’s first nuclear reactor .

  12. 12.

    This is an alternative solution of the equation which has been solved earlier in this chapter.

  13. 13.

    Israel Moiseevich Gelfand (1913–2009) was a prominent Russian mathematician.

References

  1. Kierzenka J, Shampine LF (2001) A BVP solver based on residual control and the MATLAB PSE. ACM TOMS 27(3):299–316

    MathSciNet  MATH  Google Scholar 

  2. Gökhan FS (2011). Effect of the Guess function & continuation method on the run time of MATLAB BVP Solvers. In: Ionescu CM (ed) MATLAB. IntechOpen. https://doi.org/10.5772/19444

    Google Scholar 

  3. Hale N, Moore DR (2008) A sixth-order extension to the MATLAB package bvp4c of J. Kierzenka and L. Shampine. Report no 08/04A, Oxford University Computing Laboratory Numerical Analysis Group

    Google Scholar 

  4. Shampine LF, Gladwell I, Thompson S (2003) Solving ODEs with MATLAB. Cambridge University Press, New York

    MATH  Google Scholar 

  5. Hermann M, Saravi M (2016) Nonlinear ordinary differential equations: analytical approximation and numerical methods. Springer, Berlin (ex.4.15)

    MATH  Google Scholar 

  6. Bailey PB, Shampine LF, Wattman PF (1968) Nonlinear two point BVPs. Academic Press, London, pp 7–9

    Google Scholar 

  7. Abramowitz M, Stegun IA (1965) Handbook of mathematical functions. Dover Publications, New York (17.6)

    MATH  Google Scholar 

  8. Ascher UM et al (1995) Numerical solution of boundary value problems for ordinary differential equations. SIAM, Philadelphia

    Google Scholar 

  9. Bratu G (1914) Sur les equation integrals non-lineaires. Bull Math Soc France 42:113–142

    MathSciNet  MATH  Google Scholar 

  10. Romero N (2015) Solving the one dimensional Bratu problem with efficient fourth order iterative methods. SeMA, Sociedad Española de Matemática Aplicada 71:1–14

    MathSciNet  MATH  Google Scholar 

  11. Weibel ES (1959) On the confinement of a plasma by magnetostatic fields. Phys Fluids 2(1):52–56

    Google Scholar 

  12. Gidaspow D, Baker BS (1973) A model for discharge of storage batteries. J Electrochem Soc 120(8):1005–1010

    Google Scholar 

  13. Roberts SM, Shipman JS (1976) On the closed form solution of Troesch’s problem. J Comput Phys 21(3):291–304

    MathSciNet  MATH  Google Scholar 

  14. Chang S-H (2010) Numerical solution of Troesch’s problem by simple shooting method. Appl Math Comput 216(11):3303–3306

    MathSciNet  MATH  Google Scholar 

  15. Vazquez-LH et al (2012) A general solution for Troesch’s problem. Math Prob Eng. article ID 208375. http://dx.doi.org/10.1155/2012/208375

  16. Zarebnia M, Sajjadian M (2012) The sinc–Galerkin method for solving Troesch’s problem. Math Comput Model 56(9–10):218–228

    MathSciNet  MATH  Google Scholar 

  17. Vazquez LH et al (2014) Direct application of Padé approximant for solving nonlinear differential equations. SpringerPlus 3:563. https://doi.org/10.1186/2193-1801-3-563

    Article  Google Scholar 

  18. Saadatmandi A, Niasar TA (2015) Numerical solution of Troesch’s problem using Christov Rational Functions. Comput Methods Differ Equ 3(4):247–257

    MathSciNet  MATH  Google Scholar 

  19. Cengizci S, Eryilmaz A (2015) Successive complementary expansion method for solving Troesch’s problem as a singular perturbation problem. Int J Eng Math. https://doi.org/10.1155/2015/949463

    MATH  Google Scholar 

  20. Fisher RA (1937) The wave of advance of advantageous genes. Ann Eugenics 7:353–369

    MATH  Google Scholar 

  21. Feng Z (2007) Traveling waves to a reaction–diffusion equation. Discrete Contin Dyn Syst Suppl, 382–390

    Google Scholar 

  22. Shampine LF, Gladwell I, Thompson S (2003) Solving ODEs with MATLAB. Cambridge University Press, New York, p 183

    MATH  Google Scholar 

  23. Ascher UM et al (1995) Numerical solution of boundary value problems for ordinary differential equations. SIAM, Philadelphia, p 13

    Google Scholar 

  24. Longuski JM, Guzman JJ, Prussing JE (1984) Optimal control with aerospace applications (Chap. 7.2). Springer, Berlin

    MATH  Google Scholar 

  25. Agrawal GP (2002) Fiber-optic communications systems, 3rd edn. John Wiley & Sons, Inc, London, pp 59–60

    Google Scholar 

  26. Levien R (2008) The elastica: a mathematical history. Tech. Rep. UCB/EECS-2008-103, EECS Department, University of California, Berkeley

    Google Scholar 

  27. Ferone V, Kawohl B, Nıtsch C (2014) The elastica problem under area constraint. Math Annalen 365(3–4)

    MathSciNet  MATH  Google Scholar 

  28. Lawden DF (1989) Elliptic Functions and Applications. Springer-Verlag Applied Mathematical Sciences 80, Berlin

    MATH  Google Scholar 

  29. Choi SUS (1995) Enhancing thermal conductivity of fluids with nanoparticles. In: Siginer DA, Wang HP (eds) Developments and applications of non-Newtonian flows, vol 231/MD 66. ASME, New York, pp 99–105

    Google Scholar 

  30. Ahmad A, Asghar S, Afzal S (2016) Flow of nanofluid past a Riga plate. J Mag Magnet Mater 402:44–48

    Google Scholar 

  31. Sheikholeslami M, Shamlooei M (2017) Fe3O4-H2O nanofluid natural convection in presence of thermal radiation. Int J Hydro Ener 42:5708–5718

    Google Scholar 

  32. Turkyilmazoglu M (2016) Performance of direct absorption solar collector with nanofluid mixture. Energy Conver Manage 114:1–10

    Google Scholar 

  33. Shahmohamadi H, Rashidi MM (2016) VIM solution of squeezing MHD nanofluid flow in a rotating channel with lower stretching porous surface. Adv Powd Tech 27:171–178

    Google Scholar 

  34. Bovand M, Rashidi S, Esfahani JA (2015) Enhancement of heat transfer by nanofluids and orientations of the equilateral triangular obstacle. Energy Conver Manage 97:212–223

    Google Scholar 

  35. Zheng L, Zhang C, Zhang X (2013) Flow and radiation heat transfer of a nanofluid over a stretching sheet with velocity slip and temperature jump in porous medium. J Franklin Inst 350(5):990–1007

    MathSciNet  MATH  Google Scholar 

  36. Pantokratoras A, Magyari E (2009) EMHD free-convection boundary-layer flow from a Riga-plate. J Eng Math 64:303–315

    MATH  Google Scholar 

  37. Kumar CK, Bandari S (2014) Melting heat transfer in boundary layer stagnation point flow of a nanofluid towards a stretching/shrinking sheet. Canadian J Phys 92:1703–1708

    Google Scholar 

  38. Hayat T, Khan M, Khan MI, Alsaedi A, Ayub M (2017) Electromagneto squeezing rotational flow of Carbon (C)-Water (H2O) kerosene oil nanofluid past a Riga plate: a numerical study. PLoS One. 12(8):e0180976. https://doi.org/10.1371/journal.pone.0180976

    Article  Google Scholar 

  39. Atlas M, Hussain S, Sagheer M (2018) Entropy generation and squeezing flow past a Riga plate with Cattaneo-Christov heat flux. Bull Pol Acad Sci Tech Sci 66(3):291–300

    Google Scholar 

  40. Cole JD (1968) Perturbation methods in applied mathematics. Blaisdell, Waltham, MA, pp 29–38

    MATH  Google Scholar 

  41. Allen S, Cahn JW (1979) A microscopic theory for antiphase boundary motion and its application to antiphase domain coarsening. Acta Metall 27:1084–1095

    Google Scholar 

  42. Kowalczyk M, Liu Y, Wei J (2015) Singly periodic solutions of the Allen-Cahn equation and the Toda lattice. Commun Partial Differ Equ 40(2):329–356

    MathSciNet  MATH  Google Scholar 

  43. Huang R, Huang R, Ji S, Yin J (2015) Advances in difference equations. Springer Open J 2015:295. https://doi.org/10.1186/s13662-015-0631-3

    Article  Google Scholar 

  44. Driscoll TB (2009) Learning MATLAB (Chap. 7.8). SIAM, Philadelphia, PA

    Google Scholar 

  45. Roberts SM, Shipman JS (1967) Continuation in shooting methods for two-point boundary value problems. J Math Anal Appl 18:45–58

    MathSciNet  MATH  Google Scholar 

  46. Holt JF (1964) Numerical solution of nonlinear two-point boundary problems by finite difference methods. Comm ACM 7(6):366–373

    MathSciNet  MATH  Google Scholar 

  47. Shampine LF, Gladwell I, Thompson S (2003) Solving ODEs with MATLAB. Cambridge University Press, Cambridge, pp 195–198

    MATH  Google Scholar 

  48. Ascher UM, Mattheij RMM, Russell RD, (1995) Numerical Solution of boundary value problems for ordinary differential equations. SIAM, p 23

    Google Scholar 

  49. Muir PH, Pancer RN, Jackson KR (2000) PMIRKDC: a parallel mono-implicit Runge Kutta-code with defect control for boundary value ODEs. University of Toronto, Toronto, Ontario, Canada M5S 3G4

    Google Scholar 

  50. Keskin AU (2019) Ordinary differential equations for engineers, problems with MATLAB solutions. Springer, Berlin, p 181

    MATH  Google Scholar 

  51. Keskin AU (2019) Ordinary differential equations for engineers, problems with MATLAB solutions. Springer, Berlin, p 180

    MATH  Google Scholar 

  52. Keskin AU (2019) Ordinary differential equations for engineers, problems with MATLAB solutions. Springer, Berlin, p 187

    MATH  Google Scholar 

  53. Jamet P (1970) On the convergence of finite difference approximations to one dimensional singular boundary value problems. Numer Math 14:355–378

    MathSciNet  MATH  Google Scholar 

  54. Gustafsson B (1973) A numerical method for solving singular boundary value problems. Numer Math 21:328–344

    MathSciNet  MATH  Google Scholar 

  55. Cohen AM, Jones DE (1974) A note on the numerical solution of some singular second order differential equations. J Inst Math Appl 13:379–384

    MATH  Google Scholar 

  56. Reddien GW (1975) On the collocation method for singular two point boundary value problems. Numer Math 25:427–432

    MathSciNet  MATH  Google Scholar 

  57. Kadalbajoo MK, Aggarwal VK (2005) Numerical solution of singular boundary value problems via Chebyshev polynomial and B-spline. Appl Math Comput 160:851–863

    MathSciNet  MATH  Google Scholar 

  58. Lundqvist S, March NH (1983) Origins—the thomas–fermi theory. Theory of the inhomogeneous electron gas. Plenum Press, New York, pp 9–12

    Google Scholar 

  59. Fermi E (1928) Eine statistische Methode zur Bestimmung einiger Eigenschaften des Atoms und ihre Anwendung auf die Theorie des periodischen Systems der Elemente. Zeitschrift für Physik A Hadrons and Nuclei 48(1):73–79

    MATH  Google Scholar 

  60. Chawla M, Katti C (1985) A uniform mesh finite difference method for a class of singular two-point boundary value problems. SIAM J Numer Anal 1985:561–565

    MathSciNet  MATH  Google Scholar 

  61. Chawla M, Subramanian R (1988) A new spline method for singular two-point boundary value problems. Int J Comput Math 24:291–310

    MATH  Google Scholar 

  62. Inc M, Ergut M, Cherruault Y (2005) A different approach for solving singular two-point boundary value problems. Kybernetes 34:934–940

    MATH  Google Scholar 

  63. Cen Z (2007) Numerical method for a class of singular non-linear boundary value problems using Greens functions. Int J Comput Math 84:403–410

    MathSciNet  MATH  Google Scholar 

  64. Çağlar H, Çağlar N, Özer M (2009) B-spline solution of non-linear singular boundary value problems arising in physiology. Chaos Solitons Fractals 39:1232–1237

    MATH  Google Scholar 

  65. Yucel U, Sari M (2009) Differential quadrature method (DQM) for a class of singular two-point boundary value problem. Int J Comput Math 86(3):465–475

    MathSciNet  MATH  Google Scholar 

  66. Kanth AR, Aruna K (2010) He’s variational iteration method for treating nonlinear singular boundary value problems. Comput Math Appl 60:821–829

    MathSciNet  MATH  Google Scholar 

  67. Wazwaz A, Rach R (2011) Comparison of the Adomian decomposition method and the variational iteration method for solving the Lane-Emden equations of the first and second kinds. Kybernetes 40:1305–1318

    MathSciNet  Google Scholar 

  68. Ebaid A (2011) A new analytical and numerical treatment for singular two-point boundary value problems via the Adomian decomposition method. J Comput Appl Math 235:1914–1924

    MathSciNet  MATH  Google Scholar 

  69. Singh R, Kumar J, Nelakanti G (2012) New approach for solving a class of doubly singular two-point boundary value problems using Adomian decomposition method. Adv Numer Anal 1–22

    MathSciNet  MATH  Google Scholar 

  70. Danish M, Kumar S, Kumar S (2012) A note on the solution of singular boundary value problems arising in engineering and applied sciences: Use of OHAM. Comput Chem Eng 36:57–67

    Google Scholar 

  71. Singh R, Kumar J (2013) Solving a class of singular two-point boundary value problems using new modified decomposition method. ISRN Comput Math. article ID 262863, 1–11. http://dx.doi.org/10.1155/2013/262863

    MATH  Google Scholar 

  72. Roul P (2016) A new efficient recursive technique for solving singular boundary value problems arising in various physical models. Eur Phys J Plus 131:105

    Google Scholar 

  73. Thula K, Roul P (2018) A high-order b-spline collocation method for solving nonlinear singular boundary value problems arising in engineering and applied science. Mediterr J Math 15:176

    MathSciNet  MATH  Google Scholar 

  74. Niu J, Xu M, Lin Y, Xue Q (2018) Numerical solution of nonlinear singular boundary value problems. J Comput Appl Math 331:42–51

    MathSciNet  MATH  Google Scholar 

  75. Davis ME (1984). Numerical methods and modeling for chemical engineers. John Wiley and Sons, Inc, p 58

    Google Scholar 

  76. Carberry JJ (1976) Chemical and catalytic reaction engineering. McGrawHill, New York

    Google Scholar 

  77. Duggan R, Goodman A (1986) Pointwise bounds for a nonlinear heat conduction model of the human head. Bull Math Biol 48:229–236

    MATH  Google Scholar 

  78. Pandey RK, Singh AK (2009) On the convergence of a fourth-order method for a class of singular boundary value problems. J Comput Appl Math 224:734–742

    MathSciNet  MATH  Google Scholar 

  79. Lin SH (1976) Oxygen diffusion in a spherical cell with nonlinear oxygen uptake kinetics. J Theor Biol 60(2):449–457

    Google Scholar 

  80. Jacobsen J, Schmitt K (2002) The Liouville-Bratu-Gelfand problem for radial operators. J Differential Equations 184:283–298

    MathSciNet  MATH  Google Scholar 

  81. Huang S-Y, Wang S-H (2016) Proof of a conjecture for the one-dimensional perturbed Gelfand problem from combustion theory. Arch Ration Mech Anal 222(2):769–825

    MathSciNet  MATH  Google Scholar 

  82. Hale N, Moore DR (2008) A sixth-order extension to the MATLAB package bvp4c of J. Kierzenka and L. Shampine. Oxford University Computing Laboratory, Report no. 08/04

    Google Scholar 

  83. Cash JR, Singhal A (1982) High order methods for the numerical solution of two-point boundary value problems. Behav Inf Technol 22:184–199

    MathSciNet  MATH  Google Scholar 

  84. Cash JR, Moore DR (2004) High-order interpolants for solutions of two-point boundary value problems using MIRK methods. Comput Math Appl 48(10–11):1749–1763

    MathSciNet  MATH  Google Scholar 

  85. Gokhan FS, Yilmaz G (2010) Numerical solution of Brillouin and Raman fiber amplifiers using bvp6c. COMPEL Int J Comput Math Electr 29(3):824–839

    MATH  Google Scholar 

  86. Hu X, Ning T, Pei L, Chen Q, Li J (2015) A simple error control strategy using MATLAB BVP solvers for Yb3+ -doped fiber lasers. Optik Int J Light Electron Opt. 126(22):3446–3451

    Google Scholar 

  87. Barker B, Nguyen R, Sandstede B, Ventura N, Colin Wahl C (2018) Computing Evans functions numerically via boundary-value problems. Physica D 367:1–10

    MathSciNet  MATH  Google Scholar 

  88. Zhao J (2011) A unified theory for cavity expansion in cohesive-frictional micromorphic media. Int J Solids Struct 48:1370–1381

    MATH  Google Scholar 

  89. Wang J, Steigmann D, Wang F-F, Daid H-H (2018) On a consistent finite-strain plate theory of growth. J Mech Phys Solids 111:184–214

    MathSciNet  Google Scholar 

  90. Lesnic DA (2007) Nonlinear reaction-diffusion process using the adomian decomposition method. Internat Comm Heat Mass Trans 34:129–135

    Google Scholar 

  91. Hemker PW (1977) A Numerical study of stiff two point boundary value problems. Methematisch Centrum, Amsterdam

    MATH  Google Scholar 

  92. Cash JR, Wright MH (1991) A deferred correction method for nonlinear two point boundary value problems: implementation and numerical evaluation. SIAM J Numer Anal 12:971–989

    MathSciNet  MATH  Google Scholar 

  93. Cash JR (1989) A comparison of some global methods for solving two-point boundary value problems. Appl Math Comput 31:449–462

    MathSciNet  MATH  Google Scholar 

  94. Enright WH, Muir PH (1996) Runge-Kutta software with defect control for boundary value ODEs. SIAM J Sci Stat Comput 17:479–497

    MathSciNet  MATH  Google Scholar 

  95. Kanth ASVR (2007) Cubic spline polynomial for nonlinear singular two point boundary value problems. Appl Math Comput 189:2017–2022

    MathSciNet  MATH  Google Scholar 

  96. Chun C, Ebaid A, Lee MY, Aly E (2012) An approach for solving singular two-point boundary value problems: analytical and numerical treatment. ANZIAM J 53(E):E21–E43

    Google Scholar 

  97. Cui M, Geng F (2007) Solving Singular two-point boundary value problem in reproducing kernel space. J Comput Appl Math 205:6–15

    MathSciNet  MATH  Google Scholar 

  98. Ebaid A (2010) Exact solutions for a class of nonlinear two-point boundary value problems: the decomposition method. Z Naturforsh A 65:145–150

    Google Scholar 

  99. El-Sayed SM (2002) Integral Methods for computing solutions of a class of singular two-point boundary value problems. Appl Math Comput 130:235–241

    MathSciNet  MATH  Google Scholar 

  100. Shanthi V, Ramanujam N, Natesan S (2006) Fitted mesh method for singularly perturbed reaction-convection-diffusion problems with boundary and interior layers. J Appl Math Comput 22(1–2):49–65

    MathSciNet  MATH  Google Scholar 

  101. Islam S, Tirmizi IA, Ashraf S (2006) A class of methods based on non-polynomial spline functions for the solution of a special fourth-order boundary-value problems with engineering applications. Appl Math Comput 174:1169–1180

    MathSciNet  MATH  Google Scholar 

  102. Wazwaz AM (2000) Approximate solutions to boundary value problems of higher order by the modified decomposition method. Comput Math Appl 40:679–691

    MathSciNet  MATH  Google Scholar 

  103. Dolezal J, Fidler J (1979) On the numerical solution of implicit two-point boundary value problems. Kybernetice 15(3):221–230

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ali Ümit Keskin .

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Keskin, A.Ü. (2019). Solution of BVPs Using bvp4c and bvp5c of MATLAB. In: Boundary Value Problems for Engineers. Springer, Cham. https://doi.org/10.1007/978-3-030-21080-9_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-21080-9_10

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-21079-3

  • Online ISBN: 978-3-030-21080-9

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics