function LapidusAikenLiu
% x_1 = y(1), x_2 = y(2), y = y(3)

% first solve problem with default tolerances
[t,y] = ode15s(@odes,[0 8e5],[0; 1; 0]);
plot(t,y(:,1:end))
legend('x_1','x_2', 'y')
pause
% third component is basically invisible; let's take a closer look
figure
semilogx(t,y(:,3))
pause
% this information tells us how to set AbsTol

options = odeset('AbsTol',1e-40,'RelTol',1e-6);
[t,y] = ode15s(@odes,[0 8e5],[0; 1; 0],options);
figure
plot(t,y(:,1:2))
figure
semilogx(t,y(:,3))
%===================================================
function dydt = odes(t,y)
k = [8.4303270e-10 2.9002673e+11 2.4603642e+10 8.7600580e-06];
dydt = zeros(3,1);
dydt(1) = -k(1)*y(1) + k(2)*y(3);
dydt(2) = -k(4)*y(2) + k(3)*y(3);
dydt(3) =  k(1)*y(1) + k(4)*y(2) - (k(2) + k(3))*y(3);
