# Clarify definite integration of differentials in physics problems

I realized there is an issue with integration in physics problems that I had always taken for granted. As an example, the relation between work and potential energy is

$$dW=-dU_p$$

when integrating from an initial (A)to a final(B) configuration, textbooks state directly that the result is

$$W = {U_p}(A)-{U_p}(B)$$

Going into the detail,aren't we definite-integrating both sides of the equation ? From the mathematical point of view (forgetting that work at one point makes no sense), shouldn't the result be the following?

$$\int_A^B dW = -\int_A^B {U_p}$$

$${W}(B)-{W}(A) = {U_p}(A)-{U_p}(B)$$

with the additional issue that I wouldn't know how to evaluate $${W}(B)$$and $${W}(A)$$

Textbooks just put $$W$$ instead of $${W}(B)-{W}(A)$$,arguing that the sum of the small contributions of work yields the total work. It seems as if the left-hand side had been integrated indefinitely and with integration constant=0 and the right-hand, definitely.

The same happens, for instance, with force (and in this case force at a point does make sense, so this illustrates the problem is not only with work-type entities):

In a hydrostatics problem, we want to get the force due to water pressure at a window of a parallelepipedal acquarium

It's found that the force on each horizontal strip is $$dF=PdA=\rho gyldy$$, which is later integrated to yield:

$$\int dF =\int_{y_1=1}^{y_2=2}\rho gyldy$$

$$F= 1/2\rho gl(y_2^2-y_1^2)$$

and again they just argue that the total force is the sum of the small contributions, but I wonder why isn't it
$$\int dF = F(y_2)-F(y_1)$$ , instead of $$\int dF = F$$ on the left-hand side?

How do I make sense of it mathematically, are we actually definite integrating the left-hand side and indefinite-integrating the right hand-side (which kind of seems wrong)? Specifically what is happening at both sides of the equation when integrating?

• I have a curiosity. Why did you chose an answer which is dealing with a situation different from what you presented in your question? In both your examples the differential was exact. Dec 1, 2019 at 11:47
• @GiorgioP The thing is, the differential in the right.hand side of the equation is, but the one in the left-hand side is not. In the first example, as instance, the differential of the energy is exact, , but the differential of Work is not (as you stated yourself in your aswer "...In that fomula W is neither W(B) nor W(A) nor the value of a function W at any value of its argument....), so I guess you agree W is not an exact differential", the question was precisely why this W can't be integrated directly and be evaluated at the limits. Dec 2, 2019 at 18:24
• The answer made me realized that is because it's not an exact differential, as dU is. Don't you agree? Dec 2, 2019 at 18:25
• I do not agree. Math is not inconsistent and from the physical point of view a common misconception is emerging from your comments and ACuriousMind's answer. I think I'll delete my previous answer and I'll adress directly the difficult point. Dec 2, 2019 at 22:30
• who is math saying it is inconsistent?. I just said that according to ACuriousMind's answer when integrating a differential we need to know if it is a function or a functional, at least that is want he says. What is the common misconception? Dec 2, 2019 at 22:47

The notation is misleading - while $$\mathrm{d}U_p$$ really is the differential of a state function $$U_p$$, there is no state function $$W$$ whose differential $$\mathrm{d}W$$ could be. That is, it is an "inexact differential" or inexact 1-form, which you can evaluate along paths but for which no potential function exists. The "$$W$$" we usually write on the l.h.s. of your equation should be thought of as $$W[\gamma]$$, where $$\gamma$$ is the path you're integrating along, i.e. "work" is a functional on paths whose value you get by integrating the inexact differential $$\mathrm{d}W$$. Some people are careful to make the inexactness visible by writing inexact differentials as $$\delta W$$, but there seems to be no consensus on this.

See also this answer by Joshphysics for a formal proof of the fact that the existence of the path functional "work" $$W$$ is equivalent to the existence of a 1-form $$\mathrm{d}W$$. Physically, this still has the meaning of $$\mathrm{d}W$$ being the "infinitesimal version" of $$W$$, but as said, the crucial difference to something like potential energy is that $$W$$ is not a function on spatial points, but a function on the paths, hence the $$\mathrm{d}$$ in $$\mathrm{d}W$$ does not denote ordinary differentiation.

The force from pressure in your second example is the same, just in one dimension higher: The $$P\mathrm{d}A$$ is an inexact 2-form that can be integrated over 2-dimensional objects (=surfaces), and this produces a functional on surfaces that we can call $$F$$ that assigns to any surface that integral.

In general, we note that the viewpoint that unifies both exact and inexact differentials is the notion of differential p-forms that can be integrated over p-dimensional objects. The differentials $$\mathrm{d}U_p, \mathrm{d}W, \mathrm{d}F$$ appearing here are all examples of such forms. The $$\mathrm{d}U_p$$ is special, because it is the (exterior) derivative of a 0-form (a function) $$U_p$$, while the others are no such derivatives. In full generality, if you have a $$p$$-form $$\omega$$ that is the exterior derivative of a $$p-1$$-form, you can use a general version of Stokes' theorem to reduce an integral of $$\omega$$ over a $$p$$-dimensional object to the integral of $$\sigma$$ over the $$p-1$$-dimensional boundary of that object.

Since you're wondering in a comment how to tell whether any given form (or "differential" is a derivative or not: This is answered by Poincaré's lemma: On nice (contractible) regions, it is necessary and sufficient for the (exterior) derivative of a form to vanish in order for it to have a $$p-1$$-form that is its antiderivative.

• what about the case of force?, Force is not a fuctional, is it? Nov 30, 2019 at 19:17
• @juancarlosvegaoliver In the example on your question, one could see "force from pressure" as a functional on surfaces, and the $\mathrm{d}F = P\mathrm{d}A$ as the definition of the 2-form whose integral over a surface yields the force on that surface. Apart from the dimension (2 rather than 1), this is therefore completely analogous to the case of work on paths.. Nov 30, 2019 at 19:36
• so dF would also be an inexact differential, and some people write it with the curly d?. Can I conclude the following.? The integral of a functional is a function, and there is no limit evaluation, because is not ordinary differentiation, that is why I was getting wrong conclusions in both my examples. Having said that, I guess what other magnitudes would follow the same behaviour when integrated, how do I distinguish a functional from a function? Nov 30, 2019 at 19:57
• @juancarlosvegaoliver I've amended the answer. Nov 30, 2019 at 20:17
• @GiorgioP that in this particular case work is pure potential energy doesn't change that conceptually work is not a state function Dec 3, 2019 at 7:00

After a few clarifying comments I'll go back to rewrite from scratch my answer.

Mechanical work $$W_{AB;\gamma}$$ from a point $$A$$ to a point $$B$$ along a curve $$\gamma$$ of parametric representation $${\bf s}(\alpha)$$, where $$\alpha_A \leq \alpha \leq \alpha_B$$ and $${\bf s}(\alpha_A)= {\bf r_A}$$, is the position vector of $$A$$ and $${\bf s}(\alpha_B)= {\bf r_B}$$ is the position vector of $$B$$, is the integral of a differential form: $$W_{AB;\gamma}= \int_{A;\gamma}^B{\bf F}({\bf r}) \cdot d{\bf s}=\int_{\alpha_A}^{\alpha_B}{\bf F}({\bf s}(\alpha))\cdot\frac{d{\bf s}}{d \alpha}d \alpha~~~~~~~~~~~[1]$$ Where $${\bf F}({\bf r})$$ is the total force at point $${\bf r}$$ and $$d{\bf s}$$ represents an infinitesimal displacement tangent to $$\gamma$$ at the same point.

As integral of a differential form (if one likes the exterior algebra point of view, as integral of a $$1$$-form) $$[1]$$ is in general path dependent. Which means that for a given pair points $$A$$ and $$B$$ $$W_{AB;\gamma}$$ will depend on the curve $$\gamma$$ chosen to join them. In such (generic) case, one says that the form $${\bf F}\cdot d{\bf s}$$ in non-integrable or non-exact.

In some special cases it happens that there exists a scalar function ($$0$$-form) $$V({\bf r})$$ such that $${\bf F}= -\nabla V$$ and in such a case it is possible to show that $$W_{AB;\gamma}$$ does not depend on the path $$\gamma$$ anymore, but depends only on the initial and final points, through the values of $$V$$ at those points: $$W_{AB;\gamma}= W_{AB}= V({\bf r}_B) - V({\bf r}_A).$$ This is the case of th so-calld exact forms or integrable forms.

So far, there is no ambiguity in the notation.

Problems can come if one uses without care the mathematical notation for the differential forms (not their integrals).

Mathematical notation is actually coherent. A differential form (exact o non-exact) is indicated using Leibnitz's d notation. For instance $$dW={\bf F}\cdot d{\bf s}$$. Notice that such a notation does not imply that the integral over a path of $$dW$$ would be independent on the path. It is also not implying the existence of a potential in general.

However, and this is the key point, there are some special cases where $$dW$$ is exact. Modern mathematical notation usually does not use different symbols for making a distinction bteween exact and non-exact forms. However if the generic expression for work $$dW$$ is explicitly written as a function of its independent variables and their differentials it is possible to check explicitly whether $$dW$$ is exact or not.

In both your examples, in the first one, as soon as you introduced a potential energy, you were assuming an exact form, while in the second example, since you were dealing with a function of one variable, you were again implicitly dealing with an exact form, with all the consequences of the case. In particular, in both cases, since there is a scalar function whose differential is what was called $$dW$$, it is consistent to call $$W$$ such a function and to introduce the notation $$W(B)-W(A)$$ for the integral of $$dW$$.

Of course, in the general, non-integrable case, this is not allowed.

A final word of caution about the so-called inexact differentials which plague thermodynamics. In that case the situation has some similarity with the mechanical case, but also some differences. Very briefly, work and heat in general, not only are not exact differentials, but aren't even differential at all. For a fluid system undergoing a generic non-equilibrium transformations there is no function $$p$$ of the volume enabling to write $$dW = -p dV$$. Such a notation implies as a pre-condition, a reversible quasi-static transformation. Once we have the reversible quasi-static transformation, the form may be exact or not depending on the kind of transformation (work becomes an exact form for reversible adiabatic transformations).