% function to compute derivative
% for isothermal batch reactor
function dCa = batch(t,Ca,k,Ca0,Cb0)
Cb = Cb0 - (Ca0-Ca);
dCa = - k * Ca * Cb;
