clear %% % We compute shooting solutions for several values of lambda. lambda = (6:4:18)'; lval = -1; rval = 0; for k = 1:length(lambda) lam = lambda(k); phi = @(x,u,dudx) lam^2*u + lam^2; [x,u] = shoot(phi, [0,1], lval, [], rval, [], 0); plot(x, u) hold on end xlabel('x') ylabel('u(x)') ylim([-1 0.5]) title('Shooting instability') lstr = {'\lambda=6','\lambda=10','\lambda=14','\lambda=18'}; legend(lstr,'location','northwest') grid on %% % The solutions do not stay negative on the right half of the domain as % $\lambda$ increases.