In my book (University Physics by Young and Freedman), during solving the common example of finding the electric field along the x-axis from a uniformly charged disk, they arrive at this differential expression:
$$dE_x = {1 \over 4\pi\epsilon_0}{2\pi\sigma rx dr \over (x^2+r^2)^{3/2}}$$
Then they say:
To find the total field due to all the rings, we integrate $dE_x$ over $r$ from $r=0$ to $r=R$ (not from $-R$ to $R$):
$$E_x = \int_0^R {1 \over 4\pi\epsilon_0}{(2\pi\sigma r dr)x \over (x^2+r^2)^{3/2}}$$
I am confused as to how they arrived at this line. The right hand side suggests that they integrated both sides of the differential equation with a definite integral, but if that were the case, the left hand side would have been
$$\int_0^R dE_x = [E_x]_0^R = R - 0 = R$$
Instead, it looks like they integrated the left hand side of the differential equation with an indefinite integral, so they would get
$$\int dE_x = E_x$$
Certainly, integrating one side with an indefinite integral and the other side with a definite integral cannot be a valid step because you are not doing the same thing to both sides.
How can their result be rigorously justified and what is wrong with my reasoning?