function ode02_demo
%
  [t, x] = ode45(@test, [0 2*pi], 3);

  plot(t, x, '+-', 'linewidth', 2)
  title('The solution to x'' = cos(t)/(2x-2), with x(0) = 3.')
  xlabel('t')
  ylabel('x')
  grid
end

function xpr = test(t, x)
  xpr = cos(t) / (2 * (x - 1));
end


% syms x(t) t
% eqn = diff(x,t) == cos(t)/(2*(x-1))
% dsolve(eqn)
% dsolve(eqn, x(0) == 3)
