function shoot
        % Решение краевой задачи
        % dx/dt= y, dy/dt=-x, x(0)=1, x(pi)=-1
    rp= @(t,x) [x(2);-x(1)];
    function g= fire(alpha)
        [t,x]= ode45(rp,[0 pi],[1 alpha])
        g= x(end,1)+1;
    end
    al=fzero(@fire,1)
    [t,x]= ode45(rp,[0 pi],[1 al]);
    plot(t,x(:,1));
end
