Is there a way to derive the chain rule using the definition of the differential of a function? Given a composite function, $ y = (f \circ g)(x) $ that is continuous and differentiable for all $x$, we know from chain rule that 
$$ \frac{dy}{dx} = \frac{d(f \circ g)}{dx} = \frac{df}{dg} \frac{dg}{dx}$$
So is there a way to arrive at the above result using the definition of differentials as follows :
if $y = f(x)$ is a continuous and differentiable function for all $x$ then the differential of the function $$dy = d(f(x)) = f'(x) \Delta x $$ and let another function $ g(x) = x$, then the differential of the function $g(x)$ is $d(g(x)) = d(x) = g'(x)\Delta x = \Delta x$ So $$ dy = f'(x)dx $$
So the question is is there a way to arrive at the chain rule of differentiation based on the definitions given to the differentials of the functions? I dont quite understand why Leibnz notation is still used widely but my guess is that the notation is very suggestive and helps in remembering rules. I also understood that the differential is given the definition above to give precise meaning and reconcile with the way of writing derivatives as $ \frac{df(x)}{dx} = f'(x)$ So i cant help but wonder whether the chain rule is also taken into consideration when the definition is formulated by mathematicians. This question is motivated by the confusion ive had behind the notations for chain rule mentioned above (that most books used in standard calculus texts). The source of the confusion is the ambiguity of the symbol $dg$ in the equation. As far as i gathered from the definition of differentials, 
the two $dg$s are the differentials of two different functions but yet they are both denoted by the same symbol $dg$.
If we look at the functions $f$ and $g$ separately, notice that the differentials for each 
$$df = f'(g) \Delta g$$ but the $\Delta g$ is replaced by the differential of another function $k(g) = g$ where $d(k(g)) = d(g) = \Delta g$, similarly, $d(g(x)) = g'(x)dx$
Shouldnt the chain rule be written like this instead: 
$$  \frac{d(f \circ g)}{dx} = \frac{df}{d(g)} \frac{d(g(x))}{dx}$$
because clearly by the chain rule 
$$\frac{d(f \circ g)}{dx} =f'(g) g'(x)$$ and $$f'(g) = \frac{df}{\Delta g} = \frac{df}{d(k(g))} = \frac{df}{d(g)}$$ and since $$ g'(x) = \frac{d(g(x))}{\Delta x} = \frac{d(g(x))}{dx}$$
Both of the differentials at the denominator of $\frac{df}{dg}$ and numerator of $\frac{dg}{dx}$ both denote the differential of two different functions, one being the differential of a function $k(g) = g$ and another being the differential of the function $g(x)$ itself?? Am i understanding anything wrongly? Is there a reason why most books still write it as 
$$ \frac{dy}{dx} = \frac{d(f \circ g)}{dx} = \frac{df}{dg} \frac{dg}{dx}$$ If there is a way to reconcile all these inconsistencies i wish to know. Thanks in advance.    
 A: You cannot prove the chain rule by mere "letter magic" and clearing fractions. There is a limit process involved.
The following proof tries to implement what you have in mind.
We shall make use of the following principle (which works both ways): When the function $g$ is differentiable at $x_0$ then the "trend function"
$$m_{g,x_0}(x):=\cases{{g(x)-g(x_0)\over \mathstrut x-x_0} \quad&$(x\ne x_0)$ \cr \mathstrut g'(x_0)& $(x=x_0)$\cr}$$
is continuous at $x_0$, and one has
$$g(x)-g(x_0)=m_{g,x_0}(x)\cdot(x-x_0)\qquad\forall x\ .$$
When in addition a function $f$ is given which is differentiable at $g(x_0)$ then one can apply said principle to $f$ as well and write
$$\eqalign{f\bigl(g(x)\bigr)-f\bigl(g(x_0)\bigr)&=
m_{f,g(x_0)}\bigl(g(x)\bigr)\cdot \bigl(g(x)-g(x_0)\bigr)\cr
&=m_{f,g(x_0)}\bigl(g(x)\bigr)\cdot\ m_{g,x_0}(x)\cdot(x-x_0)\ .\cr}$$
Since $g$ is continuous at $x_0$  we can conclude that the first two factors on the right hand side make up a function which is continuous at $x_0$ and assumes the value $f'\bigl(g(x_0)\bigr)\>g'(x_0)$ there. The chain rule follows.
A: Lets say that, in fact, the 2 $dg$s are different and one is a nonzero real multiple of the other. We may have something like this.
$$\frac{df}{dg_2}\cdot\frac{dg_1}{dx}$$
I think we can agree. $df$ is an infinitesimal change in $f$ that is due to an infinitesimal change in $g$. But the way that it is written, it appears that it is due the change $dg_2$. Presumably, the $df$ in the expression $\displaystyle\frac{df}{dg_1}$ is different from the $df$ in $\displaystyle\frac{df}{dg_2}$. So, in addition to splitting apart the $dg$s, I would also like to split apart the $df$s in $df_1$ and $df_2$. Now our equations become
$$\frac{df_2}{dg_2}\cdot\frac{dg_1}{dx}$$
But if $dg_2$ is a multiple of $dg_1$ ($dg_2=kdf_1$), then presumably $df_2$ is that same multiple of $df_1$ ($df_2=kdf_1$). So we have
$$\frac{df_2}{dg_2}\cdot\frac{dg_1}{dx}=\frac{kdf_1}{kdg_1}\cdot\frac{dg_1}{dx}=\frac{df_1}{dg_1}\cdot\frac{dg_1}{dx}$$
Thus eliminating all of my confusion. I am of course assuming that $df$ has a linear relationship with $dg$ with $dx$ because, in the infinitesimal interval, $x, g,$ and $f$ are essentially held constant. 
By the way, Leibniz notation rocks because it lets me do stuff like this...
$$\displaystyle\int x\sin x^2dx$$
$$\displaystyle=\int x\sin x^2dx\cdot\frac{\frac{dx^2}{dx}}{\frac{dx^2}{dx}}$$
$$\displaystyle=\int \frac{x\sin x^2dx}{\frac{dx^2}{dx}}dx\cdot\frac{dx^2}{dx}$$
$$\displaystyle=\int \frac{x\sin x^2}{2x}dx^2$$
$$\displaystyle=\int \frac{1}{2}\sin x^2dx^2$$
$$\displaystyle= -\frac{1}{2}\cos x^2+C$$
