Calculus – Is it Possible to Reverse a Gradient Operation?

calculusvector analysis

In calculus, the antiderivative (indefinite integral) can be considered as the reverse operation of a derivative.

A gradient yields a vector. Is there a similar way of reversing gradient, as you do with derivatives?

Best Answer

Yes, it is possible. I will give an example to demonstrate the general procedure. Consider $f(x, y) = x^3 - 3xy^2 + x^2 + y^2 + \log x$. Then $\nabla f = \dfrac{\partial f}{\partial x}\hat{i} + \dfrac{\partial f}{\partial y}\hat{j} = \left(3x^2 - 3y^2 + 2x + \dfrac{1}{x}\right)\hat{i} + (2y -6xy)\hat{j}$.

To reverse this, we look at each component individually. We know that
$\dfrac{\partial f}{\partial x} = 3x^2 - 3y^2 + 2x + \dfrac{1}{x}\\ \dfrac{\partial f}{\partial y} = 2y - 6xy $

Therefore:

$\begin{align} \displaystyle f(x,y) & = \int \dfrac{\partial f}{\partial x}\, dx\\ & = \int 3x^2 - 3y^2 + 2x + \dfrac{1}{x}\, dx\\ & = x^3 - 3xy^2 + x^2 + \log x + u(y) \end{align}$

What is that $u(y)$? It's the "constant" of integration, of course.When we differentiate $f$ with respect to $x$ partially, any term of $f$ not containing $x$ is a constant - this includes terms containing only $y$.

Now to determine $u(y)$, we look at $\dfrac{\partial f}{\partial y}$. We could integrate this with respect to $y$, similar to what we did with $\dfrac{\partial f}{\partial x}$. Then some of the terms after the integration will be common. The terms that are not common are those that constitute $u(y)$. So we need to look for terms of $\dfrac{\partial f}{\partial y}$ that do not contain $x$, and integrate them. Here, $\dfrac{\partial f}{\partial y} = 2y - 6xy$, and the only term not containing $x$ is $2y$. Therefore:

$\displaystyle u(y) = \int 2y\, dy = y^2 + C$.

Thus, $\boxed{f(x, y) = x^3 - 3xy^2 + x^2 + \log x + y^2 + C}$.

In general: $$f(x, y) = \int \dfrac{\partial f}{\partial x} dx + \int \left[\text{terms of $\dfrac{\partial f}{\partial y}$ that do not contain $x$}\right]\, dy$$