(*  CR418 HW 2.5  Numerical Solution of ODEs  *)
(*  Use the NDSolve[ ] function to numerically solve the *)
(*  simple system: A --> B --> C                         *)

ka = 2; kb = 0.5; cao = 1;

sol = NDSolve[{

				ca'[t] == -ka ca[t],			(*  ODEs to solve  *)
				cb'[t] ==  ka ca[t] - kb cb[t],
				
				ca[0] == cao, cb[0] == 0},		(*  Initial conditions  *)
				
				{ca[t], cb[t]},					
				
				{t,0,1}]						(*  Limits on independent varialbe  *)

conca = Evaluate[ ca[t] /. sol]

g1 = Plot[conca,{t,0,1}]

concb = Evaluate[cb[t] /. sol]

g2 = Plot[concb, {t,0,1}]

Show[g1, g2]