function y=diff(t,u)

V = 1;      %Reaktorvolym(L)
q = 1;      %L/s

u1_in = 1;  %mol/L C6H6
u2_in = 0;  %mol/L O2
u3_in = 0;  %mol/L C4H2O3
u4_in = 0;  %mol/L CO2
u5_in = 0;  %mol/L H2O

% hastighetskonstanter
k11 = 2e-3;
k12 = 1.1248e-175;
k21 = 4e-4;
k22 = 2.2496e-176;
k31 = 6e-4;
k32 = 1.9201e-293;

% Reaktionshastigheter
r11 = k11*u(1)*u(2);
r12 = k12*u(3);
r21 = k21*u(3);
r22 = k22*u(4)*u(5);
r31 = k31*u(1);
r32 = k32*u(4)*u(5);

y=zeros(size(u));

y(1) = r12-r11+r31-r31                     + q*(u1_in-u(1));   %C6H6
y(2) = 0;%9/2*(r12-r11)+3*(r22-r21)+15/2*(r32-r32) + q*(u2_in-u(2));   %O2
y(3) = r11-r12+r22-r21                     + q*(u2_in-u(3));   %C4H2O3
y(4) = 2*(r11-r12)+4*(r21-r22)+4*(r31-r32) + q*(u2_in-u(4));   %CO2
y(5) = 2*(r11-r12)+r21-r22+3*(r31-r32)     + q*(u2_in-u(5));   %H2O
%y(6) = 0;