×

Introduction to automatic differentiation and MATLAB object-oriented programming. (English) Zbl 1196.65048

Summary: An introduction to both automatic differentiation and object-oriented programming can enrich a numerical analysis course that typically incorporates numerical differentiation and basic MATLAB computation. Automatic differentiation consists of exact algorithms on floating-point arguments. This implementation overloads standard elementary operators and functions in MATLAB with a derivative rule in addition to the function value; for example, \(\sin u\) will also compute \((\cos u)\ast u^{\prime}\), where \(u\) and \(u^{\prime }\) are numerical values.
These methods are mostly on-line programs that operate on a class of value-and-derivative objects, providing a simple example of object-oriented programming in MATLAB using the new (as of release 2008a) class definition structure. The resulting powerful tool computes derivative values and multivariable gradients, and is applied to Newton’s method for root-finding in both single and multivariable settings. To compute higher-order derivatives of a single-variable function, another class of series objects keeps Taylor polynomial coefficients up to some order. Overloading multiplication on series objects is a combination (discrete convolution) of coefficients. This idea leads to algorithms for other operations and functions on series objects. A survey of more advanced topics in automatic differentiation includes an introduction to the reverse mode (our implementation is forward mode) and considerations in arbitrary-order multivariable series computation.

MSC:

65D25 Numerical differentiation
68N19 Other programming paradigms (object-oriented, sequential, concurrent, automatic, etc.)
68W30 Symbolic computation and algebraic computation
65Y05 Parallel numerical computation
65H05 Numerical computation of solutions to single equations

Software:

Matlab; MAD; ATOMFT