# Finding force from electric potential energy using gradients.

mattyc33

## Homework Statement

In a certain region, a charge distribution exists that is spherically symmetric but
non-uniform. When a positive point charge q is located at (r,θ,φ) near this charge
distribution, there is a resulting electric potential energy for the system given by:

U(r,θ,φ) = ρ(naught)a^2q/18ε(naught)(1-3((r/a)^2) + 2((r/a)^3) for r ≤ a

and 0 for r ≥ a

where ρo is a constant having units of C/m^3 (volume charge density) and a is a
constant having units of m. Note that there is no θ or φ dependence here since the
charge distribution is spherically symmetric.
Determine the electric force F
exerted on charge q as a function of its location
(r,θ,φ) for:
a) r ≤ a
b) r > a

F=-∇U
∇U=dU/dr r

## The Attempt at a Solution

'

I derived ∇U=dU/dr r from the spherical coordinate gradients and since there is no dependence on phi and theta we will just be using the r vector.

therefore:

d/drρ(naught)a^2q/18ε(naught)(1-3((r/a)^2) + 2((r/a)^3) r

= 6r(r-a)/a^3 r

This is where I don't know what to do, how would I express my answer?

Homework Helper
You've calculated grad(U) ... you have the relationship between F and grad(U) ... you are asked for F... what's the problem?

Maybe this will help: You have told us...

$$U(r,\theta,\varphi) = U(r) = \frac{\rho_{0}a^2q}{18\epsilon_0 (1-3\left (\frac{r}{a}\right )^2)} + 2\left (\frac{r}{a}\right )^3 \; : \; r \leq a$$ $$\vec{F} = -\nabla U(r,\theta,\varphi)=-\frac{d}{dr}U(r)\hat{r}$$ $$\frac{d}{dr}U(r)=\frac{6r(r-a)}{a^3}$$... note: I'd check that derivative: I don't see where ##\rho_0##, ##q## and ##\epsilon_0## went for eg.

Last edited:
mattyc33
Thank you for clearing things up.

At this point I'm just having trouble proving that my answer will be in Newtons (correct units). Which means I probably derived wrong.

Homework Helper
You should go over the derivation.

Is the expression for U(r) (above) the same as what you are given?
The second term 2((r/a)^3) is dimensionless ... what dimensions should U have?

mattyc33
Sorry I must have mistyped the equation in the first place.

It should have been:

(ρ(naught)a^2q/18ε(naught)) (1-3((r/a)^2) + 2((r/a)^3)

Hopefully that makes it more clear.

The units for U should be Joules I believe (could be mistaken)

Here, let me help with that... $$U(r)= \frac{\rho_0 a^2 q}{18\epsilon_0} \left ( 1-3\left( \frac{r}{a} \right )^2 +2\left ( \frac{r}{a} \right )^3 \right )$$... LaTeX is totally worth the effort of learning it.
To proceed, I would either change the variable, say z=r/a so $$\frac{dU}{dr}=\frac{1}{a}\frac{dU}{dz}$$... or just rearrange $$U(r)= \frac{\rho_0 q}{18\epsilon_0 a} \left ( a^3 -3ar^2+2r^3 \right )$$... you should be able to see right away that you don't have enough constants in your answer... probably you just forgot to put them back at the end.