Back-and-forth shooting method for solving two-point boundary-value problems