# The chain rule in multi-variable calculus: Generalized

Now we’ll discuss the chain rule for $n$-nested functions. For example, an $n$-nested function would be $g=f_1(f_2(\dots(f_n(t))\dots)$. What would $\frac{\partial g}{\partial t}$ be?

We know that

$g(t+h)-g(t)=\frac{f_1(f_2(\dots(f_n(t+h))\dots)-f_1(f_2(\dots(f_n(t))\dots)}{f_2(\dots(f_n(t+h))\dots)-f_2(\dots(f_n(t))\dots)}.f_2(\dots(f_n(t+h))\dots)-f_2(\dots(f_n(t))\dots)$.

If $f_2$ is continuous, then

$g(t+h)-g(t)=\frac{\partial f_1}{\partial f_2}.f_2(\dots(f_n(t+h))\dots)-f_2(\dots(f_n(t))\dots)+g_1$ such that $\lim_{[f_2(\dots(f_n(t+h))\dots)-f_2(\dots(f_n(t))\dots)]\to 0}g_1=0$, which is equivalent to saying $\lim\limits_{t\to 0}g_1=0$.

In turn

$f_2(\dots(f_n(t+h))\dots)-f_2(\dots(f_n(t))\dots)=\frac{\partial f_2}{\partial f_3}.f_3(\dots(f_n(t+h))\dots)-f_3(\dots(f_n(t))\dots)+g_2$

such that $\lim\limits_{t\to 0}g_2=0$.

Hence, we have

$g(t+h)-g(t)=\frac{\partial f_1}{\partial f_2}.(\frac{\partial f_2}{\partial f_3}.\left[f_3(\dots(f_n(t+h))\dots)-f_3(\dots(f_n(t))\dots)\right]+g_2)+g_1$

Continuing like this, we get the formula

$g(t+h)-g(t)=\frac{\partial f_1}{\partial f_2}.(\frac{\partial f_2}{\partial f_3}.(\dots(\frac{\partial f_n}{\partial t}.t+g_n)+g_{n-1})\dots)+g_2)+g_1$

such that $\lim\limits_{t\to 0}g_i=0$ for all $i\in \{1,2,3,\dots,n\}$.

From the above formula, we get

$\lim\limits_{t\to 0}g(t+h)-g(t)=\frac{\partial f_1}{\partial f_2}.\frac{\partial f_2}{\partial f_3}.\dots\frac{\partial f_n}{\partial t}.t$