over an interval subject to () nonlinear boundary conditions at and () nonlinear boundary conditions at , where . Note that is the th derivative of the th solution component. Hence . The left boundary conditions at are defined as
where is the approximate solution for the th solution component. If nag_ode_bvp_coll_nlin_solve (d02tlc) returned successfully with NE_NOERROR, then ermx will be less than where tols contains the error requirements as specified in Sections 3 and 5 in nag_ode_bvp_coll_nlin_setup (d02tvc).
On exit: indicates the mesh sub-interval where the value of ermx has been computed, that is .
If an estimate of the error is not available then iermx is initialized to .
ijermx – Integer *Output
On exit: indicates the component () of the solution for which ermx has been computed, that is the approximation of on is estimated to have the largest error of all components over mesh sub-intervals defined by mesh.
If an estimate of the error is not available then ijermx is initialized to .
rcomm – const doubleCommunication Array
Note: the dimension, , of this array is dictated by the requirements of associated functions that must have been previously called. This array MUST be the same array passed as argument rcomm in the previous call to nag_ode_bvp_coll_nlin_solve (d02tlc).
On exit: contains information about the solution for use on subsequent calls to associated functions.
icomm – const IntegerCommunication Array
Note: the dimension, , of this array is dictated by the requirements of associated functions that must have been previously called. This array MUST be the same array passed as argument icomm in the previous call to nag_ode_bvp_coll_nlin_solve (d02tlc).
If nag_ode_bvp_coll_nlin_diag (d02tzc) returns NE_NOERROR, then examination of the mesh may provide assistance in determining a suitable starting mesh for nag_ode_bvp_coll_nlin_setup (d02tvc) in any subsequent attempts to solve similar problems.
If nag_ode_bvp_coll_nlin_solve (d02tlc) returns NW_MAX_SUBINT, this corresponds to the solver requiring more than mxmesh mesh points to satisfy the error requirements. If mxmesh can be increased and the preceding call to nag_ode_bvp_coll_nlin_solve (d02tlc) was not part, or was the first part, of a continuation process then the values in mesh may provide a suitable mesh with which to initialize a subsequent attempt to solve the same problem. If it is not possible to provide more mesh points then relaxing the error requirements by setting to ermx might lead to a successful solution. It may be necessary to reset the other components of tols. Note that resetting the tolerances can lead to a different sequence of meshes being computed and hence to a different solution being computed.
where is small and positive. The nature of the solution depends markedly on the values of . See Cole (1968).
We choose for which the solution is known to have corner layers at . We choose an initial mesh of seven points and ensure that the points near the corner layers are fixed, that is the corresponding elements of the array
ipmesh are set to . First we compute the solution for using in guess the initial approximation which satisfies the boundary conditions. Then we use simple continuation to compute the solution for . We use the suggested values for nmesh, ipmesh and mesh in the call to nag_ode_bvp_coll_nlin_contin (d02txc) prior to the continuation call, that is only every second point of the preceding mesh is used and the fixed mesh points are retained.
Although the analytic Jacobian for this system is easy to evaluate, for illustration the procedure fjac uses central differences and calls to ffun to compute a numerical approximation to the Jacobian.