Sicp 2.1 2.3 Symbolic Differentiation

May 22, 2018


I plowed through sections 2.1-2.3 of SICP this past weekend, and my solutions are on Github for the exercises. The coolest topic in these sections was symbolic differentiation. In particular, exercise 2.58 covered a program that could compute derivatives of an expression, symbolically. For example, if you gave it an expression like:

3 * x * y + 4 + x + 9 * x * z

and asked it to differentiate with respect to x, it would return:

((3 * y) + (1 + (9 * z)))

Note that it can’t “simplify” some terms further - i.e. in some cases it might return (3 * x) + (4 * x) instead of (7 * x), but that could possibly due to a limitation of my solution.

Anyways, some of my notes on these sections: