What Is the Potential Function U for a Given Gradient?

  • Thread starter Thread starter Amrator
  • Start date Start date
  • Tags Tags
    Gradient
Amrator
Messages
246
Reaction score
83

Homework Statement


##\nabla U = 2 r^4 \vec r## Find U.

Homework Equations


##\vec r = x \hat i + y \hat j + z \hat j##
##r = \sqrt (x^2 + y^2 + z^2)##

The Attempt at a Solution


##\nabla U = 2 (x^2 + y^2 + z^2)^2 (x \hat i + y \hat j + z \hat j)##

I multiplied everything out,

##\nabla U = (2 x^4 + 4 x^2 y^2 + 4 x^2 z^2 + 4 y^2 z^2 + 2 y^4 + 2 z^4)x\hat i + (2 x^4 + 4 x^2 y^2 + 4 x^2 z^2 + 4 y^2 z^2 + 2 y^4 + 2 z^4)y\hat j + (2 x^4 + 4 x^2 y^2 + 4 x^2 z^2 + 4 y^2 z^2 + 2 y^4 + 2 z^4)z\hat k##

Since ##\nabla U = \frac{\partial U}{\partial x} \hat i + \frac{\partial U}{\partial y} \hat j + \frac{\partial U}{\partial z} \hat k##, we really only need one of the partial derivatives.

##\frac{\partial U}{\partial x} = (2 x^5 + 4 x^3 y^2 + 4 x^3 z^2 + 4 x y^2 z^2 + 2 x y^4 + 2 x z^4)##

Then I took the integral of only the x terms,

##\frac{\partial U}{\partial x} = \frac{\partial}{\partial x} (\frac {x^6}{3} + x^4 y^2 + x^4 z^2 + 2 x^2 y^2 z^2 + x^2 y^4 + x^2 z^4)##

Therefore,

##U = \frac {x^6}{3} + x^4 y^2 + x^4 z^2 + 2 x^2 y^2 z^2 + x^2 y^4 + x^2 z^4##

Am I correct so far? If so, where do I go from here?
 
Last edited:
Physics news on Phys.org
Amrator said:

Homework Statement


##\nabla U = 2 r^2 \vec r## Find U.

Homework Equations


##\vec r = x \hat i + y \hat j + z \hat j##
##r = \sqrt (x^2 + y^2 + z^2)##

The Attempt at a Solution


##\nabla U = 2 (x^2 + y^2 + z^2)^2 (x \hat i + y \hat j + z \hat j)##
I multiplied everything out.
##\frac{\partial U}{\partial x} = (2 x^5 + 4 x^3 y^2 + 4 x^3 z^2 + 4 x y^2 z^2 + 2 x y^4 + 2 x z^4)\hat i##
Then I took the integral of only the x terms,
##\frac{\partial U}{\partial x} = \frac{\partial}{\partial x} (\frac {x^6}{3} + x^4 y^2 + x^4 z^2 + 2 x^2 y^2 z^2 + x^2 y^4 + x^2 z^4)\hat i##
Therefore,
##U = \frac {x^6}{3} + x^4 y^2 + x^4 z^2 + 2 x^2 y^2 z^2 + x^2 y^4 + x^2 z^4##
Am I correct so far? If so, where do I go from here?

If ##r = \sqrt{x^2 + y^2 + z^2}##, then what is r2?
 
SteamKing said:
If ##r = \sqrt{x^2 + y^2 + z^2}##, then what is r2?
Sorry about that, I screwed up the question. I'll edit right now. It should be r^4.
 
Amrator said:

Homework Statement


##\nabla U = 2 r^4 \vec r## Find U.
...

The Attempt at a Solution

[/B]
...
Then I took the integral of only the x terms,

##\frac{\partial U}{\partial x} = \frac{\partial}{\partial x} (\frac {x^6}{3} + x^4 y^2 + x^4 z^2 + 2 x^2 y^2 z^2 + x^2 y^4 + x^2 z^4)##

Therefore,

##\displaystyle U = \frac {x^6}{3} + x^4 y^2 + x^4 z^2 + 2 x^2 y^2 z^2 + x^2 y^4 + x^2 z^4##

Am I correct so far? If so, where do I go from here?
You need a "constant" of integration. Of, course it's only constant w.r.t. ##x## . It's potentially a function of ##y## and ##z## .
 
SammyS said:
You need a "constant" of integration. Of, course it's only constant w.r.t. ##x## . It's potentially a function of ##y## and ##z## .
So ##\frac{\partial U}{\partial x} = \frac{\partial}{\partial x} (\frac {x^6}{3} + x^4 y^2 + x^4 z^2 + 2 x^2 y^2 z^2 + x^2 y^4 + x^2 z^4 + constant)##?
 
Amrator said:
So ##\frac{\partial U}{\partial x} = \frac{\partial}{\partial x} (\frac {x^6}{3} + x^4 y^2 + x^4 z^2 + 2 x^2 y^2 z^2 + x^2 y^4 + x^2 z^4 + constant)##?
I would put it more like:
##\displaystyle U = \frac {x^6}{3} + x^4 y^2 + x^4 z^2 + 2 x^2 y^2 z^2 + x^2 y^4 + x^2 z^4 + f(y,z) ##​

Now, take the partial derivative w.r.t. y or z.
 
SammyS said:
I would put it more like:
##\displaystyle U = \frac {x^6}{3} + x^4 y^2 + x^4 z^2 + 2 x^2 y^2 z^2 + x^2 y^4 + x^2 z^4 + f(y,z) ##​

Now, take the partial derivative w.r.t. y or z.
But f(y,z) is a function, not a constant? And why do I need to take the PD w.r.t. y or z? Just trying to understand.
 
Amrator said:
But f(y,z) is a function, not a constant? And why do I need to take the PD w.r.t y or z? Just trying to understand.
##\displaystyle \ \frac{\partial}{\partial x}f(y\,,z)=0\,,\ ## right ?

So ƒ(y, z) plays the same role here as the constant of integration plays for a single variable integral .
 
SammyS said:
##\displaystyle \ \frac{\partial}{\partial x}f(y\,,z)=0\,,\ ## right ?

So ƒ(y, z) plays the same role here as the constant of integration plays for a single variable integral .
Yes.

So taking the PD w.r.t. y yields,

##U = 2 x^4 y + 4 x^2 y z^2 + 4 x^2 y^3 + f(y,z)##
 
  • #10
Amrator said:
Yes.

So taking the PD w.r.t. y yields,

##U = 2 x^4 y + 4 x^2 y z^2 + 4 x^2 y^3 + f(y,z)##
Yes (but), if I made no mistake by scrolling up and down. However, can the constant here be a function of y?
 
Last edited:
  • #11
Amrator said:
Yes.

So taking the PD w.r.t. y yields,

##U = 2 x^4 y + 4 x^2 y z^2 + 4 x^2 y^3 + f(y,z)##
Why didn't you take the partial derivative of f(y,z)? And that's supposed to be ##\partial U/\partial y## on the LHS, right?
 
  • Like
Likes SammyS
  • #12
Amrator said:
But f(y,z) is a function, not a constant? And why do I need to take the PD w.r.t. y or z? Just trying to understand.

Because you have not yet matched ##\partial U/ \partial y## and ##\partial U/ \partial z## to the given forms that you started with. Notice that if you did not have the ##f(y,z)## term, the ##y## and ##z## partials would come out wrong. Try it and see! Don't agonize about it; just do it.
 
  • #13
##{\partial U}/{\partial y} = 2 x^4 y + 4 x^2 y z^2 + 4 x^2 y^3##

##{\partial U}/{\partial z} = 4 x^2 y^2 z##
 
Last edited:
  • #14
Are you not allowed to solve this in spherical coordinates? dU/dr = 2 r5?
 
  • Like
Likes Samy_A and fresh_42
  • #15
Chestermiller said:
Are you not allowed to solve this in spherical coordinates? dU/dr = 2 r5?
I don't see why not. The book doesn't say I can't. Although, I am trying to get used to partial derivatives and the del operator.
 
  • #16
Amrator said:
I don't see why not. The book doesn't say I can't.
So...
 
  • #17
Chestermiller said:
Are you not allowed to solve this in spherical coordinates? dU/dr = 2 r5?
Thanks a lot. I just did it by hand and at the end I came out with: "There must be a way to see it immediately!" Thank you.
 
  • #18
Amrator said:
##{\partial U}/{\partial y} = 2 x^4 y + 4 x^2 y z^2 + 4 x^2 y^3##

##{\partial U}/{\partial z} = 4 x^2 y^2 z##
You're missing a bunch of terms in ##{\partial U}/{\partial z}##.

Amrator said:
##\nabla U = (2 x^4 + 4 x^2 y^2 + 4 x^2 z^2 + 4 y^2 z^2 + 2 y^4 + 2 z^4)x\hat i + (2 x^4 + 4 x^2 y^2 + 4 x^2 z^2 + 4 y^2 z^2 + 2 y^4 + 2 z^4)y\hat j + (2 x^4 + 4 x^2 y^2 + 4 x^2 z^2 + 4 y^2 z^2 + 2 y^4 + 2 z^4)z\hat k##

##\nabla U = \frac{\partial U}{\partial x} \hat i + \frac{\partial U}{\partial y} \hat j + \frac{\partial U}{\partial z} \hat k##
Note that the result you got for ##{\partial U}/{\partial y}## by neglecting f(y,z) only has the first three terms of ##\hat{j}## component of ##\nabla U##. The missing terms only depend on y and z. That's why the f(y,z) has to be there.
 
  • #19
vela said:
You're missing a bunch of terms in ##{\partial U}/{\partial z}##.Note that the result you got for ##{\partial U}/{\partial y}## by neglecting f(y,z) only has the first three terms of ##\hat{j}## component of ##\nabla U##. The missing terms only depend on y and z. That's why the f(y,z) has to be there.

I see, and f(y,z) contains only y and z terms, correct?
So ##U = x^6 / 3 + x^4 y^2 + x^4 z^2 + 2 x^2 y^2 z^2 + x^2 y^4 + x^2 z^4 + f(y,z)##
##f(y,z) = \int {4 y^3 z^2 + 2 y^5 +2 y z^4} dy##
Something doesn't seem right with that above equation though. I have not learned multiple integrals yet. That's after this section.
 
  • #20
Amrator said:
##{\partial U}/{\partial y} = 2 x^4 y + 4 x^2 y z^2 + 4 x^2 y^3##

##{\partial U}/{\partial z} = 4 x^2 y^2 z##
What you have for ## \displaystyle {\partial U}/{\partial y}\ ## is missing ## \displaystyle \frac{\partial }{\partial y}f(y,\,z)\ ##.
 
  • #21
SammyS said:
What you have for ## \displaystyle {\partial U}/{\partial y}\ ## is missing ## \displaystyle \frac{\partial }{\partial y}f(y,\,z)\ ##.
But I don't know what f(y, z) is. Don't I have to find it first?

Perhaps I should start over? I'm getting very confused.
 
Last edited:
  • #22
Amrator said:
But I don't know what f(y, z) is. Don't I have to find it first?

Perhaps I should start over? I'm getting very confused.
You can get ##f(y,z)## by comparison of ##δU / δx## with the ##î ## coordinate you computed in the beginning.
 
  • #23
fresh_42 said:
You can get ##f(y,z)## by comparison of ##δU / δx## with the ##î ## coordinate you computed in the beginning.
What? What is ##δU / δx##?
 
  • #24
Amrator said:
What? What is ##δU / δx##?
Sorry I took what I got. I haven't found the correct delta. You have ##U = ... + f(y,z)## on one hand, which allows you to differentiate along ##y##. This result can be compared to your ##j##-coordinate in the beginning. That gives you the partial differentiation of ##f(y,z)## along ##y## which you could integrate to something like ##f(y,z) = ... + g(z)## and so on.
 
  • #25
fresh_42 said:
Sorry I took what I got. I haven't found the correct delta. You have ##U = ... + f(y,z)## on one hand, which allows you to differentiate along ##y##. This result can be compared to your ##j##-coordinate in the beginning. That gives you the partial differentiation of ##f(y,z)## along ##y## which you could integrate to something like ##f(y,z) = ... + g(z)## and so on.
So you want me to take PD of U = ... + f(y, z) w.r.t. y, and set it equal to the ##\hat j## component?
Isn't that what I did in one of my last posts on the previous page?
 
  • #26
Amrator said:
So you want me to take PD of U = ... + f(y, z) w.r.t. y, and set it equal to the ##\hat j## component?
Yes.
 
  • Like
Likes Amrator
  • #27
In order to keep confusion in limits here is what you already got: ##\frac{\partial}{\partial y} U(x,y,z) = 2 x^4 y + 4 x^2 y z^2 + 4 x^2 y^3 + \frac{\partial}{\partial y} f(y,z)##.
 
  • Like
Likes Amrator
  • #28
Amrator said:
I see, and f(y,z) contains only y and z terms, correct?
So ##U = x^6 / 3 + x^4 y^2 + x^4 z^2 + 2 x^2 y^2 z^2 + x^2 y^4 + x^2 z^4 + f(y,z)##
##f(y,z) = \int {4 y^3 z^2 + 2 y^5 +2 y z^4} dy##
Something doesn't seem right with that above equation though. I have not learned multiple integrals yet. That's after this section.
Which equation seems wrong? You're not doing a multiple integral. You're integrating with respect to y, treating z as a constant. You're just reversing the partial differentiation. You'll end up with another "constant" of integration, which is a function of z.
 
  • Like
Likes Amrator
  • #29
vela said:
Which equation seems wrong? You're not doing a multiple integral. You're integrating with respect to y, treating z as a constant. You're just reversing the partial differentiation. You'll end up with another "constant" of integration, which is a function of z.
So ##f(y,z) = y^4 z^2 + y^6 / 3 + y^2 z^4 + g(z)##?
And then do the same thing with z?
 
  • #30
Amrator said:
So ##f(y,z) = y^4 z^2 + y^6 / 3 + y^2 z^4 + g(z)##?
And then do the same thing with z?
Both correct.
And once you got the ##g(z)## you can all put together to write down ##U(x,y,z)##. (Don't forget the constant which is this time really constant.)
 
  • #31
Amrator said:
So ##f(y,z) = y^4 z^2 + y^6 / 3 + y^2 z^4 + g(z)##?
And then do the same thing with z?
At this point, you may be able guess what g(z) is.

- and to quote fresh 42, "Don't forget the constant ..."
 
  • #32
Amrator said:

Homework Statement


##\nabla U = 2 r^4 \vec r## Find U.
The method you follow will result in the potential function, but there is a simpler way when the gradient is given in terms of the position vector ##\vec r ##: ##\nabla U = 2 ((\vec r)^2)^2 \vec r##
You did not include among the "Relevant equations" how the gradient of a function is defined.
So the total differential of a function U is ## dU= \nabla (U) \cdot \vec{dr}##. (##\nabla (U)## is a vector.)
You get the change of U from point O (the origin) to point P if you integrate both sides between O and P.
##\Delta U = U(P)-U(O)=\int_O^P{\nabla U}\cdot \vec{dr}##. In this problem ##\nabla U = 2 r^4 \vec r##,
so you have the integral ##\int_O^P{2 r^4 \vec r \cdot \vec {dr}}##.
You can choose the integration path arbitrary, the integral will be the same. See figure: You can reach P from O along several paths, why not along the straight line connecting them. In this case, ##\vec r ## and ##\vec {dr} ## have the same direction, so ##\vec r \cdot \vec {dr}=r dr##, and the integral becomes ##\int_0^{r(P)}{2 r^4 r dr}##.
potfunc.jpg
 
  • Like
Likes Amrator and fresh_42
  • #33
Amrator said:

Homework Statement


##\nabla U = 2 r^4 \vec r## Find U.

The Attempt at a Solution


##\nabla U = 2 (x^2 + y^2 + z^2)^2 (x \hat i + y \hat j + z \hat j)##

I multiplied everything out,

##\nabla U = (2 x^4 + 4 x^2 y^2 + 4 x^2 z^2 + 4 y^2 z^2 + 2 y^4 + 2 z^4)x\hat i + (2 x^4 + 4 x^2 y^2 + 4 x^2 z^2 + 4 y^2 z^2 + 2 y^4 + 2 z^4)y\hat j + (2 x^4 + 4 x^2 y^2 + 4 x^2 z^2 + 4 y^2 z^2 + 2 y^4 + 2 z^4)z\hat k##
.

It was not necessary to expand the square.
You know that
##\frac{\partial U}{\partial x} = 2 x(x^2 + y^2 + z^2 )^2##.
Integral it with respect to x. Notice that you can do u-substitution with u= x2+y2+z2. What do you get? Include the integration constant, which is a function of y and z: (f(yz).
So your integral with respect to x becomes ##\frac{(x^2+y^2+z^2)^3 }{3}+f(yz)##
Take the partial derivative of the above expression with respect y. It must be equal to ## 2 y(x^2 + y^2 + z^2 )^2##. So what is the partial derivative of f(x,y) with respect to y?
 
  • Like
Likes Amrator
  • #34
ehild said:
.

It was not necessary to expand the square.
You know that
##\frac{\partial U}{\partial x} = 2 x(x^2 + y^2 + z^2 )^2##.
Integral it with respect to x. Notice that you can do u-substitution with u= x2+y2+z2. What do you get? Include the integration constant, which is a function of y and z: (f(yz).
So your integral with respect to x becomes ##\frac{(x^2+y^2+z^2)^3 }{3}+f(yz)##
Take the partial derivative of the above expression with respect y. It must be equal to ## 2 y(x^2 + y^2 + z^2 )^2##. So what is the partial derivative of f(x,y) with respect to y?
f(x, y)? Don't you mean g(z)?
 
  • #35
Amrator said:
f(x, y)? Don't you mean g(z)?
A stupid error! I meant f(y,z) and then g(z).
 
  • #36
ehild said:
.

It was not necessary to expand the square.
You know that
##\frac{\partial U}{\partial x} = 2 x(x^2 + y^2 + z^2 )^2##.
Integral it with respect to x. Notice that you can do u-substitution with u= x2+y2+z2. What do you get? Include the integration constant, which is a function of y and z: (f(yz).
So your integral with respect to x becomes ##\frac{(x^2+y^2+z^2)^3 }{3}+f(yz)##
Take the partial derivative of the above expression with respect y. It must be equal to ## 2 y(x^2 + y^2 + z^2 )^2##. So what is the partial derivative of f(x,y) with respect to y?
I don't understand. How do you find f(y, z) using this method?
 
  • #37
Amrator said:
I don't understand. How do you find f(y, z) using this method?
What is your result for ## \displaystyle \ \frac{\partial f(y,z)}{\partial y} \ ## if you use ehild's method ?
 
  • #38
SammyS said:
What is your result for ## \displaystyle \ \frac{\partial f(y,z)}{\partial y} \ ## if you use ehild's method ?
##{\partial U} / {\partial y} = 2 y (x^2 + y^2 + z^2)^2 + {\partial f(y,z)} / {\partial y}##
Setting that equal to the ##\hat j## component will give you ##{\partial f(y,z)} / {\partial y} = 0##.
 
  • #39
Amrator said:
I don't understand. How do you find f(y, z) using this method?

You find ##f(y,z)## by first finding ##\partial f(y,z) /\partial y## and ##\partial f(y,z) /\partial z## . So, go ahead and do that: find these partial derivatives, using the method that has been explained to you many times already.
 
  • #40
Ray Vickson said:
You find ##f(y,z)## by first finding ##\partial f(y,z) /\partial y## and ##\partial f(y,z) /\partial z## . So, go ahead and do that: find these partial derivatives, using the method that has been explained to you many times already.
##\partial f(y,z) /\partial y = 0##
##\partial f(y,z) /\partial z = 0##
Yeah, that doesn't seem right to me.
 
  • #41
##\nabla U = 2 x (x^2 + y^2 + z^2)^2 \hat i + 2 y (x^2 + y^2 + z^2)^2 \hat j +2 z (x^2 + y^2 + z^2)^2 \hat k##
##U = \int \partial U /\partial x dx = (x^2 + y^2 + z^2)^3 / 3 + f(y,z)##
##\partial U /\partial y = 2 y (x^2 + y^2 + z^2)^2 + \partial f(y,z) /\partial y##
##2 y (x^2 + y^2 + z^2)^2 + \partial f(y,z) /\partial y = 2 y (x^2 + y^2 + z^2)^2##
##\partial f(y,z) /\partial y = 0##
 
Last edited:
  • #42
Amrator said:
##\partial f(y,z) /\partial y = 0##
##\partial f(y,z) /\partial z = 0##
Yeah, that doesn't seem right to me.

Why not? It IS what you get!

So, assuming you believe your own work, what do those two formulas above tell you about ##f(y,z)##?
 
  • #43
Ray Vickson said:
Why not? It IS what you get!

So, assuming you believe your own work, what do those two formulas above tell you about ##f(y,z)##?
f(y, z) = g(z)?
 
  • #44
Amrator said:
f(y, z) = g(z)?
Are you just guessing?
 
  • #45
vela said:
Are you just guessing?
Well the integral of 0 is a constant of integration.
 
  • #46
Amrator said:
Well the integral of 0 is a constant of integration.
Yes. And what does it mean to be constant w.r.t. y and z?
 
  • #47
fresh_42 said:
Yes. And what does it mean to be constant w.r.t. y and z?
Oh right, f(y,z) = x since y and z have constant slopes.
 
  • #48
Amrator said:
Oh right, f(y,z) = x since y and z have constant slopes.
But f(y,z) isn't a function of x. How can this be?
 
  • #49
fresh_42 said:
But f(y,z) isn't a function of x. How can this be?
My mistake. f(y,z) = y + g(z).
Although, what about the z?
Yesterday, I had f(y,z) = ##y^4 z^2 + y^6 / 3 + y^2 z^4 + g(z)##.
 
  • #50
You already have had it. Just add up what you've said:
##f(y,z)## does not have ##x## as variable and it's dependency on ##y## is constant, as you have said. But the partial derivative w.r.t. ##z## is also zero. And you have said that means ## f ## does not change if ##z## does. So it has to be?
 
Back
Top