function dxdt = vdpol(t,x,a)
%VDPOL Implements the right hand side of the Van der Pol oscillator
% (https://en.wikipedia.org/wiki/Van_der_Pol_oscillator; 
% Hale&Kojak, Dynamics and Bifurcations (1991), Example 11.14, p 346)
%
%   x_1' = x_2
%   x_2' = -x_1 + 2 a x_2 - x_1^2 x_2

if nargin < 3
    a=1;
end

dxdt = [ x(2); -x(1) + 2*a*x(2)-x(1)^2*x(2) ];

end
