This is a dual number expression RPN (reverse Polish notation) calculator for automatic differentiation, modeled on an old-style scientific calculator. Dual numbers are numbers of the form , where , are real and . ( is displayed with and in adjacent boxes. Use the calculator to calculate an arithmetic expression in and reals , , and ). Clicking a value puts the value on top of a pile. Clicking an "op" applies the "op" to the top member(s) of the pile as argument(s), and replaces them on the pile with its value. This is the RPN method of evaluation. The list of buttons clicked will be the reverse Polish notation for the expression. If the result is for a function , its value will be . Thus, is calculated "automatically". Moreover, this will be the result if is any function computable by the calculator. In fact, . It is as if were expanded in a Maclaurin series in , since .
Click "x + e", "x + e", "*" to get .
Click "x + e", "x + e", *, "a", +, "x + e", "*" to get .
Click "x + e", "x^2", "x + e", "1/x", "sin", "*" to get .
Click "x + h e", "cos", "x^2" to get .
Calculating an expression in dual numbers and results in .
For example, to compute the partial derivatives of , click "x + h e", "y + k e", "x^2", "*", "x + h e", "x^2", "y + k e", "x^2", "+", "/". The partial derivatives are the coefficients of and in the second box.
Built-in generic functions and of one variable and and of two variables can be used to derive general differentiation formulas.
For example, compute the formula for the derivative of by clicking "x + e", "f", "x + e", "g", "/" and for by clicking "a", "x + e", "*", "f".
The expression pile contains symbolic expressions and the value pile contains these expressions evaluated at , , , , and . (To get decimal values, set an involved slider to a decimal value.) Click "clear" to start a new calculation. The calculator can also be used to calculate real expressions and their values in , , , , and .