Lesson 15 of 15

Van der Pol Oscillator

Van der Pol Oscillator

The Van der Pol oscillator is a nonlinear system that models self-sustaining oscillations:

xμ(1x2)x+x=0x'' - \mu(1 - x^2)x' + x = 0

  • μ=0\mu = 0: reduces to simple harmonic motion
  • μ>0\mu > 0: nonlinear damping

Nonlinear Damping

The term μ(1x2)x-\mu(1 - x^2)x' is the key:

  • When x<1|x| < 1: the factor (1x2)>0(1 - x^2) > 0, so damping is negative — the system adds energy. Small oscillations grow.
  • When x>1|x| > 1: the factor (1x2)<0(1 - x^2) < 0, so damping is positive — the system removes energy. Large oscillations shrink.

This creates a limit cycle: regardless of starting conditions (except at rest), the system settles into a specific periodic orbit with amplitude 2\approx 2.

As a System

Let v=xv = x':

dxdt=v\frac{dx}{dt} = v dvdt=μ(1x2)vx\frac{dv}{dt} = \mu(1 - x^2)v - x

Historical Context

The Van der Pol equation was originally developed to model vacuum tube circuits in early radio transmitters (1920s). It now models:

  • Heartbeat rhythms (cardiac pacemakers)
  • Circadian rhythms in biology
  • Electrical oscillators
  • Seizure dynamics in neuroscience

Your Task

Implement van_der_pol(mu, x0, v0, t_end, n) using forward Euler. Return (x, v).

Pyodide loading...
Loading...
Click "Run" to execute your code.