Lesson 3 of 15
Partial Derivatives
Partial Derivatives
Functions in differential geometry often take multiple arguments — coordinates on a manifold. The partial derivative differentiates with respect to its -th argument while holding all others fixed.
In functional notation, is itself a higher-order function:
The Lagrangian
The book opens with the Lagrange equations of motion. For a Lagrangian :
Here is the partial derivative of with respect to its second argument (position ), and is the partial with respect to its third argument (velocity ). Index 0 is time.
For the harmonic oscillator :
Your Task
Implement partial(i, f) that returns the partial derivative of f with respect to argument i (0-indexed).
Python runtime loading...
Loading...
Click "Run" to execute your code.