Consider a differentiable function $$f$$ of two variables $$z=f(x,y)$$. If $$x$$ changes to $$x+\Delta x$$ and $$y$$ changes to $$y+\Delta y$$, the increment of $$f$$, $$\Delta f$$, from Definition 3.10.1 , can be written as:
\begin{align}
\Delta f= f(x+&\Delta x,y+\Delta y)-f(x,y)\\
& =f_x(x,y)\Delta x+f_y(x,y)\Delta y+\sqrt{(\Delta x)^2+(\Delta y)^2}\cdot \varepsilon(\Delta x,\Delta y).\tag{i}
\end{align}

We take the linear part of $$\Delta f$$ and call them the differential of $$f$$. The differential part of $$f$$ is denoted by $$df$$ or $$dz$$:
\begin{aligned} \label{Eq:df0} dz=df=\frac{\partial f}{\partial x}\Delta x+\frac{\partial f}{\partial y}\Delta y=f_x(x,y)\Delta x+f_y(x,y)\Delta y.\end{aligned}
Note that $$df$$ is a function of four variables: $$x, y,\Delta x$$, and $$\Delta y$$. To emphasize on that, we may write it as $$df(x,y,\Delta x,\Delta y)$$.

If $$x$$ and $$y$$ are independent variables, from Eq. 3.1 we have:
$dx=\underbrace{\frac{\partial x}{\partial x}}_{=1}\Delta x+\underbrace{\frac{\partial x}{\partial y}}_{=0}\Delta y=\Delta x,\quad\text{and}\quad dy=\underbrace{\frac{\partial y}{\partial x}}_{=0}\Delta x+\underbrace{\frac{\partial y}{\partial y}}_{=1}\Delta y=\Delta y.$

Then (3.1) takes the form:
$df=\frac{\partial f}{\partial x} dx+\frac{\partial f}{\partial y} dy=f_x(x,y) dx+f_y(x,y) dy.$
The above expression is sometimes called the total differential of $$f(x,y)$$.

Definition 1. If $$z=f(x,y)$$ is a differentiable function at $$(x,y)$$, the total differential of $$f$$ is the function $$df$$ defined by:
$df(x,y,dx,dy)=\frac{\partial f}{\partial x} dx+\frac{\partial f}{\partial y} dy=f_x(x,y)dx+f_y(x,y) dy$

Obviously, we can extend these methods and results to functions of any number of variables. For example, if $$u=f(x,y,z)$$, then $du=df=\frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial y}dy+\frac{\partial f}{\partial z} dz.$

Example 1

The period of vibration, $$T$$ of a mass on a spring is determined by the mass $$m$$ and the stiffness of the spring $$k$$ as: $T=2\pi\sqrt{\frac{m}{k}}.$ Estimate the percentage change in the period of this system if the mass increases by $$5\%$$ and the stiffness by $$3\%$$.

Solution

We can use the total differential of $$T$$ and say $$\frac{\Delta T}{T}\approx \frac{dT}{T}$$:
\begin{aligned} dT&=\frac{\partial T}{\partial m} dm+\frac{\partial T}{\partial k} dk\\ &=2\pi\frac{1}{2\sqrt{m k}} dm-\frac{2\pi}{2} \sqrt{m} k^{-3/2} dk,\quad (\text{because } T=2\pi m^{1/2} k^{-1/2})\end{aligned}
Here $$m$$ and $$k$$ are independent variables, so:
$dm=\Delta m=\frac{5}{100} m,\quad \text{and}\quad dk=\Delta k=\frac{3}{100} k$
If we plug these expressions for $$dm$$ and $$dk$$ in $$dT$$, we obtain:
\begin{aligned} dT=\underbrace{\pi\frac{1}{\sqrt{mk}}\times \frac{5}{100} m}_{\frac{5\pi}{100}\sqrt{\frac{m}{k}}}-\underbrace{\pi \sqrt{m} k^{-3/2} \times \frac{3}{100}k}_{\frac{3\pi}{100}\sqrt{\frac{m}{k}}}=-\frac{2\pi}{100}\sqrt{\frac{m}{k}}=-\frac{1}{100}\times \underbrace{2\pi\sqrt{\frac{m}{k}}}_{T}\end{aligned}
Therefore
$$\Delta T/T\approx dT/T=-1\%$$, that is the period decreases by approximately 1%.

The exact change in the period is:
$\Delta T=2\pi\sqrt{\frac{m+0.05 m}{k+0.03k}}-2\pi\sqrt{\frac{m}{k}}=\left(\sqrt{\frac{1.05}{1.03}}-1\right)\times 2\pi\sqrt{\frac{m}{k}}$

$=\left(\sqrt{\frac{1.05}{1.03}}-1\right)T\approx 0.009662 T.$
That is, the exact change in the period is 0.9662%.