How can I find the scalar field from its gradient?

  • Context: Graduate 
  • Thread starter Thread starter Omri
  • Start date Start date
  • Tags Tags
    Gradient
Click For Summary
SUMMARY

The discussion focuses on the process of deriving a scalar field \(\phi(\mathbf{r})\) from its gradient \(\mathbf{F}(\mathbf{r}) = \nabla\phi(\mathbf{r})\). Participants clarify that to find \(\phi\), one must perform a line integral rather than a standard integral, emphasizing the importance of path independence in conservative vector fields. The example provided illustrates that the anti-derivative must account for constants and the specific path taken during integration. Ultimately, the correct approach involves recognizing that \(\nabla \phi\) defines a conservative vector field, leading to the conclusion that \(\phi(x,y) = x^2 - xy + C\).

PREREQUISITES
  • Understanding of vector calculus, specifically gradients and line integrals.
  • Familiarity with conservative vector fields and their properties.
  • Knowledge of partial derivatives and their role in multi-variable functions.
  • Basic concepts of integration, particularly in the context of path independence.
NEXT STEPS
  • Study the properties of conservative vector fields and their implications in physics.
  • Learn about line integrals and their applications in vector calculus.
  • Explore the relationship between gradients and potential functions in multi-variable calculus.
  • Investigate the concept of exact differentials and their role in solving differential equations.
USEFUL FOR

Mathematicians, physicists, and engineering students who are working with vector fields and seeking to deepen their understanding of gradients and scalar fields.

Omri
Messages
34
Reaction score
0
Hi,

There is some issue about gradients that disturbs me, so I'd be glad if you could help me figure it out.
Say I have a scalar field \phi(\mathbf{r}), that is not yet known. What I know is a function that is the gradient of \phi, so that \mathbf{F}(\mathbf{r}) = \nabla\phi(\mathbf{r}). I want to find \phi from \mathbf{F}, ignoring the constants of course. What I thought of was:
d\phi = \sum_{i=1}^{3}\frac{\partial\phi}{\partial x_i} dx_i = \sum_{i=1}^{3} F_i dx_i
And therefore:
\phi = \int d\phi = \int\sum_{i=1}^{3} F_i dx_i
But if you try that with the two-dimensional example \phi = x^2 - xy, it doesn't work, and gives and gives x^2 - 2xy.
Can anyone please explain that to me?

Thanks! :smile:
 
Physics news on Phys.org
Look at the definition of a line integral in this case and also note that

curl (grad \phi) =0

so grad \phi defines a vector field which is conservative. Look at how this links to path independence and defines a consistent \phi
 
Hi Omri! :smile:

Suppose your line integral is from (0,0) to (0,y), then from (0,y) to (x,y)

The first part is ∫-x dy = -xy evaluated with x = 0, so it's zero (you thought it was -xy, didn't you? :wink:)

And the second part is ∫(2x - y) dx evaluated with y = y, so it's x2 - xy, as expected. :smile:
 
Omri said:
Hi,

There is some issue about gradients that disturbs me, so I'd be glad if you could help me figure it out.
Say I have a scalar field \phi(\mathbf{r}), that is not yet known. What I know is a function that is the gradient of \phi, so that \mathbf{F}(\mathbf{r}) = \nabla\phi(\mathbf{r}). I want to find \phi from \mathbf{F}, ignoring the constants of course. What I thought of was:
d\phi = \sum_{i=1}^{3}\frac{\partial\phi}{\partial x_i} dx_i = \sum_{i=1}^{3} F_i dx_i
And therefore:
\phi = \int d\phi = \int\sum_{i=1}^{3} F_i dx_i
But if you try that with the two-dimensional example \phi = x^2 - xy, it doesn't work, and gives and gives x^2 - 2xy.
Can anyone please explain that to me?

Thanks! :smile:
If you are given \nabla \phi and want to find \phi you wouldn't start from a given \phi would you? Well, anyway, if \phi= x^2- xy the \nabla \phi= (2x- y)\vec{i}- x\vec{j}. If you were given (2x- y)\vec{i}- x\vec{j} and asked to find \phi, its anti-derivative, you would start from the definition
\nabla \phi= \frac{\partial \phi}{\partial x}\vec{i}+ \frac{\partial \phi}{\partial y}\vec{j}
Comparing that general formula to the specific example, we must have
\frac{\partial \phi}{\partial x}= 2x- y
Rememberting that the partial derivative with respect to x treats y like a constant, we can integrate "with respect to x" and get \phi(x,y)= x^2- xy+ C except that, since we are treating y as a constant, that "C" may in fact be a function of y: call it g(y) so we have \phi(x,y)= x^2- xy+ g(y). Now, differentiate that with respect to y:
\frac{\partial\phi}{\partial y}= -x+ g&#039;(y)= -x[/itex] so we must have g&#039;(y)= 0. Since g is a function of y only, g&#039; is an ordinary derivative and g&#039;(y)= 0 means g(y)= C, a constant. That is, \phi(x,y)= x^2- xy+ C exactly what we started with except for the constant of integration, C.<br /> <br /> Notice that is exactly what we do to find integrals of &quot;exact differentials&quot; and to solve first order &quot;exact&quot; differential equations.<br /> <br /> <b>Warning</b>, A function of two or three variables is not necessarily equal to a gradient.<br /> For example, if I were to claim that \nabla\phi(x,y)= 2y\vec{i}+ x\vec{j} and try to do the same thing, I would start with <br /> \frac{\partial\phi}{\partial x}= 2y <br /> so \phi(x,y)= 2xy+ g(y). Differentiating that with respect to y, <br /> \frac{\partial\phi}{\partial y}= 2y+ g&amp;#039;(y)= x<br /> which is impossible!<br /> <br /> The problem is that (2y)_y\ne (x)_x so, in ansrivas&#039; terms, \nabla\cross\nabla f= curl(grad f)\ne 0 which is impossible.
 
Thanks to all of you for your help. My mistake was that I tried to solve the integral as a regular integral and not a line integral, so I didn't pay attention to choosing a curve and taking the limits. I think I did it right now, I took your advice and used the simplest curve - first a line from (0,0) to (x,0) and then a line from (x,0) to (x,y) (or I could go to (0,y) first, it doesn't really matter). Now I got it, thanks!
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
870
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
615
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
5
Views
4K