(*  CR418 9/13/94  Analytical Solutions to Coupled ODEs  *)

(* Use the DSolve function to obtain an analytical solution *)
(* to a simple system:  A -> B -> C                         *)

Clear[ka, kb, cao, tfinal]

sol = DSolve[{

				ca'[t] == - ka ca[t],			  (*  ODEs to solve  *)
				cb'[t] ==   ka ca[t] - kb cb[t],
				
				ca[0] == cao, cb[0] == 0},		  (*  Symbolic initial conditions  *)
				
				{ca[t], cb[t]},					  (*  Defines equations to solve  *)
				
				t]

sol1 = Simplify[sol]

sol2 = sol1 /. ka - kb -> m

ka = {1,2,4}; kb = 0.2; cao = 1; tfinal =2;   	   (*  Evaluate a range of ka's  *)

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

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

Do [g[i] = Plot[conca[[1]][[i]], {t,0,tfinal}] , {i,1,3}]

Do [p[i] = Plot[concb[[1]][[i]],
		 {t,0,tfinal}],  {i,1,3}]

Show[g[1], g[2], g[3], p[1], p[2], p[3]]