Solving the kinetic speed equation of a chemical reaction

144 Views Asked by At

DISCLAIMER: This question is divided into two parts, the first is a generalization of the second one, and the majority of the mathematics community in StackExchange will answer it and ignore the second, the problem is inspired from chemistry, but I want to know the underlying logic and mathematical tools exploited to come up with the solution

Problem Number 1: let $P(x)$ be a finite degree polynomial such as $$P(x)=\sum_{i=0}^n{a_ix^i}$$ such as $$\forall a_i \neq0$$ let $x$ be a function of time $t$ such as $$\frac{dx}{dt}=P(x)$$ how can one solve this differential equation in the general form.

Problem Number 2 let $A,B,C,D$ be chemical elements, such as $A$ and $B$ are the reactants and $C$ and $D$ are the products. Let their coefficients be $\alpha,\beta,\gamma,\delta$ such as $$\alpha A+\beta B \rightarrow \gamma C+\delta D$$One can express the quantity of each element as $$n_i(t)=n_i(0)-\alpha x(t)$$ with $x(t)$ denoting how far the experiment went on (sorry I am a native french speaker and I would need some help with the translation). Without much talking we can express the speed of our reaction as $$V=-\frac{1}{\alpha_i} \frac{d[A_i]}{dt}=\frac{1}{b_i} \frac{d[B_i]}{dt}$$ with $\alpha_i$ the stoechiometric cofficient of the $i^{th}$ reactant $A_i$, and $\beta_i$ for the $i^{th}$ product $B_i$. In our particular reaction this can be translated into$$V=-\frac{1}{\alpha}\frac{d[A]}{dt}=-\frac{1}{\beta}\frac{d[B]}{dt}=\frac{1}{\gamma}\frac{d[C]}{dt}=\frac{1}{\delta}\frac{d[D]}{dt}$$ Since $n(A)=n_0(A)-\alpha x$ and $n(B)=n_0(B)-\beta x$ $$\implies\frac{\beta}{\alpha}([A]-[A]_0)+[B]_0=[B]$$With $[A]_0$ the initial concentration of $A$ and $[B]_0$ the initial concentration of $B$ (Volume is assumed to be constant). We assume that our reaction is a second order elementary reaction this means that $$V=[A]^m[B]^n$$ with $m$ and $n$ both deduced experimentally. The Above equation implies obviously that $$\frac{d[A]}{dt}=-\alpha[A]^m(\frac{\beta}{\alpha}[A]-\frac{\beta}{\alpha}[A]_0 + [B]_0)^n$$Which can be written differently as $$\frac{d[A]}{dt}=-\alpha \sum_{i=0}^n{(\frac{\beta}{\alpha})^i[A]^{m+i}([B]_0-\frac{\beta}{\alpha}[A]_0)^{n-i}}$$Which is equivalent to say$$\frac{d[A]}{dt}=\sum_{i=0}^n{\alpha_i [A]^{i+k}}$$ So how could we solve second order reaction equations like this? (Computer Algorithms and heuristical approximations are fully accepted as an answer)

2

There are 2 best solutions below

0
On

As for your first question, any first order nonlinear ordinary differential equation of the form $$\frac{dx}{dt}=P(x)$$ is separable. We can simply write

$$\frac{dx}{P(x)}=dt$$ because we know that $dx = \frac{dx}{dt}dt = P(x) dt .$ Now we may integrate from $t = t_0$ to $t = t_f$ as

$$\int_{x(t_0)}^{x(t_f)}\frac{dx}{P(x)}=\int_{t_0}^{t_f}dt $$

and that is all there is to it.

As for your second question, you may use the same method. If there are many coefficients $\alpha_i $ or if you would simply prefer to use a numerical method, you may run a numerical integration algorithm on

$$ \int_{[A]_0}^{[A]_f} \frac{dA}{\sum_{i=0}^{n} \alpha_i [A]^{i+k} }$$

where $[A_0]$ and $[A_f]$ are the initial and final concentrations of compound $A$ respectively. It would make more sense however to use a finite difference style method like the Euler's Method or RK4 method (just to name a couple). For example, the forward Euler method discretizes a differential equation of the form $x'(t) = f(t,x)$ as

$$\frac{x_{k+1} - x_k}{h} = f(t_k,x_k)$$ for some time step size $h.$ You may then iterate the method as

$$x_{k+1} = x_k + hf(t_k,x_k)$$ where $t_k = t_0 + hk.$

In your case, $f = f(x) = P(x)$ from your first question's formulation so you won't have to provide a $t_0$ and only an $x_0.$ For your second question this you will provide an initial concentration $[A]_0.$

If you need anything else feel free to ask.

1
On

For the first question, let $$P(x)=\sum_{i=0}^n a_i x^i=a_n\prod_{i=1}^n (x-r_i)$$ where the $r_i$'s are the roots (real or complex). Assuming no root multiplicity, using partial freactions $$\frac 1{P(x)}=\frac 1 {a_n}\sum_{i=1}^n \frac {b_i}{x-r_i}$$ Integrating termwise $$t+C=\frac 1 {a_n}\sum_{i=1}^n {b_i}\log(x-r_i)$$ Most of the time, you will not be able to build the inverse $x=f(t)$.