What is, how do you use, and why do you use differentials? What are their practical uses?

What is a differential? And how is it useful? What is its practical use?

For example, in Electromagnetic Wave Theory as it pertains to diffraction gratings, we have an equation like this one: $$d_s\sin(\theta) = m\lambda.$$

(Not important, but in case you're curious: $d_s$ is the distance between slits in the grating, $\theta$ is an approximate angle at which light bends through each slit of the grating, $\lambda$ is the wavelength of the light passing through the gradient, and $m$ is the number of wavelengths by which distances traveled by one ray from one slit differ from an adjacent slit.)

My physics book says that the differential of the above mentioned equation is $$d_s \cos(\theta)d\theta = md\lambda$$ (without confusing the single $d_s$ (distance) with the ones in $d\theta$ and $d\lambda$).

What does this mean and how is it useful? I am trying to understand the concept behind the differentials more so than the physics so that I may later make sense of the physics.

EDIT: In user6786's question, user6786 states that "according to the formula $dy=f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential)". I'm trying to see how that works.


EDIT to add: For the correct interpretation of your particular equations in terms of the Physics' content I advice you to ask it in the physics.SE site.


Let $y=f(x)$ be a real function. If $f(x)$ is differentiable for a particular value of $x_0$, then the the expression $$dy=f'(x_0)dx$$ is called the differential of $f$ at $x_0$. In the picture below this equation in $dx,dy$ represents the tangent line to the graph of $f(x)$ at $x_0$ in the translated coordinates system $dx,dy$. Both $dy$ and $dx$ are interpreted as infinitesimals. The differential $dy$ is approximately the change of $y$ when $x$ changes by an arbitrary small quantity $dx$. If $y=kx$, $dy$ is exactly equal to the change of $y=f(x)$.

enter image description here

  • Example: Consider the function $y=x^{2}$. The differential $dy$ at a generic point $x$ is $dy=2xdx$ and the finite difference $\Delta y$ is given by $$\begin{eqnarray*} \Delta y &=&(x+dx)^{2}-x^{2}=2xdx+(dx)^{2} \\&=&dy+(dx)^{2} \\ &\approx &dy,\end{eqnarray*}$$ if we neglect the contribution of $(dx)^{2}$. If we have a square, whose side length $x\approx 10 \;\mathrm{cm}$ was measured with a maximum error of $\pm 0.001 \mathrm{cm}$, its area can be computed approximately by the differential $$\begin{equation*} dy=2xdx=2\cdot 10\cdot 10^{-3}=0.02\;\mathrm{cm}^{2}. \end{equation*}$$ The error in this approximation is of the order of $$(dx)^{2}=\left( 10^{-3}\right) ^{2}=10^{-6} \;\mathrm{cm}^{2}.$$
  • If $f=u(x,y)$ is a function of the real variables $x,y$, then the first order differential form $du$ in two variables evaluated at $x_0,y_0$ is $$du=(\partial u/\partial x)|_{(x_0,y_0 )} \;dx+(\partial u/\partial y )|_{(x_0,y_0 )} \; dy.$$ And similarly for higher dimensions.
  • Differentials appear also in the transformation of integrals. Example: the area differential $dxdy$ becomes $rd\theta dr$, when we make a transformation from Cartesian to polar coordinates, and we have $$\iint \;dxdy=\iint \;r\;d\theta dr.$$ (See this question).

Concerning the equations my interpretation is as follows.

  1. For an arbitrary small change $d\theta $ of the angle $\theta $ there is a corresponding change $d\lambda $ of the wavelength $\lambda $, which means that $\lambda $ has to be a function of $\theta $. Otherwise $d\lambda =0$.

  2. If we differentiate each side of the equation $$\begin{equation*}d_{s}\sin \theta =m\lambda \end{equation*},$$ we get $$\begin{eqnarray*} \frac{d}{d\theta }\left( d_{s}\sin \theta \right) &=&\frac{d}{d\theta } m\lambda \\d_{s}\cos \theta &=&m\frac{d\lambda }{d\theta }, \end{eqnarray*}$$ which can be written in terms of differentials as $$ \begin{equation*}d_{s}\cos \theta \;d\theta =m\;d\lambda.\end{equation*}$$