Trading Dev AcademyFree quant education

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 f(x,y)=x+2y.
  • 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.
f(x,y)=x+2y,∂f∂x=1,∂f∂y=2
Core rule · definition and worked arithmetic

Start with two inputs: change only one

  1. Change only x: f(x+h,y)−f(x,y)=h. Divide by h to get 1.
  2. Change only y: f(x,y+h)−f(x,y)=2h. Divide by h to get 2.
  3. The ratios are constant for every nonzero h, so their limits are 1 and 2.
Work it by hand

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
  1. Start with two inputs: change only one
  2. Partial derivatives: holding the other inputs fixed
  3. Gradients, directional derivatives and Jacobians
  4. Hessians, mixed derivatives and second-order scenarios
  5. Constrained optimisation and multiple integrals

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations