Ordinary differential equations: Solving ODEs by an integrating factor
Application: a cascade of first-order chemical reactions
Consider the following sequence of two first-order chemical reactions \[\text{A}\stackrel{k_{1}}{\longrightarrow}\text{B}\stackrel{k_{2}}{\longrightarrow}\text{C}\] The concentrations of the chemicals \(\text{A}\), \(\text{B}\) and \(\text{C}\) we denote shortly as \(a(t)\), \(b(t)\), and \(c(t)\), respectively. We assume first-order reaction with rate constants respectively \(k_{1}\) and \(k_{2}\). The change \(a(t)\) is then determined by the decrease due to the first reaction. The change of \(b(t)\) is determined by the increase due to the first reaction and the decrease due to the second reaction. The change of \(c(t)\) is determined by the increase due to the two reaction. We get the following three equations: \[\begin{aligned} a'(t)&=-k_{1}\,a(t)\\ b'(t)&=k_{1}\,a(t)- k_{2}\,b(t)\\ c'(t)&=k_{2}\,b(t) \end{aligned}\] This can be solved step-by-step. Because \[a'(t)+b'(t)+c'(t)=0\] we know that \(a(t)+b(t)+c(t)\) is constant; the sum of the concentrations of reactants and product is constant. In particular, we know that \[a(t)+b(t)+c(t)=a_0+b_0+c_0\] where \(a_0=a(0)\), \(b_0=b(0)\), and \(c_0=c(0)\) are the initial concentrations. Because of this relationship, it is sufficient to find explicit formulas for \(a(t)\) and \(b(t)\). The first equation is the ODE of exponential decay. Substitution of the solution \(a(t)=a_0e^{-k_{1}t}\) gives an ODE for \(b(t)\) of which we can find the solution: \[\frac{\dd b}{\dd t}=k_{1}a_0e^{-k_{1}t}-k_{2}b(t)\] This differential equation can be solved by using an integrating factor. How this works we have seen in the description of first-order kinetics of an orally administered drug. That was basically the same mathematical model. This model is often used in physics to model the 'mother-daughter model for radioactive decay'. The only difference with the previous example of pharmacokinetics is that there we did not keep track of where the drug was eventually eliminated to. We nevertheless show how to solve this similar problem and will now also discuss the case \(k_1=k_2\).
We first write the ODE for \(b(t)\) in differential form: \[\dd b+k_2b\,\dd t = a_0k_1e^{-k_{1}t}\,\dd t\] We use \(e^{k_2t}\) as an integrating factor and write \[e^{k_2t}\dd b+k_2be^{k_2t}\dd t = a_0k_1e^{-k_{1}t}e^{k_2t}\,\dd t\] Thus: \[\dd\left(e^{k_2t}b\right)= a_0k_1e^{(k_2-k_1)t}\dd t\] Integrating both sides gives \[e^{k_2t}b=a_0k_1\int e^{(k_2-k_1)t}\dd t= \begin{cases} \dfrac{a_0k_1}{k_2-k_1}e^{(k_2-k_1)t}+\gamma&\text{if }k_1\neq k_2\\ \\ a_0k_1t+\gamma &\text{if }k_1= k_2\end{cases}\] for some constant \(\gamma\). From \(b(0)=b_0\) follows: \[\gamma=\begin{cases}b_0-\dfrac{a_0k_1}{k_2-k_1}&\text{if }k_1\neq k_2\\ \\ b_0 &\text{if }k_1= k_2\end{cases}\] The solution \(b(t)\) is as follows: \[b(t)=\begin{cases}\dfrac{a_0k_1}{k_2-k_1}\left(e^{-k_1t}-e^{-k_2t}\right)+b_0e^{-k_2t}&\text{if }k_1\neq k_2\\ \\ (a_0k_1t+b_0)e^{-k_2t} &\text{if }k_1= k_2\end{cases}\]