Let us see ...
rudransh verma said:
Homework Statement: ...
Relevant Equations: V= 4/3 pir^3 ... E=1/4pie0q/r^2 ..
... I have a doubt on the formula I am using for E because that formula is for a point charge or a charged shell.
... E=1/4pie0q/r^2##~\Rightarrow~E = \frac {1} {4πε_0} \frac {q} {r^2}~\Leftarrow~\begin{cases}\begin{align} & \text {for a point charge}~q~, \text {a mathematical} \nonumber \\ &\text {point without any size nor shape,} \nonumber \\& \text {without any extension in space}~\dots\nonumber \end{align}\end{cases}##
For an extended 3D body (a point large enough to have size and shape in 3D but still small enough to be treated as a point in comparison to other neighboring bodies, the concept of a volume element ##~dV## is used. The total volume ##V## is then the sum of all the volume elements ##~dV_i~## comprising the body: ##~V=\sum_{i}## ##dV_i##. If the volume elements are sufficiently small, then they can be treated as point partcles and the total 3D region containing them, including the empty spaces between them, can be said to be occupied by a discrete set of particles.
But if the sufficiently small volume elements are so close together that there are no empty spaces left between them, then the sum is replaced by an integral: ##~V=\int_\rm R## ##dV##. The total region R enclosing all the volume elements is then said to be occupied by a continuous distribution of elements.
In the case of a charge ##q~##sufficiently small to be treated as a point charge, we have the ordinary product ##q = ρV##, where ##ρ## is the charge density. But if ##q~##is not small enough and its size and shape must be properly taken into account, then ##q~##must be divided into sufficiently, smal enough charge elements ##~dq~##, each one occupying the volume element ##dV##, whose integral ##\int_\rm R## ##dq = q = \int_\rm R## ##ρdV~##gives the total charge ##q##. If the charge density is not constant but varies inside the region R, then ##ρ## cannot be taken out of the integral sign.
The preceding is true only for scalar quantities like the total charge. For a vector, like the electric field vector, the integral ##\int d\vec E = \vec E## is more difficult to evaluate directly. Instead, the magnitude and direction are treated separately.
... ##dq~\Rightarrow~##production of field ##d\vec E~##with scalar magnitude ##dE =\frac {1}{4πε_0} \frac {dq}{r^2} = \frac {1} {4πε_0} \frac {ρdV} {r^2}##...
Using the convention that ##\vec E## vectors at the field point move away from positive charges while they move toward negative charges, addition or cancellation of scalar components of vector can be achieved by using symmetry considerations.