In Physics 2 potential was energy per charge, and near a point charge $V = kq/r$. That formula did not come from nowhere: it comes from the field by an integral. Once you know how, you can find the potential of anything whose field you know, including every field from Gauss's law.
Key idea
$$V_B - V_A = -\int_A^B \vec{E}\cdot d\vec{\ell}$$
In a uniform field, along a straight step of length $d$ at angle $\theta$ to the field: $\Delta V = -Ed\cos\theta$. For charges of limited size we usually set $V = 0$ far away, so $V(P) = -\int_\infty^P \vec{E}\cdot d\vec{\ell}$. Potential falls along the direction of the field.
Why it works
Move a test charge $q$ a small step $d\vec{\ell}$. The field does work $q\vec{E}\cdot d\vec{\ell}$ on it, so its potential energy changes by $dU = -q\vec{E}\cdot d\vec{\ell}$ (energy the field gives away is energy the arrangement loses). Divide by $q$: $dV = -\vec{E}\cdot d\vec{\ell}$. Add the steps from A to B with an integral, using the Fundamental Theorem when the field has an antiderivative. The electrostatic field is conservative, like gravity, so every path from A to B gives the same answer; pick the easiest one.
Worked examples
Worked example: A uniform field
A uniform field of $400\ \text{N/C}$ points along $+x$. Point B is $25\ \text{cm}$ from A, in a direction $60^\circ$ from the field. Find $V_B - V_A$.
- For a straight step in a uniform field, $\vec{E}\cdot d\vec{\ell}$ is the same all along: $\Delta V = -Ed\cos\theta$.
- $V_B - V_A = -(400)(0.25)\cos 60^\circ = -50\ \text{V}$.
- Only the part of the step along the field counts: $0.25\cos 60^\circ = 0.125\ \text{m}$. A step straight across the field would change nothing.
Answer: $V_B - V_A = -50\ \text{V}$
Worked example: From a point charge's field
Find $V_B - V_A$ for a $5.0\ \text{nC}$ point charge, with A $2.0\ \text{cm}$ and B $6.0\ \text{cm}$ from it. Then find $V(r)$ itself.
- Walk outward along a radius, where $\vec{E}\cdot d\vec{\ell} = \dfrac{kq}{r^2}\,dr$: $$V_B - V_A = -\int_{r_A}^{r_B}\frac{kq}{r^2}\,dr = kq\left(\frac{1}{r_B} - \frac{1}{r_A}\right)$$
- $$= (8.99 \times 10^{9})(5.0 \times 10^{-9})\left(\frac{1}{0.060} - \frac{1}{0.020}\right) = -1500\ \text{V}$$
- Now let A go to infinity, where $V = 0$: $V(r) = kq/r$, the formula from Physics 2.
Answer: $V_B - V_A \approx -1500\ \text{V}$
Worked example: The center of a charged ball
A ball of radius $R$ holds charge $Q$ spread evenly. Taking $V = 0$ far away, find the potential at its center.
- Come in from infinity in two stretches. Outside, the field is $kQ/r^2$, so at the surface $V(R) = kQ/R$.
- Inside, $E = kQr/R^3$ (from Gauss's law), so $$V(0) - V(R) = -\int_R^0 \frac{kQr}{R^3}\,dr = \frac{kQ}{2R}$$
- $V(0) = \dfrac{kQ}{R} + \dfrac{kQ}{2R} = \dfrac{3kQ}{2R}$. The center is where $E = 0$, yet $V$ is highest there: zero field means $V$ is flat, not zero.
Answer: $V(0) = \dfrac{3kQ}{2R}$
Common mistake
Dropping the minus sign. Without it, potential would rise as you move along the field, so a positive charge would be at the bottom of its own hill. Check with a positive point charge: its field points away from it and its potential $kq/r$ falls as you move away. Moving with the field must lower $V$.
For an infinitely long line of charge the integral from infinity diverges, so only differences make sense: $V_B - V_A = -\dfrac{\lambda}{2\pi\varepsilon_0}\ln\dfrac{r_B}{r_A}$.