How can $z = xa + x$ be differentiated with only chain rule?

83 Views Asked by At

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*}

2

There are 2 best solutions below

4
On BEST ANSWER

The chain rule refers here rather to the function

$$z=z(a,x)$$ $$\Rightarrow \frac{dz}{dx} = \frac{\partial z}{\partial a}\cdot\frac{da}{dx} + \frac{\partial z}{\partial x} \cdot \frac{dx}{dx}$$ $$ = x\frac{da}{dx}+ a +1$$

3
On

There seem to be a lot of misconceptions of the chain rule there, which hopefully someone else can clear up, but I can point out that the term $$\frac{d(ax)}{d(a)}$$

is a problem. It might be meaningless, or you might have cheated your way out of using the product rule by assuming $x$ is not a function of $a$.


Added in reply to comment:

Nope, I did mean "assuming $x$ is not a function of $a$". Which seems a bit nonsensical, which is why I offered the option for what you wrote to be meaningless. Writing $\frac{dA}{dB}$ means we are comparing how $A$ changes in response to a change in $B$. If you're not careful in clarifying which quantities depend on which other quantities you'll end up with just a mess of symbols, which is what I think you've got.

The chain rule says that if $z$ depends on $y$, and $y$ depends on $x$, then $\frac{dz}{dx} = \frac{dz}{dy} \cdot \frac{dy}{dx}$. If you want to use the chain rule for $\frac{dax}{dx}$, identify what plays the role of $y$ and $z$, and check that you have a chain of dependence like that which is required by the chain rule.