scholarly journals Higher Order Automatic Differentiation with Dual Numbers

Author(s):  
László Szirmay-Kalos

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.

2020 ◽  
Vol 34 (04) ◽  
pp. 4527-4534
Author(s):  
Sören Laue ◽  
Matthias Mitterreiter ◽  
Joachim Giesen

Computing derivatives of tensor expressions, also known as tensor calculus, is a fundamental task in machine learning. A key concern is the efficiency of evaluating the expressions and their derivatives that hinges on the representation of these expressions. Recently, an algorithm for computing higher order derivatives of tensor expressions like Jacobians or Hessians has been introduced that is a few orders of magnitude faster than previous state-of-the-art approaches. Unfortunately, the approach is based on Ricci notation and hence cannot be incorporated into automatic differentiation frameworks like TensorFlow, PyTorch, autograd, or JAX that use the simpler Einstein notation. This leaves two options, to either change the underlying tensor representation in these frameworks or to develop a new, provably correct algorithm based on Einstein notation. Obviously, the first option is impractical. Hence, we pursue the second option. Here, we show that using Ricci notation is not necessary for an efficient tensor calculus and develop an equally efficient method for the simpler Einstein notation. It turns out that turning to Einstein notation enables further improvements that lead to even better efficiency.


2015 ◽  
Vol 8 (1) ◽  
Author(s):  
Avraham Cohen ◽  
Moshe Shoham

Hyper-dual numbers (HDNs) are applied in this paper to multibody kinematics. First, the hyper-dual angle that encompasses a body's position, orientation, as well as its velocity, is defined as an element of the hyper-dual transformation matrix. Then, the “automatic differentiation” feature of the dual numbers is used to obtain the second derivative of a body pose. The body's velocity and acceleration are obtained from the elements of the hyper-dual transformation matrix by algebraic manipulations only, with no need for further time derivatives of the body pose. A robot manipulator is presented as an exemplary application of HDNs to multibody kinematics.


2021 ◽  
Vol 12 (12) ◽  
pp. 3232-3239
Author(s):  
Adam S. Abbott ◽  
Boyi Z. Abbott ◽  
Justin M. Turney ◽  
Henry F. Schaefer

2021 ◽  
Vol 2021 (1) ◽  
Author(s):  
Yu Chen ◽  
Guan-Tie Deng ◽  
Zhan-Mei Chen ◽  
Wei-Wei Wang

AbstractIn this paper, we investigate the growth and fixed points of solutions of higher-order linear differential equations in the unit disc. We extend the coefficient conditions to a type of one-constant-control coefficient comparison and obtain the same estimates of iterated order of solutions. We also obtain better estimates by providing a precise value of iterated order of solution instead of a range of that in the case of coefficient characteristic function comparison. Moreover, we utilize iteration to investigate and estimate the fixed points of solutions’ arbitrary-order derivatives with higher-order equations $f^{(k)}+A_{k-1}(z)f^{(k-1)}+{\cdots }+A_{1}(z)f'+A_{0}(z)f=0$ f ( k ) + A k − 1 ( z ) f ( k − 1 ) + ⋯ + A 1 ( z ) f ′ + A 0 ( z ) f = 0 and provide a concise method to judge if the items generated by the iteration do not vanish identically and ensure the iteration proceeds. Our results are an improvement over those by B. Belaïdi, T. B. Cao, G. W. Zhang and A. Chen.


Author(s):  
OLEKSANDR MANZYUK ◽  
BARAK A. PEARLMUTTER ◽  
ALEXEY ANDREYEVICH RADUL ◽  
DAVID R. RUSH ◽  
JEFFREY MARK SISKIND

Abstract Automatic differentiation (AD) is a technique for augmenting computer programs to compute derivatives. The essence of AD in its forward accumulation mode is to attach perturbations to each number, and propagate these through the computation by overloading the arithmetic operators. When derivatives are nested, the distinct derivative calculations, and their associated perturbations, must be distinguished. This is typically accomplished by creating a unique tag for each derivative calculation and tagging the perturbations. We exhibit a subtle bug, present in fielded implementations which support derivatives of higher-order functions, in which perturbations are confused despite the tagging machinery, leading to incorrect results. The essence of the bug is as follows: a unique tag is needed for each derivative calculation, but in existing implementations unique tags are created when taking the derivative of a function at a point. When taking derivatives of higher-order functions, these need not correspond! We exhibit a simple example: a higher-order function f whose derivative at a point x, namely f′(x), is itself a function which calculates a derivative. This situation arises naturally when taking derivatives of curried functions. Two potential solutions are presented, and their deficiencies discussed. One uses eta expansion to delay the creation of fresh tags in order to put them into one-to-one correspondence with derivative calculations. The other wraps outputs of derivative operators with tag substitution machinery. Both solutions seem very difficult to implement without violating the desirable complexity guarantees of forward AD.


2021 ◽  
Vol 3 ◽  
Author(s):  
Philipp Rehner ◽  
Gernot Bauer

The calculation of derivatives is ubiquitous in science and engineering. In thermodynamics, in particular, state properties can be expressed as derivatives of thermodynamic potentials. The manual differentiation of complex models can be tedious and error-prone. In this work, we revisit dual and hyper-dual numbers for the calculation of exact derivatives and show generalizations to higher order derivatives and derivatives with respect to vector quantities. The methods described in this paper are accompanied by an open source Rust implementation with Python bindings. Applications of the generalized (hyper-) dual numbers are given in the context of equation of state modeling and the calculation of critical points.


2021 ◽  
Vol 6 (12) ◽  
pp. 13746-13757
Author(s):  
Pan Gong ◽  
◽  
Hong Yan Xu

<abstract><p>In this article, we study the relationship between solutions and their arbitrary-order derivatives of the higher order non-homogeneous linear differential equation</p> <p><disp-formula> <label/> <tex-math id="FE1"> \begin{document}$ \begin{equation*} f^{(k)}+A_{k-1}(z)f^{(k-1)}+\cdots+A_{1}(z)f'+A_{0}(z)f = F(z) \end{equation*} $\end{document} </tex-math></disp-formula></p> <p>in the unit disc $ \bigtriangleup $ with analytic or meromorphic coefficients of finite $ [p, q] $-order. We obtain some oscillation theorems for $ f^{(j)}(z)-\varphi(z) $, where $ f $ is a solution and $ \varphi(z) $ is a small function.</p></abstract>


2012 ◽  
Vol 10 (6) ◽  
Author(s):  
Małgorzata Klimek ◽  
Marek Błasik

AbstractTwo-term semi-linear and two-term nonlinear fractional differential equations (FDEs) with sequential Caputo derivatives are considered. A unique continuous solution is derived using the equivalent norms/metrics method and the Banach theorem on a fixed point. Both, the unique general solution connected to the stationary function of the highest order derivative and the unique particular solution generated by the initial value problem, are explicitly constructed and proven to exist in an arbitrary interval, provided the nonlinear terms fulfil the corresponding Lipschitz condition. The existence-uniqueness results are given for an arbitrary order of the FDE and an arbitrary partition of orders between the components of sequential derivatives.


2017 ◽  
Vol 21 (6) ◽  
pp. 1820-1842
Author(s):  
Wu Zhen ◽  
Ma Rui ◽  
Chen Wanji

This paper will try to overcome two difficulties encountered by the C0 three-node triangular element based on the displacement-based higher-order models. They are (i) transverse shear stresses computed from constitutive equations vanish at the clamped edges, and (ii) it is difficult to accurately produce the transverse shear stresses even using the integration of the three-dimensional equilibrium equation. Invalidation of the equilibrium equation approach ought to attribute to the higher-order derivations of displacement parameters involved in transverse shear stress components after integrating three-dimensional equilibrium equation. Thus, the higher-order derivatives of displacement parameters will be taken out from transverse shear stress field by using the three-field Hu–Washizu variational principle before the finite element procedure is implemented. Therefore, such method is named as the preprocessing method for transverse shear stresses in present work. Because the higher-order derivatives of displacement parameters have been eliminated, a C0 three-node triangular element based on the higher-order zig-zag theory can be presented by using the linear interpolation function. Performance of the proposed element is numerically evaluated by analyzing multilayered sandwich plates with different loading conditions, lamination sequences, material constants and boundary conditions, and it can be found that the present model works well in the finite element framework.


Sign in / Sign up

Export Citation Format

Share Document