I am trying to put some rigour to my understanding of the Chain Rule (with Leibniz Notation). I came across this question and the second answer there (David K's) states,
$\frac{dz}{dx} = a + 1 + x\frac{da}{dx}$, as you surmised, though you could also have gotten that last result by considering $a$ as a function of $x$ and applying the Chain Rule.
I understand how could one evaluate $\frac{dz}{dx}$ using the product rule,
\begin{align*} \frac{dz}{dx} & = \frac{d(xa + x)}{dx} \\ & = \frac{d(xa)}{dx} + \frac{d(x)}{dx} \\ & = \Bigg(\frac{d(x)}{dx}a + x\frac{d(a)}{dx}\Bigg) + 1 && \text{Product Rule}\\ & = a + x\frac{da}{dx} + 1 \end{align*}
Though, I seem to be getting something wrong when using the Chain Rule,
\begin{align*} \frac{dz}{dx} & = \frac{d(xa + x)}{dx} \\ & = \frac{d(xa)}{dx} + \frac{d(x)}{dx} \\ & = \Bigg(\frac{d(xa)}{d(xa)} \times \frac{d(xa)}{d(a)} \times \frac{d(a)}{d(x)} \Bigg) + 1 && \text{Chain Rule} \\ & = \Bigg(1 \times x \times \frac{d(a)}{d(x)} \Bigg) + 1 \\ & = x\frac{d(a)}{d(x)} + 1 \end{align*}
I am missing the $a$ in the chain rule variant. Did I expand the chain rule correctly in terms of the Leibniz notation? What am I missing here?
EDIT: I think my mistake was the assumption that I can differentiate $z = xa + x$ without any form of product rule. With that being said, here is how one could do it with chain rule first and product rule second,
\begin{align*} \frac{dz}{dx} & = \frac{d(xa + x)}{dx} \\ & = \frac{d(xa)}{dx} + \frac{d(x)}{dx} \\ & = \Bigg(\frac{d(xa)}{d(xa)} \times \frac{d(xa)}{d(a)} \times \frac{d(a)}{d(x)} \Bigg) + \frac{d(x)}{dx} && \text{Chain Rule} \\ & = \Bigg(\frac{d(xa)}{d(xa)} \times \Big(\frac{d(x)} {d(a)}a + \frac{d(a)}{d(a)}x\Big) \times \frac{d(a)}{d(x)} \Bigg) + \frac{d(x)}{dx} && \text{Product Rule} \\ & = \Bigg(\frac{d(xa)}{d(xa)} \times \Big(\frac{d(x)} {d(a)}\frac{d(a)}{d(x)}a + \frac{d(a)} {d(a)}\frac{d(a)}{d(x)}x\Big)\Bigg) + \frac{d(x)}{dx} \\ & = \Bigg(1 \times \Big(a + \frac{d(a)}{d(x)}x\Big)\Bigg) + 1 \\ & = a + \frac{da}{dx}x + 1 \end{align*}