# Electric Field in a cavity of a charged sphere

Tags:
1. Aug 21, 2016

### dumbdumNotSmart

NOTE: Other threads suggest solving it with Gauss' Law. I'd like to see an approach through direct integration, no full followthrough necessary..
1. The problem statement, all variables and given/known data

Consider a sphere with a uniform distribution of charge ρ (ro). Inside the sphere is a cavity (spherical). Calculate the electric field at any given point of the cavity (vacuum).
a<b
Distance from center of sphere to center of cavity is vector c.

Please note the cavity is not necessarily centered.

2. Relevant equations
Answer to the question is E=(ρc)/(3ε)
ε is permissiveness of vacuum.

3. The attempt at a solution
So my initial approach to this would be through direct integration. I'm not sure if Gauss' Law is applicable here, if it is great, that's one way to do the problem though I'd still like to see it done through direct integration if it is not too much of a hassle.

So far the only problems I've seen done with direct integration are uniformly charged non conducting strings of varying lengths (infinite or length L). My understanding of these problems is you find some sort of way to represent the differential of charge along the volume of sphere dq. I believe in this case you'd have to use a double/triple integral when using this method, something I really am not sure how to apply in this case.

I do have a solid understanding of vector calculus, I just need to get a foothold on how to start seeing differentials in physics. I only hope that when I say I have no idea how to even begin, you will understand I really want to make the effort to do this, but "I can't even", as the youth of today says.

It'd be great to see tips on how you guys picture it, some pre-solving ritual or high quality online material that could help me out.

2. Aug 21, 2016

### Dr Transport

3. Aug 21, 2016

### dumbdumNotSmart

Gauss' Law is great but I want to see how someone would integrate directly on this given example.

4. Aug 21, 2016

### Dr Transport

this is a typical Gauss's law problem, three integration's are necessary for the three regions of interest.

5. Aug 21, 2016

### dumbdumNotSmart

Alright, let's see... We could construct a sphere around the sphere since there's symmetry?

6. Aug 21, 2016

### Dr Transport

yes, that is corect

7. Aug 21, 2016

### VMP

Yes, doing this integral is quite a hassle, it's a good exercise for mechanical part of your mathematical skills, but before you start integrating;​

Consider that you don't have a sphere with a cavity. You know that if you have 2 or more charges around that the field they produce is a sum(*) of the two vectors, same applies for the potential (in scalar sense). The idea of this problem is to use the Gauss law so that you can easily find the functional relation between the electric field and distance from the center of the sphere and then in the second step use the principle of superposition(*) to add these fields.

What will make you really appreciate Gauss(**) law is doing this integral.
Consider placing your non-empty sphere at a point $$(0,0,d)\; \; \; where\; \; \; d<R$$ you probably know that $$\vec{E}=-\vec{\bigtriangledown} U \; \; \;and \; \; \; U=\frac{q}{4\pi\epsilon_{0}r}$$ for this simple case where field is radial with respect to the center of the sphere (it can be easily shown by symmetry) that $$\vec{E}=-\frac{\partial U}{\partial r}\hat{r}.$$ The differential of a volume and charge are:$$dq=\rho\cdot dV ,dV=r^2sin(\theta)drd\theta d\varphi$$
Now, for a fixed angle $\theta$ and $\varphi$ radius will range from $$0<r<d\cdot cos(\theta)+\sqrt{R^2-d^2sin^2(\theta)}$$

This should be enough of a hint how to directly integrate, this link can help a lot if you get stuck:
integral-calculator.com

Cheers!

(**) With the Gauss law, solving the relational part of the problem is two short rows of math.

Last edited: Aug 21, 2016
8. Aug 21, 2016

### dumbdumNotSmart

Woah! Thanks for the reply, I'll put it down on paper as soon as I get back home and try to squeeze the juice out of it until I give in to gauss.
I'll let you know about how it goes!

9. Aug 22, 2016

### dumbdumNotSmart

So I see you are implementing potential here. I should have let you know I have just started the electricity and magnetism course in my university and so far we´ve only seen the core basics. So the equation you show in your work was completely uknown to me until now. I guess my teachers intention was we try it out using Gauss.

So if we were to do the problem using Gauss, we´d construct a sphere around the given sphere. If we were to imply symmetry, I´d put the cavity centered around (0,0,c) (if it is wise to take the spheres center as the origin). The charged part of the sphere would be the surface since all charges are drawn there by EM force between themeselves. So now all there is to it is to know how to integrate the bloody thing. We have two surfaces... how does this even work?

10. Aug 22, 2016

### Dr Transport

first of all, draw a Gaussian surface for $r < a$, how much charge do you enclose?? Do the same for $a<r<b$, how much charge do you enclose (hint, $\rho(r)$ is a constant with respect to $r$). Do the same for $r > b$.

11. Aug 23, 2016

### VMP

Okay, I tried to avoid integrating the differential $d\vec{E}$ since it contains $\hat{r}$ vector which is not invariant(*) to coordinate change like $(\hat{x},\hat{y},\hat{z})\equiv (\hat{i},\hat{j},\hat{k})$ unit vectors.

After a few tries I noticed it simplifies quite a bit (pardon me for complicating the matter ), so I will proceed to hint a few critical points:

Starting from differential, $$d\vec{E}=\frac{dq}{4\pi\epsilon_{0}}\hat{r}.$$

Vector $\hat{r}$ is related to $(\hat{x},\hat{y},\hat{z})$ in the following way:$$\hat{r}=cos(\varphi)sin(\theta)\hat{x}+sin(\varphi)sin(\theta)\hat{y}+cos(\theta)\hat{z},$$

where $\varphi$ is the azimuth (angle in the xy plane) and $\theta$ is the polar angle (from top to bottom angle ).

Let us place the nonempty sphere at $(0,0,d)$ point as before. Recall that because of symmetry the direction of vector $\vec{E}$ must be in the $-\hat{z}$ direction, therefor once you set up your integral(**) the contributions of integrals that are multiplied by $\hat{x}$ and $\hat{y}$ are $0.$

(*) In physics; Polar, cylindrical and spherical unit vectors are used a lot, but they vary with angles so when you're summing up ("integrating" ) contributions from charges at different positions the vectors point in various ways; Therefor you have to switch to $(\hat{x},\hat{y},\hat{z})$ unit vectors that aren't functions of angles $\theta$ and $\varphi$ which means you can pull vectors $\hat{x},\;\hat{y},\;\hat{z}$ out of the integral.

(**)You can use the older post where I hinted what is the range of $r$.

Cheers!

P.S. You can vary the distance $d$ for values less than $(R:=radius \; \; of\; \; the\; \; sphere)$ and more than $R$ to convince yourself that Gauss law really works, it should be the same setup with different integral bounds.

Last edited: Aug 23, 2016
12. Aug 23, 2016

### Dr Transport

$\vec{E}(\vec{r}) = \frac{1}{4\pi\epsilon_{0}}\int\int\int\frac{\rho(\vec{r}')(\vec{r} - \vec{r}')}{|\vec{r} - \vec{r}'|^{3/2}} d\tau'$ where $d\tau'= r'^2 dr \sin(\theta')d\theta' d\phi'$. The definition of $\vec{r}'$ is $x'\hat{x} + y'\hat{y} + z'\hat{z}$ with the corresponding definition for $\vec{r}$. Plug the definitions of $x, y, z$ and $x', y', z'$ in spherical coordinates and do the math by integrating over the primed (source points). No need to start with the potential. Do not mess with the unit vectors, if you do the integrals correctly, the $\hat{r}$ should pop out at the end.