Free lesson · Partial derivatives
Start with two inputs: change only one
Open interactive lessonPractice calculationsExplore labs
Start with the idea
- A function can accept two inputs.
- Change one input while keeping the other fixed.
Symbols, units & horizon
- x,y: independent dimensionless inputs
- f(x,y): dimensionless output
- ∂f/∂x: output sensitivity to x with y fixed
- ∂f/∂y: output sensitivity to y with x fixed
- h: nonzero change in the selected input
When and why to use this
Use separate sensitivities when a model has several drivers. This is the building block for gradients and option sensitivities.
- Use .
- At x=1 and y=3, the output is 7.
- Increase x to 2, keeping y=3: output becomes 8.
- Restore x=1; increase y to 4: output becomes 9.
- The symbol marks a derivative with respect to one input.
- Apply ordinary derivative rules to that input. Treat the other input as a constant.
Start with two inputs: change only one
- Change only x: . Divide by h to get 1.
- Change only y: . Divide by h to get 2.
- The ratios are constant for every nonzero h, so their limits are 1 and 2.
At (1,3), f=7. A .1 change in x alone adds .1; a .1 change in y alone adds .2.
Use the rule
- Name the inputs and units.
- Work the small example by hand.
- Check the result before continuing to the next lesson.
Before moving on
Explain the core rule in one sentence, reproduce the worked calculation and solve both practice variations.
Further reading: OpenStax · Partial derivatives · textbook checked 12 September 2026 ↗
Research sources, review dates and limitations
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
def two_input_function(x, y): return x+2*y
def partials(x, y): return 1,2
print(two_input_function(1,3), partials(1,3))Continue learning
Multivariable Calculus & Partial Derivatives — all lessons- Start with two inputs: change only one
- Partial derivatives: holding the other inputs fixed
- Gradients, directional derivatives and Jacobians
- Hessians, mixed derivatives and second-order scenarios
- Constrained optimisation and multiple integrals
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations