© Gary D. Knott 2017

Gary D. Knott, Interpreting LISP, 10.1007/978-1-4842-2707-7_25

25. Symbolic Differentiation

Gary D. Knott

(1)Civilized Software Inc., Silver Spring, Maryland, USA

The rules for differentiation are explicitly recursive, so it is easy to use LISP to compute the symbolic derivative of a real-valued function of real-number arguments. The biggest difficulty is the problem of input and output notation. If we agree to accept the LISP prefix notation for algebraic expressions, so that we enter 1 + sin(x + y)/x as (PLUS 1 (QUOTIENT (APPLY SIN ((PLUS x y ))) x )) for example, then the task of differentiation is truly simple. But if we instead demand that the input and output be in traditional infix form, the job becomes more complicated. ...

Get Interpreting LISP: Programming and Data Structures, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.