y. If these two variables are independent, so that the domain of f is , then the behavior of f may be understood in terms of its partial derivatives in the x and y directions. However, in some situations, x and y may be dependent. For example, it might happen that f is constrained to a curve . In this case, we are actually interested in the behavior of the composite function . The partial derivative of f with respect to x does not give the true rate of change of f with respect to changing x because changing x necessarily changes y. However, the chain rule for the total derivative takes such dependencies into account. Write . Then, the chain rule says By expressing the total derivative using Jacobian matrices, this becomes: Suppressing the evaluation at for legibility, we may also write this as This gives a straightforward formula for the derivative of in terms of the partial derivatives of and the derivative of . For example, suppose The rate of change of f with respect to x is usually the partial derivative of f with respect to x; in this case, However, if y depends on x, the partial derivative does not give the true rate of change of f as x changes because the partial derivative assumes that y is fixed. Suppose we are constrained to the line Then and the total derivative of f with respect to x is which we see is not equal to the partial derivative . Instead of immediately substituting for y in terms of x, however, we can also use the chain rule as above: Example: Differentiation with indirect dependencies While one can often perform substitutions to eliminate indirect dependencies, the chain rule provides for a more efficient and general technique. Suppose is a function of time and variables which themselves depend on time. Then, the time derivative of is The chain rule expresses this derivative in terms of the partial derivatives of and the time derivatives of the functions : This expression is often used in physics for a gauge transformation of the Lagrangian, as two Lagrangians that differ only by the total time derivative of a function of time and the generalized coordinates lead to the same equations of motion. An interesting example concerns the resolution of causality concerning the Wheeler–Feynman time-symmetric theory. The operator in brackets (in the