Voltage Difference Equation Terminology

For the formula for getting voltage difference $V_b-V_a=-\int _a^{b} Edl$ how do we know where the limit a and b go? In the equation it goes from a to b but why not b to a? For example , in this question I am given a non uniform charge density where charge density increases with radius r for a sphere of radius a. Voltage is 0 at a. If I want to find the voltage difference between a point inside the sphere and a point on the surface of the sphere, what would I integrate from? $-\int _a^{r} or -\int _r^{a}$?

Nugatory
Mentor
For the formula for getting voltage difference $V_b-V_a=-\int _a^{b} Edl$ how do we know where the limit a and b go? In the equation it goes from a to b but why not b to a? For example , in this question I am given a non uniform charge density where charge density increases with radius r for a sphere of radius a. Voltage is 0 at a. If I want to find the voltage difference between a point inside the sphere and a point on the surface of the sphere, what would I integrate from? $-\int _a^{r} or -\int _r^{a}$?

Either way if you just want the difference- one way tells you how much lower a is than b, and the other way tells you how much higher b is than a. The result will be the same except for their sign.

Dale
Mentor
2021 Award
For the formula for getting voltage difference $V_b-V_a=-\int _a^{b} Edl$ how do we know where the limit a and b go? In the equation it goes from a to b but why not b to a?
Remember that voltage doesn't have any physical meaning, only voltage differences do. So you always have to define your voltages as differences from some "reference" voltage. Your reference voltage is always a. The equation then gives you the voltage at b referenced to a. Note:
$-\int_a^{a} E dl = 0 = V_a-V_a$
So the voltage of any point referenced to itself is always 0, as you would expect.

Note also:
$V_b-V_a= -\int _a^{b} Edl = -(-\int _b^{a} Edl) = -(V_a-V_b)$
So the voltage of b referenced to a is the negative of the voltage of a referenced to b, as you would also expect.

BruceW
Homework Helper
As DaleSpam says, the voltage at b, referenced to a is conventionally given by Vb - Va

Thanks!