function brute_force
h    = 0.1;
Nmx  = 40;
mu0  = -1;
x0   = linspace(-2, 2, 25);

xs  = [];
mus = [];
for i=2:Nmx
  mu0   = mu0 + h;
  for k=1:numel(x0)
    [t z]  = ode45(@(t,x) func(x,mu0), [0 1], x0(k));         %#ok<ASGLU>
    x(k,1) = z(end);                                          %#ok<AGROW>
  end
  xs    = [xs  x  ];                                          %#ok<AGROW>
  mus   = [mus mu0];                                          %#ok<AGROW>
end

plot(mus, xs)
end

function y = func(x,mu)
y = (mu+x-x^3)*( (x-2)^2 - mu+2 );
end
