In class we calculated the electric field in- and outside a charge distribution: $$ \rho(r)= \begin{cases} \cos(r)+\frac{1}{r}\sin(r) &\text{if }r\leq R \\ 0 &\text{if }r>R \end{cases} $$
We used the divergence theorem to calculate this. But as far as I know, this theorem only applies if $\rho$ is continuously differentiable. Why can we apply this then?