I've come across a derivation in a journal article where one of the steps is to substitute one expression into another, but I cannot simplify to their solution. The Expressions are:
Expression 1
$$ \frac{d\theta_{t}}{dt} = k_{a}q_{max}X\theta_{t}^2 -(k_{a}C_{0} + k_{a}q_{max}X+k_{d})\theta_{t} +k_{a}C_{0} $$
Expression 2
$$ \theta_{e} = \frac{k_{a} (q_{max}X + C_{0})+k_{d} - \sqrt{\Delta}}{2k_{a}q_{max}X} $$
In the article, it says that Expression 2 is substituted into Expression 1, to obtain Expression 3:
Expression 3
$$ \frac{d\theta_{t}}{dt} = k_{1}(\theta_{e}-\theta_{t})+k_{2}(\theta_{e}-\theta_{t})^2 $$
With the definitions
$$ k_{1}=\sqrt{\Delta} $$ $$ k_{2} = k_{a}q_{max}X $$
Unfortunately the authors omitted the steps in between, so to check I initially simplified Expression 1 and Expression 2 using the definitions:
$$ \frac{d\theta_{t}}{dt} = k_{2}\theta_{t}^2 -(k_{a}C_{0} + k_{2}+k_{d})\theta_{t} +k_{a}C_{0} $$ $$ \theta_{e} = \frac{k_{2}+ k_{a}C_{0}+k_{d} - k_{1}}{2k_{2}} $$
Rearranging the second expression I get:
$$ k_{a}C_{0} =2k_{2}\theta_{e}+k_{1}-k_{2}-k_{d} $$
Which I substituted into the first expression to get
$$ \frac{d\theta_{t}}{dt} = k_{2}\theta_{t}^2 -(2k_{2}\theta_{e}+k_{1})\theta_{t} +2k_{2}\theta_{e}+k_{1}-k_{2}-k_{d} $$
Multiplying out the brackets and completing the square, I get:
$$ \frac{d\theta_{t}}{dt} =k_{2}(\theta_{t}-\theta_{e})^2 - k_{2}\theta_{e}^2 -k_{1}\theta_{t}+2k_{2}\theta_{e}+k_{1}-k_{2}-k_{d} $$
Which is where I become stuck. Is there a mathematical trick other than completing the square that I am missing which will allow me to simplify this expression to obtain Expression 3?
The paper that I have obtained this derivation from is by Lui and Shen, titled "From Langmuir Kinetics to First and Second Order Rate Equations for Adsorption"
Edit
In response to a comment, Delta is defined as:
$$ \Delta=k_{a}^2(C_{0}-q_{max}X)^2+2k_{a}k_{d}(C_{0}+q_{max}X)+k_{d}^2 $$
To reduce visual clutter, I'm making a few definitions: $$\theta:=\theta_t \qquad \theta':=\frac{d\theta_t}{dt} \qquad \phi:=\theta_e \qquad q := q_{max} \qquad a := k_a \qquad d := k_d \qquad p := k_aC_0$$ Together with the provided definitions $$k_1 := \sqrt{\Delta} \qquad k_2:=aqX$$ the equations become $$\begin{align} \theta' &= k_2\theta^2-(p+d+k_2)\theta+p \tag1\\[4pt] 2k_2\phi &= p+d-k_1+k_2 \tag2 \\[4pt] \theta' &= k_1(\phi-\theta)+k_2(\phi-\theta)^2 \tag3 \end{align}$$ As OP has encountered, simple algebraic manipulation won't get from $(1)$ and $(2)$ to $(3)$. It's required to know that $$\begin{align} \Delta &:= a^2(C_0-qX)^2+2ad(C_0+qX)+d^2 \tag{4} \\[4pt] \quad\to\quad k_1^2 &=(p-k_2)^2+2d(p+k_2)+d^2 \tag{5} \end{align}$$ There's probably a clever way to incorporate this relation, but a brute force way is to treat $(1)$ and $(2)$ as linear equations in $p$ and $d$, solve for these values, substitute into $(5)$, and simplify (dividing-through by $4k_2$). When the dust settles, we arrive at the target relation $(3)$.
Note. It's partially clever to rewrite $(5)$ as $$\begin{align} k_1^2 &= -4k_2p+(p+k_2)^2+2d(p+k_2)+d^2 \tag{6}\\[4pt] \quad\to\quad 4k_2p &=(p+d+k_2)^2-k_1^2 \tag{7} \\[4pt] &=(p+d-k_1+k_2)(p+d+k_1+k_2) \tag{8} \\[4pt] \quad\to\quad 2p&=\phi(p+d+k_1+k_2) \tag{9} \end{align}$$ (where we invoke $(2)$ to simplify the right-hand side of $(8)$). If we further define $$m:=p+d+k_2 \tag{10}$$ then we have $$\begin{align} \theta' &= k_2\theta^2-m\theta+p\tag{1'} \\[4pt] 2k_2\phi &= m-k_1 \tag{2'} \\[4pt] 2p &= \phi(m+k_1) \tag{9'} \end{align}$$ Eliminating $m$ and $p$ from the system to arrive at $(3)$ is then relatively straightforward.