# Calculation of Two Types of Quaternion Step Derivatives of Elementary Functions

## Abstract

**:**

## 1. Introduction

## 2. Quaternion $j$-Step Derivative

**Definition**

**1.**

**Example**

**1.**

**Example**

**2.**

**Example**

**3.**

## 3. Quaternion $(j,k)$-Step Derivative

**Definition**

**2.**

**Example**

**4.**

**Example**

**5.**

**Example**

**6.**

## 4. Conclusions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Conflicts of Interest

## References

- Martins, J.R.; Sturdza, P.; Alonso, J.J. The connection between the complex-step derivative approximation and algorithmic differentiation. In Proceedings of the 39th Aerospace Sciences Meeting and Exhibit, Reno, NV, USA, 8–11 January 2001. [Google Scholar]
- Martins, J.R.; Sturdza, P.; Alonso, J.J. The complex-step derivative approximation. ACM Trans. Math. Softw.
**2003**, 29, 142–149. [Google Scholar] [CrossRef] [Green Version] - Agarwal, R.P.; Bohner, M. Basic calculus on time scales and some of its applications. Res. Math.
**1999**, 35, 3–22. [Google Scholar] [CrossRef] - Agarwal, R.; Belmekki, M.; Benchohra, M. A survey on semilinear differential equations and inclusions involving Riemann-Liouville fractional derivative. Adv. Diff. Equ.
**2009**, 2009, 1–47. [Google Scholar] [CrossRef] [Green Version] - Lyness, J.N.; Moler, C.B. Numerical differentiation of analytic functions. SIAM J. Numer. Anal.
**1967**, 4, 202–210. [Google Scholar] [CrossRef] - Lyness, J.N. Numerical algorithms based on the theory of complex variable. In Proceedings of the ACM National Meeting (Washington, D.C.); ACM: New York, NY, USA, 1967; pp. 125–133. [Google Scholar]
- Squire, W.; Trapp, G. Using complex variables to estimate derivatives of real functions. SIAM Rev.
**1998**, 40, 110–112. [Google Scholar] [CrossRef] [Green Version] - Newman, J.C.; Anderson, W.K.; Whitfield, L.D. Multidisciplinary Sensitivity Derivatives Using Complex Variables; Tech. Rep. MSSU-COE-ERC-98-08; Computational Fluid Dynamics Laboratory: Seoul, Korea, 1998. [Google Scholar]
- Newman, J.C., III; WhitZ̆field, D.L.; Anderson, W.K. Step-size independent approach for multidisciplinary sensitivity analysis. J. Aircr.
**2003**, 40, 566–573. [Google Scholar] [CrossRef] - Lai, K.L.; Crassidis, J. Generalizations of the complex-step derivative approximation. In Proceedings of the AIAA Guidance, Navigation, and Control Conference and Exhibit, Keystone, CO, USA, 21–24 August 2006. [Google Scholar]
- Lai, K.L.; Crassidis, J.L. Extensions of the first and second complex-step derivative approximations. J. Comput. Appl. Math.
**2008**, 219, 142–149. [Google Scholar] [CrossRef] [Green Version] - Cossette, C.C.; Walsh, A.; Forbes, J.R. The Complex-Step Derivative Approximation on Matrix Lie Groups. IEEE Robot. Autom. Lett.
**2020**, 5, 906–913. [Google Scholar] [CrossRef] - Kumar, K. Expansion of a function of noncommuting operators. J. Math. Phys.
**1965**, 1965 6, 1923–1927. [Google Scholar] [CrossRef] - Lantoine, G.; Russell, R.P.; Dargent, T. Using multicomplex variables for automatic computation of high-order derivatives. ACM Trans. Math. Softw. (TOMS)
**2012**, 38, 1–21. [Google Scholar] [CrossRef] - Turner, J. Quaternion-based partial derivative and state transition matrix calculations for design optimization. In Proceedings of the 40th Aerospace Sciences Meeting and Exhibit, Reno, NV, USA, 14–17 January 2002. [Google Scholar]
- Kim, J.E.; Lim, S.J.; Shon, K.H. Regularity of functions on the reduced quaternion field in Clifford analysis. Abstr. Appl. Anal.
**2014**, 2014. [Google Scholar] [CrossRef] [Green Version] - Kim, J.E.; Lim, S.J.; Shon, K.H. Taylor series of functions with values in dual quaternion. Pure Appl. Math.
**2013**, 20, 251–258. [Google Scholar] [CrossRef] [Green Version] - Kim, J.E. The corresponding inverse of functions of multidual complex variables in Clifford analysis. J. Nonlinear Sci. Appl.
**2016**, 9, 4520–4528. [Google Scholar] [CrossRef] [Green Version] - Roelfs, M.; Dudal, D.; Huybrechs, D. Quaternionic Step Derivative: Automatic Differentiation of Holomorphic Functions using Complex Quaternions. arXiv
**2020**, arXiv:2010.09543. [Google Scholar] - Brown, J.W.; Churchill, R.V. Complex Variables and Applications, 8th ed.; McGraw-Hill Book Company: New York, NY, USA, 2009; Chapter 3. [Google Scholar]
- Georgiev, S.; Morais, J.; Spröss, W. New aspects on elementary functions in the context of quaternionic analysis. Cubo (Temuco)
**2012**, 14, 93–110. [Google Scholar] [CrossRef]

**Figure 1.**(

**a**) The result obtained by using the Maple plot to see what the step derivative has according to the size of h. (

**b**) In the graph of (

**a**), the result of zooming in about h near zero. In (

**a**,

**b**), the red graph represents the j-step derivative of ${e}^{z}$ at ${z}_{0}$ according to the size of h, and the blue constant graph represents the absolute value of the derivative of ${e}^{z}$ at ${z}_{0}$ by the definition of the derivative for a complex system.

**Figure 2.**(

**a**) The result of expressing the value of the relative error of the quaternion j-step derivative of ${e}^{z}$ at ${z}_{0}$ on the vertical axis according to the size of the horizontal axis h using the Maple plot. (

**b**) In the graph of (

**a**), the result of zooming in about h near $\frac{\pi}{2}$. It confirms to us how close the relative error is to zero.

**Figure 3.**(

**a**) Graph showing the absolute value of the quaternion j-step derivative of $cos\left(z\right)$ at ${z}_{0}$ according to the step size h driven by the Maple program. (

**b**) In the graph of (

**a**), the result of zooming in about h near $\frac{5\pi}{8}$. In (

**a**,

**b**), the red graph represents the j-step derivative of $cosz$ at ${z}_{0}$ according to the size of h, and the blue constant graph represents the absolute value of the derivative of $cosz$ at ${z}_{0}$ by the definition of the derivative for a complex system.

**Figure 4.**(

**a**) The result of expressing the value of the relative error of the quaternion j-step derivative of $cosz$ at ${z}_{0}$ on the vertical axis according to the size of the horizontal axis h using the Maple plot. (

**b**) In the graph of (

**a**), the result of zooming in about h near $\frac{\pi}{2}$. It confirms to us how close the relative error is to zero.

**Figure 5.**(

**a**) The result obtained by using the Maple plot to see what the step derivative has according to the size of h. (

**b**) In the graph of (

**a**), the result of zooming in about h near zero. In (

**a**,

**b**), according to the size of h, the green graph represents the $(j,k)$-step derivative, the red graph represents the j-step derivative of ${e}^{z}$ at ${z}_{0}$, and the blue constant graph represents the absolute value of the derivative of ${e}^{z}$ at ${z}_{0}$ by the definition of the derivative for a complex system.

**Figure 6.**(

**a**) The result of expressing the value of the relative error of the quaternion $(j,k)$-step derivative of ${e}^{z}$ at ${z}_{0}$ on the vertical axis according to the size of the horizontal axis h using the Maple plot. (

**b**) In the graph of (

**a**), the result of zooming in about h near $\frac{3\pi}{8}$. It confirms to us how close the relative error is to zero.

**Figure 7.**(

**a**) The result obtained by using the Maple plot to see what the step derivative has according to the size of h. (

**b**) In the graph of (

**a**), the result of zooming in about h near the midpoints of $\frac{5\pi}{8}$ and $\frac{11\pi}{16}$. In (

**a**,

**b**), the green graph represents the $(j,k)$-step derivative, the red graph represents the j-step derivative of $cosz$ at ${z}_{0}$ according to the size of h, and the blue constant graph represents the absolute value of the derivative of $cosz$ at ${z}_{0}$ by the definition of the derivative for a complex system.

**Figure 8.**(

**a**) The result of expressing the value of the relative error of the quaternion $(j,k)$-step derivative of $cosz$ at ${z}_{0}$ on the vertical axis according to the size of the horizontal axis h using the Maple plot. (

**b**) In the graph of (

**a**), the result of zooming in about h near $\frac{\pi}{2}$. The quaternion $(j,k)$-step derivative of $cosz$ has a relative error approximated to zero for h near $\pm \frac{\pi}{2}$.

**Figure 9.**(

**a**) shows the result of the real part of the step derivatives of $sinz$ at ${z}_{0}$ according to the size of h by using the Maple plot. (

**b**) In the graph of (

**a**), the result of zooming in about h near the midpoints of $\frac{5\pi}{8}$ and $\frac{11\pi}{16}$. In (

**a**,

**b**), the green graph represents the real part of the $(j,k)$-step derivative, the red graph represents the real part of the j-step derivative of $cosz$ at ${z}_{0}$ according to the size of h, and the blue constant graph represents the real part of the derivative of $sinz$ at ${z}_{0}$ by the definition of the derivative for a complex system.

**Figure 10.**(

**a**) shows the result of the imaginary part of the step derivatives of $sinz$ at ${z}_{0}$ according to the size of h by using the Maple plot. (

**b**) In the graph of (

**a**), the result of zooming in about h near $\pi $. In (

**a**,

**b**), the green graph represents the imaginary part of the $(j,k)$-step derivative, the red graph represents the imaginary part of the j-step derivative of $cosz$ at ${z}_{0}$ according to the size of h, and the blue constant graph represents the imaginary part of the derivative of $sinz$ at ${z}_{0}$ by the definition of the derivative for a complex system.

**Figure 11.**(

**a**) The result of expressing the value of the relative error of the quaternion $(j,k)$-step derivative of $sinz$ at ${z}_{0}$ on the vertical axis according to the size of the horizontal axis h using the Maple plot. (

**b**) In the graph of (

**a**), the result of zooming in about h near zero. It confirms that the quaternion $(j,k)$-step derivative of $sinz$ has a relative error approximated to the minimum value for h near zero.

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Kim, J.E.
Calculation of Two Types of Quaternion Step Derivatives of Elementary Functions. *Mathematics* **2021**, *9*, 668.
https://doi.org/10.3390/math9060668

**AMA Style**

Kim JE.
Calculation of Two Types of Quaternion Step Derivatives of Elementary Functions. *Mathematics*. 2021; 9(6):668.
https://doi.org/10.3390/math9060668

**Chicago/Turabian Style**

Kim, Ji Eun.
2021. "Calculation of Two Types of Quaternion Step Derivatives of Elementary Functions" *Mathematics* 9, no. 6: 668.
https://doi.org/10.3390/math9060668