function [y1,m1,T,y0] = prob4_2(t,y,jaco)
%
% [alpha,m1,T,y0] = prob4_2
%
% or
%            f = prob4_2(t,y)
%
% or
%           f' = prob4_2(t,y,1)
%
%
% Problem 4, case 2, in:
%
%  L.Brugnano, G.Gurioli, F.Iavernaro, M.Vikerpuur. 
%  A Multi-Order Extension of Fractional HBVMs (FHBVMs)
%  J. Sci. Comput. 107 (2026) 94. https://doi.org/10.1007/s10915-026-03315-7
%
% 
alfa1   = 0.7;
alfa2   = 0.7+1e-4;
A       = 1;
B       = 3;
y0      = [1.2 2.8];
if nargin==0    % problem data
    y1    = [alfa1 alfa2];
    m1    = 1;
    T     = 100;
elseif nargin==1  
    y1    = [];
elseif nargin==2 % vector field
    if length(t)>1
       y1 = [A-(B+1)*y(:,1)+y(:,1).^2.*y(:,2) B*y(:,1)-y(:,1).^2.*y(:,2)];
    else
       y1 = [A-(B+1)*y(1)+y(1)^2*y(2); B*y(1)-y(1)^2*y(2)];
    end        
else             % Jacobian
    y1   = [-(B+1)+2*y(1)*y(2) y(1)^2; B-2*y(1)*y(2) -y(1)^2];
end
return


           