Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Antiderivative of multivariable function?

  1. Feb 4, 2010 #1
    if I have the following unknown function [tex]f(x_1,\ldots,x_n)[/tex]

    Assuming I am given all its partial derivatives [tex]\frac{\partial f}{\partial x_i}[/tex]

    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. jcsd
  3. Feb 4, 2010 #2
    I don't see why not. What do you do to find the original function for a single variable function?
  4. Feb 4, 2010 #3
    I compute the indefinite integral:


    which gives [itex]f[/itex] up to a constant.
    But what am I supposed to do when I have a multivariable function then?
  5. Feb 4, 2010 #4

    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
  6. Feb 4, 2010 #5
    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
  7. Feb 4, 2010 #6
    That is simply not true

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


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

    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:


    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
  8. Feb 4, 2010 #7


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed


    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.
  9. Feb 4, 2010 #8
    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: [tex]x_{i,0}[/tex] and [tex]x_i[/tex]


    For arildno:
    is your explanation equivalent to the one elibj123 gave?
  10. Feb 4, 2010 #9
    Yes it is equivalent, and his explanation is more practical for three/two dimensions, while mine is general.

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

    I would suggest reading about vector calculus, there is another thread here with recommendations for book about the subject.
  11. Feb 4, 2010 #10


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    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.
  12. Feb 4, 2010 #11


    User Avatar
    Science Advisor

    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
    [tex]\frac{\partial f}{\partial x}= 2xy[/tex]
    [tex]\frac{\partial f}{\partial y}= 3xy[/tex]
    We can tell immediately that is not possible because the mixed derivatives
    [tex]\frac{\partial^2 f}{\partial x\partial y}= \frac{\partial 3xy}{\partial x}= 3y[/tex]
    [tex]\frac{\partial^2 f}{\partial y\partial x}= \frac{\partial 2xy}{\partial y}= 2x[/tex]
    are not the same.

    In order that there be a function f(x,y) such that
    [tex]\frac{\partial f}{\partial x}= g(x,y)[/tex]
    [tex]\frac{\partial f}{\partial y}= h(x,y)[/tex]
    we must have
    [tex]\frac{\partial g}{\partial y}= \frac{\partial h}{\partial x}[/tex]
  13. Feb 4, 2010 #12
    thanks a lot to you all.
    You provided extremely useful advice and explanations.

    very interesting observation!
    I will try to figure out how to generalize that condition in the n-variables case.
    Last edited: Feb 4, 2010
  14. Feb 4, 2010 #13


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    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.
  15. Feb 5, 2010 #14
    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 [tex]\nabla f[/tex], if one wants to recover [tex]f[/tex], then the vector field must be irrotational, that is [tex]\nabla \times f=0[/tex].
    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 [tex]\nabla \times f=0[/tex] 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.
  16. Feb 6, 2010 #15


    User Avatar
    Science Advisor

    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
    [tex]\int (2x+y)dx+ (x+ e^y}dy[/tex]
    from (1, 0) to (0, 1), we would note that there exist F(x,y) such that
    [tex]dF= \frac{\partial F}{\partial x} dx+ \frac{\partial F}{\partial y}dy[/tex]
    [tex]\frac{\partial^2 F}{\partial x\partial y}= \frac{\partial 2x+y}{\partial y}= 1[/tex]
    [tex]\frac{\partial^2 F}{\partial y\partial x}= \frac{\partial x+ e^y}{\partial x}= 1[/tex].

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

    [tex]\frac{\partial F}{\partial x}= 2x+y[/tex]
    by "integrating with respect to x" we get
    [tex]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[/tex]
    Notice that the "x" terms cancel leaving [itex]g'(y)= e^y[/itex]. 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 [itex]g'(y)= e^y[/itex] we get [itex]g(y)= e^y+ C[/itex] where C now really is a constant.

    That is, [itex]F(x,y)= x^2+ xy+ g(y)= x^2+ xy+ e^y+ C[/itex] 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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook