Again, for the moment, ignoring back reactions, consider the system of
(elementary) transformations:
rate constant
rate constant
. An ``intermediate" B is created and then
consumed during the course of the overall transformation of A into
C. This mechanism leads to the rate equations:
This is a set of three coupled differential equations for the three
functions
and [C](t) . DSolve can handle this.
It is convenient to group the three equations and the three initial
conditions into one lump
 | Clear[a,b,c,t,k1,k2];
equations = {
a'[t] == -k1*a[t],
b'[t] == k1*a[t] - k2*b[t],
c'[t] == k2*b[t],
a[0] == 1.0,
b[0] == 0,
c[0] == 0
};
answer=DSolve[equations, {a[t], b[t], c[t]}, t] |
Again, it is convenient to
get the solution in a format that can be fed directly
into Mathematica for evaluation
 | a[t_]=a[t]/.answer;
b[t_]=b[t]/.answer;
c[t_]=c[t]/.answer; |
Plot the three functions for a few different values of the rate
constants. Try for example:
 | k1=1.0; |
and
 | k2=0.1; |
(note that
must not be equal to
in the solution given
by Mathematica). You can construct a plot with all three
concentrations together on the same plot by typing
 | plABC = Plot[{a[t],b[t],c[t]}, {t,0,50}, PlotRange -> {0,1}] |
Here a plot object is created and stored under the name `plABC'.
The plot can be displayed, printed and manipulated later by referring to
that name. To display the plot, type
 | Show[plABC] |
Q: How does the concentration of the intermediate B depend on
the ratio of the rate constants?
Hannes Jonsson
Modified by Thomas L. Marchioro II
and the Undergraduate Computational Engineering and Science project