# What numerical method does Matlab's bvp4c use?

Can anyone shed some light on how matlab's bvp4c function works? I've looked online but I haven't found any specifics on the method it uses.

With that question asked, what are some different ways on solving bvp problems. I am aware of the shooting method, but for my problem I know exactly what my initial and end conditions are, I'm more interested in what happens in between. And unless I understand the method wrong, the goal is to figure out what your initial conditions are with the shooting method.

For my particular problem "4th order, non-linear, variable coefficient, homogeneous ODE. And by 4th order, I'm referring to the highest derivative" I'm having trouble figuring out a way to solve this problem.

Any help useful information would be greatly appreciated.

• What do you mean "how it works"? How to use it and interpret the results you get or how to try to code your own method giving similar results? For the use of the python equivalent with a 4th order ODE see math.stackexchange.com/q/2971225/115115 – LutzL Jan 2 at 21:36
• What numerical method does it use. – tenichols Jan 2 at 21:40
• Directly from the documentation page: Algorithms -- bvp4c is a finite difference code that implements the three-stage Lobatto IIIa formula. This is a collocation formula and the collocation polynomial provides a $C^1$-continuous solution that is fourth-order accurate uniformly in $[a,b]$. Mesh selection and error control are based on the residual of the continuous solution. – LutzL Jan 2 at 21:52
• What is a "non-linear ... homogeneous ODE"? Do you mean that it has a zero solution, or that there is a certain scaling invariance or ...? – LutzL Jan 2 at 21:55

## 1 Answer

You ask how the algorithm works, see here, especially

bvp4c is a finite difference code that implements the three-stage Lobatto IIIa formula. This is a collocation formula and the collocation polynomial provides a C1-continuous solution that is fourth-order accurate uniformly in [a,b]. Mesh selection and error control are based on the residual of the continuous solution.

You also say that you don't want to use the shooting method since this is for 'finding the initial conditions'. This is partially correct, but misses the point. The approach is to have parameterized initial conditions at $$a$$, in addition to the boundary conditions there, use a standard ODE solver to solve across the domain, and then use root finding to find the appropriate parameter values to enforce the boundary conditions at $$b$$. These can then be used to find the solution across the domain. The result of this is that a solver for IVPs can be turned into a solver for BVPs by combining with a root finder. This isn't necessary the most efficient or accurate way to solve the problem, but all the components are well understood.