This Workbook sets up, simulates and graphs the  equations that describe a simple reversible reaction.  It corresponds to the  Ch4.2 of SB2.

Notation:

Flux: v1, v1m.
Kinetic  parameters: k1, k1m 
Equilibrium constants: K1.

BOP April 7, 2007
AB - Last updated: Mar 26, 2010.
NS, checked on March 15, 2011

SetDirectory[NotebookDirectory[]];
<<"GraphicsDirectives.m";

step 1 : define the parmeter values and rate laws

k1=1;km1=2.;K1=k1/km1;
v1=k1*x1[t];
vm1=km1*x2[t];

step 2:  set up the conditions and simulate

tfinal=2;
solution=NDSolve[{x1'[t]==-v1+vm1,x2'[t]==v1-vm1,x1[0]==1.0,x2[0]==0},{x1,x2},{t,0,tfinal}][[1]];

step 3:  graph the results

graph1=Plot[Evaluate[{x1[t],x2[t]}/.solution],{t,0,tfinal},PlotLabel->"Concentrations vs time",Epilog->createLegend[{"x1","x2","x3","x4"}]]
graph2=Plot[Evaluate[{x1[t]-((x2[t])/K1),x1[t]+x2[t]}/.solution],{t,0,tfinal},PlotLabel->"Pool versus time",Epilog->createLegend[{"p1=K1x1-x2","p2=x1+x2"}]]
graph3=ParametricPlot[Evaluate[{x1[t],x2[t]}/.solution],{t,0,tfinal},PlotLabel->"Dynamic Phase portrait",Epilog->ppAnnotate[{x1,x2},solution,tfinal],FrameLabel->{"x1","x2"}]

step 5: Export the graphs

(* Export["Section4.2A.eps",graph1];
Export["Section4.2B.eps",graph2];
Export["Section4.2C.eps",graph3]; *)

Appendix: Pool formation

Clear[K1,k1,km1]
K1=k1/km1;
MatrixForm[stoich=(({{-1, 1}, {1, -1}}))]
MatrixRank[stoich]
leftnull=MatrixForm[NullSpace[Transpose[stoich]]]
MatrixForm[pools=(({{1, -1/K1}, {1, 1}}))]
MatrixForm[pools.stoich]
Null