Gaussian surface of radius $r$ in a non-conducting charged sphere of radius $R$
By using gauss law with the gaussian surface depicted above we should get a result as follows:
$$\int{E \cdot ds} = \frac{\sum{q_{in}}}{\epsilon}$$
Here I recognize the electric field is due to all the charges present.
However the surface integral of electric field evaluates to zero due to all the charges present outside the gaussian sphere. And charge inside the gaussian surface here is 0. Hence the above equation gives:
$$0 = 0$$
Which does not give any information.
In books I have seen the integral being equated to zero since the charge inside is 0 which goes against my logic.
I have come across another question on this platform with the same doubt where the answer is given on the basis of symmetry but how does it make sense in a mathematical perspective (strictly according to the equation)?
Any help would be appreciated