An APL approach to differential calculus yields a powerful tool

  • Authors:
  • R. D. Neidinger

  • Affiliations:
  • Department of Mathematics, Davidson College, Davidson, N.C.

  • Venue:
  • APL '89 Conference proceedings on APL as a tool of thought
  • Year:
  • 1989

Quantified Score

Hi-index 0.00

Visualization

Abstract

An APL workspace is developed for the purpose of calculating numerical values of derivatives. The heart of the method, called automatic differentiation, is manipulation of numerical vectors --- an APL way of thinking. The method is not symbolic manipulation as taught in calculus, nor is it approximation as taught in numerical analysis. Automatic differentiation is implemented as a workspace (called GRADIENT) of 14 simple, one-line, numerical vector functions that perform all of the formal differentiation rules. The ideas are introduced for simple first derivatives of single variable functions. We then show that the GRADIENT workspace enables the calculation of all first-order partial derivatives of any typical function in any number of variables. This workspace is used as a tool in the solution of systems of nonlinear equations by Newton's method. Finally, we discuss how APL concepts led to a new approach to higher-order derivatives. This approach enables the calculation of higher-order derivatives for problems that overwhelm commercial symbolic differentiation programs; moreover, the resulting accuracy cannot be obtained by numerical approximation techniques.