Trading Dev AcademyFree quant education

Free lesson · Differential equations

Start with a rate rule and an initial value

Open interactive lessonPractice calculationsExplore labs

Start with the idea

  • A differential equation gives a rate of change.
  • An initial value supplies the starting level.
Symbols, units & horizon
  • y(t): amount at time t in units
  • t: elapsed hours
  • c: fixed rate in units/hour
  • y₀: starting amount in units
  • dy/dt: rate of change of y with time

When and why to use this

Use rate equations to model inventory, balances or physical systems over time. Proportional growth and mean reversion build on this example.

  • Read dydt=2 as “y increases by 2 units per hour.”
  • Use y(0)=5 to specify the starting value.
  • After one hour: 7. After two hours: 9.
  • A solution gives the value at every allowed time.
  • Check a solution by differentiating it and checking its starting value.
dydt=c,y(0)=y0⟹y(t)=y0+ct
Core rule · definition and worked arithmetic

Start with a rate rule and an initial value

  1. Constant accumulation over time t is ct.
  2. Add the initial amount: y(t)=y0+ct.
  3. Differentiate: the constant term contributes 0 and ct contributes c.
  4. At t=0 the formula returns y₀, satisfying the initial condition.
Work it by hand

With c=2 and y₀=5, y(3)=5+2×3=11. With the same rate but y₀=8, the answer becomes 14.

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.

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 constant_rate_path(initial, rate, elapsed):
    return initial+rate*elapsed

print(constant_rate_path(5,2,3))

Continue learning

Differential Equations & Numerical Models — all lessons
  1. Start with a rate rule and an initial value
  2. Ordinary differential equations: growth and mean reversion
  3. Euler stepping, convergence and stability
  4. Partial differential equations and the bridge to current research

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