© 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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.