# How to deal with constants when equating two potential energies?

First let me ensure that the problem I am having is from a Physics book. But the problem is totally related to mathematics. Hence I think that this question here may not be illegitimate.

Using the concept of inverse square law of magnetic monopoles, this book derives an equation for PE between two magnetic monopoles:

$$M=-\int X dx=-PP'\int \dfrac{1}{r^2} \dfrac{x'-x}{r}dx=-PP'\int \dfrac{x'-x}{r^3} dx=\dfrac{PP'}{r}+C$$

If we define reference point of magnetic monopole at infinity, $C=0$ and PE at a point becomes: $M=\dfrac{PP'}{r}$

Now by adding all the dipoles of two magnets, the book derives an equation for PE between two magnets which is the same as PE between two closed circuits.

$$M=-\int X dx= \left( -\oint^{s'}_0 \oint^{s}_0 \dfrac{\vec{ds}.\vec{ds'}}{r}+C \right) ii'$$

Since reference position of all magnetic monopoles are defined at infinity, reference position of magnet is also at infinity. Therefore $C=0$ and PE at a position becomes:

$$M=-\int X dx=-\oint^{s'}_0 \oint^{s}_0 \dfrac{\vec{ds}.\vec{ds'}}{r}ii'$$

In another page, this book also derives another equation for PE between two closed circuits.

$$X=-\dfrac{\partial (-\oint^{s'}_0 \oint^{s}_0 \rho \text{ } {\vec{ds}.\vec{ds'})} }{\partial x}ii' =-\dfrac{\partial (-\oint^{s'}_0 \oint^{s}_0 \rho \text{ } {\vec{ds}.\vec{ds'}) +a+C} }{\partial x}ii'$$

where '$a$' is a constant

'$C$' is an arbitrary constant depending on reference point.

Therefore:

$$M=-\int X dx= \left[ \left( -\oint^{s'}_0 \oint^{s}_0 \rho \text{ } {\vec{ds}.\vec{ds'}} \right) +a+C \right] ii'$$

Now while equating the two potential energies:

We note that if we consider the same reference point, the two arbitrary constants (in the two equations of potential energies) are equal. Therefore:

$$-\oint^{s'}_0 \oint^{s}_0 \dfrac{\vec{ds}.\vec{ds'}}{r}ii' =\left[ \left( -\oint^{s'}_0 \oint^{s}_0 \rho \text{ } {\vec{ds}.\vec{ds'}} \right) +a \right] ii'$$

The book gives $\rho=\frac{1}{r}$ after equating the two potential energies. This is only possible if constant $a=0$. How can we ascertain that '$a$' must be zero?

• What book is this? – Yuriy S Feb 25 '18 at 17:34

You can actually begin with \begin{align} M &=-\int Xdx=\dfrac{qq{^\prime}}{r}+C \hspace{4mm}\mbox{ and } \\M& =-\int Xdx=p \text{ } qq{^\prime}+D, \end{align} where $C$ and $D$ are constants. By setting the two potentials equal to each other, we see that $$\dfrac{qq{^\prime}}{r}+C = p \text{ } qq{^\prime}+D.$$ Since the constant terms must equate to each other, we see that $C$ must equal $D$. It also follows that $p=\frac{1}{r}$.
• @Joe Your book states that $r=\sqrt{(x'-x)^2 + (y'-y)^2+(z'-z)^2}$ is a function of $\vec{x}=\langle x,y,z \rangle$ and $p$ is a function of $r$ (see Equation (24) for the electromagnetic setting). So $p$ is also a function of $\vec{x}$. After computing the two $\textit{integrals}$, it is clear that additional constants cannot drop out of the terms $\frac{qq'}{r}$ and $p\:qq'$ since you are doing improper integrals (if you were to do proper integrals, then constants produced are already grouped in $C$ or $D$, and we would know the values of $C$ and $D$). – Mee Seong Im Feb 25 '18 at 18:46