I am reading about elliptic integrals in Chapter 2 of "Elliptic Curves" by McKean and Moll. There is a critical statement at the start of section 2.9 I am having some trouble understanding. It says that the differential equation for the Weierstrass $\wp$ function $$dx = \frac{d\wp}{\wp'} = \frac{1}{2}[(\wp - e_1)(\wp - e_2)(\wp - e_3)]^{-1/2}$$ implies that $$x = \frac{1}{2}\int_{\infty}^{\wp(x)}[(y - e_1)(y - e_2)(y - e_3)]^{-1/2}dy$$ up to periods.
I don't understand how to make sense of the integration limits. It seems like you should just take the indefinite integral. Differentiating with FTC gives $$\frac{1}{\varphi'(x)} = \frac{1}{2}[(\wp(x) - e_1)(\wp(x) - e_2)(\wp(x) - e_3)]^{-1/2}$$ as desired but this should be true if $\infty$ is replaced by a random constant or if $x$ is replaced by $x + C$ for any constant $C$. The only reason I can think of for taking $\infty$ is that $\vert \wp(x) \vert$ ranges from $0$ to $\infty$.
The differential equation satisfied by $\wp$ for a given lattice $\Lambda$ (or periods) is $$\wp'(z)^2 = 4 \wp(z)^3 - g_2 \wp(z) - g_3 = 4(\wp(z)-e_1)(\wp(z)-e_2)(\wp(z)-e_3)$$ (where $g_2,g_3,e_j$ depend on $\Lambda$)
So that locally on $U\subset \mathbb{C}$ where $\wp^{-1}(z)$ is well-defined (and analytic) for every complex numbers $a,s \in U$ : $$\int_a^{s} (4(z-e_1)(z-e_2)(z-e_3))^{-1/2} dz$$ $$ = \int_a^{s} (4(\wp(\wp^{-1}(z))-e_1)(\wp(\wp^{-1}(z))-e_2)(\wp(\wp^{-1}(z))-e_3))^{-1/2} dz$$ $$=\int_a^{s} \frac{1}{\wp'(\wp^{-1}(z))}dz =\wp^{-1}(s)-\wp^{-1}(a)$$
Letting $a \to \infty$, you have $\wp^{-1}(a) \to 0$ and $s = \wp(x)$ yields the desired result
$$\int_\infty^{\wp(x)} (4(z-e_1)(z-e_2)(z-e_3))^{-1/2}dz =x$$ at first for $\wp(x) \in U$, and by analytic continuation for every $x \in \mathbb{C}$