# Antiderivative of multivariable function?

1. Feb 4, 2010

### mnb96

Hello,
if I have the following unknown function $$f(x_1,\ldots,x_n)$$

Assuming I am given all its partial derivatives $$\frac{\partial f}{\partial x_i}$$

is it possible to get the original function f ?

This is clearly possible for a one-variable function f(x). If we know df/dx we just need to compute the indefinite integral, but what about functions with two or more variables?

2. Feb 4, 2010

### apekattenico

I don't see why not. What do you do to find the original function for a single variable function?

3. Feb 4, 2010

### mnb96

I compute the indefinite integral:

$$\int\frac{df}{dx}dx$$

which gives $f$ up to a constant.
But what am I supposed to do when I have a multivariable function then?

4. Feb 4, 2010

### apekattenico

$$\int\int\frac{df}{dx}\frac{df}{dy}dydx$$

Keep in mind that we do not apply the same concept as we do indefinite integral, the integral has to be bounded by a plane (may it be 2,3, or more)

Last edited: Feb 4, 2010
5. Feb 4, 2010

### mnb96

Thanks,
did you mean to write the partial derivatives inside that integral or you really meant the total derivatives? Did you want to write this:

$$\int\int\frac{\partial f}{\partial x}\frac{\partial f}{\partial y}dydx$$

And also, when you said "...the integral has to be bounded by a plane (may it be 2,3, or more)...", it means that we can only do that as a definite integra, like this:

$$\int_{S\subset\mathbb{R}^2}\frac{\partial f}{\partial x}\frac{\partial f}{\partial y}dydx$$

6. Feb 4, 2010

### elibj123

That is simply not true

You have the gradient of f, which is a vector field:

$$\vec{F}=\vec{\nabla}f$$

To obtain f back, the technique is to integrate the vector field along a path going from some arbitrary point $$\vec{x}_{0}$$ to a general point where the function will be evaluate:
$$\vec{x}$$

Since you know the gradient of a scalar field is a conservative field, you are free to choose your path, in this case, the most simple path is a line, so:

$$f=\int_{\gamma}\vec{F}.\vec{dx}=\sum_{i}\int^{x_{i}}_{x_{i,0}}F_{i}(\vec{x})dx_{i}$$

Actually, this is not plainly true, since by differentiation you loose constant data, so this solution is true up to an additive constant, or it's true if you select an initial point so that
$$f(\vec{x}_{0})=0$$

7. Feb 4, 2010

### arildno

Sure.

Given, say, f(x,y,z), and you have f_x, then, the anti-derivative of f_x will equal f+G(y,z)

Similarly with the other partial derivatives.

Having all three will put sufficient constraints in order to find f uniquely, up to an arbitrary constant.

8. Feb 4, 2010

### mnb96

For elibj123
Ok...I don't know if I understand all your explanation, but in any case, that seems to me definitely a non-trivial result.
Could you please point out some sources where I can study this problem more deeply?
Is it a theorem?

Also, I don't understand your notation for the boundaries of the last integral: $$x_{i,0}$$ and $$x_i$$

Thanks!

For arildno:
is your explanation equivalent to the one elibj123 gave?

9. Feb 4, 2010

### elibj123

Yes it is equivalent, and his explanation is more practical for three/two dimensions, while mine is general.

The notation of $$x_{i,0}$$ is the i-th coordinate of the initial point
And $$x_{i}$$ the point at which the function is evaluated.

10. Feb 4, 2010

### arildno

Hmm, I'd rather say that my version is not equivalent yo elibj's; mine is a special case of elibj's.

They are both, of course, valid.

11. Feb 4, 2010

### HallsofIvy

Note that, with more than one variable, there may NOT be an antiderivative. For example if we are asked to find a function, f(x,y), such that
$$\frac{\partial f}{\partial x}= 2xy$$
and
$$\frac{\partial f}{\partial y}= 3xy$$
We can tell immediately that is not possible because the mixed derivatives
$$\frac{\partial^2 f}{\partial x\partial y}= \frac{\partial 3xy}{\partial x}= 3y$$
and
$$\frac{\partial^2 f}{\partial y\partial x}= \frac{\partial 2xy}{\partial y}= 2x$$
are not the same.

In order that there be a function f(x,y) such that
$$\frac{\partial f}{\partial x}= g(x,y)$$
and
$$\frac{\partial f}{\partial y}= h(x,y)$$
we must have
$$\frac{\partial g}{\partial y}= \frac{\partial h}{\partial x}$$

12. Feb 4, 2010

### mnb96

thanks a lot to you all.
You provided extremely useful advice and explanations.

hallsofivy:
very interesting observation!
I will try to figure out how to generalize that condition in the n-variables case.

Last edited: Feb 4, 2010
13. Feb 4, 2010

### arildno

Since I read the question to concern GRADIENT fields, I neglected to mention that the method I gave would fail otherwise.

Thanks for pointing that out.

14. Feb 5, 2010

### mnb96

When I was skimming by book on vector calculus, I spotted a solved problem similar to the example I gave, but in 3 dimensions.

The author of the book wrote that given a gradient $$\nabla f$$, if one wants to recover $$f$$, then the vector field must be irrotational, that is $$\nabla \times f=0$$.
I assume that this requirement is equivalent (or contains) the one pointed out by Hallsofivy.

Now, as far as I know the curl operator is specifically 3D.
Is it possible to generalize the requirement $$\nabla \times f=0$$ to n-dimension?
I have seen a generalization of curl in a paper of Hestenes about Geometric Algebra and Geometric Calculus, but my knowledge in that area is close to zero.

15. Feb 6, 2010

### HallsofIvy

Yes, and basically the same idea is addressed in the chapter on path integrals of "exact differentials" where the integral from point p to point q is independent of the path.

For example, to find
$$\int (2x+y)dx+ (x+ e^y}dy$$
from (1, 0) to (0, 1), we would note that there exist F(x,y) such that
$$dF= \frac{\partial F}{\partial x} dx+ \frac{\partial F}{\partial y}dy$$
because
$$\frac{\partial^2 F}{\partial x\partial y}= \frac{\partial 2x+y}{\partial y}= 1$$
and
$$\frac{\partial^2 F}{\partial y\partial x}= \frac{\partial x+ e^y}{\partial x}= 1$$.

That is, given that
$$\frac{\partial F}{\partial x}= 2x+y$$
and
$$\frac{\partial F}{\partial y}= x+ e^y$$
we can find F (up to an additive constant).

From
$$\frac{\partial F}{\partial x}= 2x+y$$
by "integrating with respect to x" we get
$$F(x,y)= x^2+ xy+ g(y)[/math] where, because partial differentiation with respect to x treats y like a constant, the "constant of integration" may be a function of y. Differentiating that with respect to y, [tex]\frac{\partial F}{\partial y}= x+ g'(y)= x+ e^y$$
Notice that the "x" terms cancel leaving $g'(y)= e^y$. That had to happen, since g is a function of x only, and is a consequence of the "mixed partials" being the same. Of course, from $g'(y)= e^y$ we get $g(y)= e^y+ C$ where C now really is a constant.

That is, $F(x,y)= x^2+ xy+ g(y)= x^2+ xy+ e^y+ C$ is a function having the required partial derivatives and the integral from (1,0) to (0,1) is just F(1,0)- F(0,1)= (1+ 0+ 1+ C)- (0+ 0+ e+ C)= 1- e.