
Higher Order Automatic Differentiation with Dual Numbers
Author(s) -
László SzirmayKalos
Publication year - 2020
Publication title -
periodica polytechnica. electrical engineering and computer science
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.158
H-Index - 13
eISSN - 2064-5279
pISSN - 2064-5260
DOI - 10.3311/ppee.16341
Subject(s) - automatic differentiation , computation , computer science , dual (grammatical number) , simple (philosophy) , curvature , recursion (computer science) , algorithm , algebraic number , operator (biology) , code (set theory) , animation , path (computing) , algebraic operation , theoretical computer science , algebra over a field , mathematics , programming language , computer graphics (images) , pure mathematics , mathematical analysis , geometry , chemistry , literature , biochemistry , epistemology , transcription factor , set (abstract data type) , gene , art , philosophy , repressor
In engineering applications, we often need the derivatives of functions defined by a program. The approach chosen for derivative computation must be algebraic to allow computer implementation. A particular solution to obtain first derivatives is the application of dual numbers. This paper proposes simple and compact generalizations of this idea to obtain derivatives of arbitrary order for single or multi-variate functions and the automatic handling of 0/0 ambiguities in the calculations. We also provide the C++ code that takes advantage of operator overloading and recursion. The method is demonstrated by path animation, Gaussian curvature computation, and curve fairing.