Lesson 2 of 15
The Derivative Operator
The Derivative Operator
In standard calculus, the derivative is written — an expression that involves a specific variable name. This is ambiguous in complex situations. Is a free variable? Which ?
Sussman and Wisdom replace expression derivatives with functional derivatives. The operator takes a function and returns a new function — its derivative:
This is unambiguous: is a higher-order function (a function that takes and returns functions).
Examples
Numerical Implementation
We approximate using the central difference formula:
With , this is accurate to about 14 significant figures for smooth functions.
Your Task
Implement D(f) that returns the numerical derivative of f as a new function.
Python runtime loading...
Loading...
Click "Run" to execute your code.