D02 Chapter Contents
D02 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentD02AGF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

D02AGF solves a two-point boundary value problem for a system of ordinary differential equations, using initial value techniques and Newton iteration; it generalizes D02HAF to include the case where parameters other than boundary values are to be determined.

## 2  Specification

 SUBROUTINE D02AGF ( H, E, PARERR, PARAM, C, N, N1, M1, AUX, BCAUX, RAAUX, PRSOL, MAT, COPY, WSPACE, WSPAC1, WSPAC2, IFAIL)
 INTEGER N, N1, M1, IFAIL REAL (KIND=nag_wp) H, E(N), PARERR(N1), PARAM(N1), C(M1,N), MAT(N1,N1), COPY(1,1), WSPACE(N,9), WSPAC1(N), WSPAC2(N) EXTERNAL AUX, BCAUX, RAAUX, PRSOL

## 3  Description

D02AGF solves a two-point boundary value problem by determining the unknown parameters p1,p2,,pn1 of the problem. These parameters may be, but need not be, boundary values (as they are in D02HAF); they may include eigenvalue parameters in the coefficients of the differential equations, length of the range of integration, etc. The notation and methods used are similar to those of D02HAF and you are advised to study this first. (There the parameters p1,p2,,pn1 correspond to the unknown boundary conditions.) It is assumed that we have a system of n first-order ordinary differential equations of the form
 dyi dx =fix,y1,y2,…,yn,  i=1,2,…,n,
and that derivatives fi are evaluated by AUX. The system, including the boundary conditions given by BCAUX, and the range of integration and matching point, r, given by RAAUX, involves the n1 unknown parameters p1,p2,,pn1 which are to be determined, and for which initial estimates must be supplied. The number of unknown parameters n1 must not exceed the number of equations n. If n1<n, we assume that n-n1 equations of the system are not involved in the matching process. These are usually referred to as ‘driving equations’; they are independent of the parameters and of the solutions of the other n1 equations. In numbering the equations for AUX, the driving equations must be put last.
The estimated values of the parameters are corrected by a form of Newton iteration. The Newton correction on each iteration is calculated using a matrix whose i,jth element depends on the derivative of the ith component of the solution, yi, with respect to the jth parameter, pj. This matrix is calculated by a simple numerical differentiation technique which requires n1 evaluations of the differential system.