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

Partial integration of gradient vector to find potential field

  1. Aug 4, 2004 #1

    Gza

    User Avatar

    "partial integration" of gradient vector to find potential field

    I'm studying out of Stewart's for my Calc IV class, and hit a stumbling block in his section on the fundamental theorem for line integrals. He shows a process of finding a potential function [tex]f[/tex] such that [tex]\vec{F} = \nabla f [/tex], where [tex]\vec{F} [/tex] is a vector field defined as

    [tex]\vec{F} = (3 + 2xy) \mathbf{\hat{i}} + (x^2 - 3y^2) \mathbf{\hat{j}} [/tex]

    He then goes on to equate the components of the gradient vector of the function we want to find with the components of; with the given vector field.

    [tex]\frac{\partial f(x,y)}{\partial x} = 3 + 2xy [/tex] (eq. 7)

    [tex]\frac{\partial f(x,y)}{\partial y} = x^2 - 3y^2 [/tex] (eq.8)

    no problems so far.

    but now he integrates equation 7 with respect to x and obtains:

    [tex]f(x,y) = 3x + x^2y + g(y) [/tex]

    He doesn't really explain where g(y) comes from, or why it is needed. I know a constant of integration is needed, but why must it be a function of y? Thanks for the help.
     
    Last edited: Aug 5, 2004
  2. jcsd
  3. Aug 5, 2004 #2
    well what you are trying to find is the scalar function, correct? when you take the gradient of this function, taking the two spatial derivatives separately, you should end up with what you started with, the gradient given. then, looking at the problem given it should be easy to see why the constant of integration may be a function of y. taking the derivative of your final scalar function with respect to y must somehow give you [itex]-3y^2[/itex], which is a function of y only. this information gets "lost" when the derivative is taken only with respect to x and thus must be restored by looking at the derivative with respect to y.
     
  4. Aug 5, 2004 #3

    Galileo

    User Avatar
    Science Advisor
    Homework Helper

    You have integrated with respect to x, so you will get a constant with respect to x. (That is if you differentiate with respect to x, it should drop out). But it can still depend on y.
     
  5. Aug 5, 2004 #4
    Remember when you take partial derivatives w.r.t x, y is treated like a constant. So when you "partially integrated" you need to take into account for any y's that may have been elminated, this includes regular constants also.

    Best way I would have done it is the same this as Stewart but with a twist.

    [tex]\vec{F} = (3 + 2xy) \mathbf{\hat{i}} + (x^2 - 3y^2) \mathbf{\hat{j}} [/tex]

    I wish to find [tex]\vec F = \nabla \Phi[/tex]

    So from that I know [tex]\frac {\partial \Phi}{\partial x} = 3+2xy[/tex] and [tex]\frac {\partial \Phi}{\partial y} = x^2-3y^2[/tex]

    Using seperation of variables on the [tex]\frac {\partial \Phi}{\partial x} = 3+2xy[/tex], I get [tex]\Phi=3x+x^2y+g(y)[/tex]. Now I take the partial derivative of this w.r.t y and try to match it with [tex]\frac {\partial \Phi}{\partial y} = x^2-3y^2[/tex]

    [tex]\frac {\partial}{\partial y} (3x+x^2y+g(y))=x^2+g'(y)[/tex]

    From that I know [tex]g'(y) = -3y^2[/tex] or [tex]g(y)=-y^3[/tex]

    So [tex]\Phi = 3x+x^2y-y^3 + C[/tex]
     
  6. Aug 5, 2004 #5

    Gza

    User Avatar

    Thanks for the help everyone. Would this technique of integration be something you would learn in a class on partial differential equations, or are there better ways of doing this, since it seems a rather ad hoc method.
     
  7. Aug 5, 2004 #6
    Seperations of variables is something you will definately see in ordinary differential equations. Its one of the most simple methods out there. I am sure your regular calculus book will include this also especially one by James Stewart. If there is a section about exponential growth, you might find it there.
     
  8. Aug 6, 2004 #7

    Galileo

    User Avatar
    Science Advisor
    Homework Helper

    Another way (though not a better one in my opinion) is to perform a line integral from your reference point (say (0,0)) to the point (x,y).
    This seems straightforward from the definition:

    [tex]V(x,y)=\int_{(0,0)}^{(x,y)}\vec{F}\cdot d\vec r =
    \int_{(0,0)}^{(x,y)}\left((3 + 2x'y')\mathbf{\hat{i}} + (x'^2 - 3y'^2)\mathbf{\hat{j}}\right)\cdot d \vec r'
    [/tex]
    Since the integral is independent of path you can choose any path you like for your line integral.
    Let's go from (0,0) to (x,0) and then from (x,0) to (x,y) in straight lines.
    For the first part; from (0,0) to (x,0):

    [tex]V(x,0)=\int_{(0,0)}^{(x,0)}3dx'=3x[/tex]
    since y is zero along that path and dr=dx
    Then from (x,0) to (x,y):
    [tex]\int_{(x,0)}^{(x,y)}(x^2-3y'^2)dy'=x^2y-y^3[/tex]

    So that [itex]V(x,y)=3x+x^2y-y^3[/itex]

    This calculation wasn't so bad, but in three dimensions, it can get pretty tedious though. :zzz:
     
    Last edited: Aug 6, 2004
  9. Aug 6, 2004 #8

    Gza

    User Avatar

    Thanks Galileo. Your method seemed much more intuitive than the book's. Not that I enjoy doing line integrals :yuck: .
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Partial integration of gradient vector to find potential field
Loading...