# Homework Help: Electric field inside and outside a charged cylinder

1. Sep 18, 2016

### Taylor T

1. The problem statement, all variables and given/known data

WITHOUT using Gauss's law calculate the electric field at all points outside and inside an infinite cylinder with circular cross section of radius b and charge density ρ
Hint: Use cylindrical coordinates and place the target charge on the x axis..

2. Relevant equations
$$E = \frac{1}{4\pi \varepsilon _{0}}\int _{v}\frac{\rho\vec{R} }{\left \| R \right \|^{3}}$$

3. The attempt at a solution
I started with trying to find the field outside first:

I figured the best way to do this would be to find R between any point inside the cylinder to the point outside in the following manner. Let r(r,0,0) lie on the x axis.
$$\vec{r}=r\hat{r}+0\hat{\theta}+0\hat{z} \\ \vec{r'}=r'\hat{r}+\theta\hat{\theta}+z\hat{z}\\$$
Let P be the vector between r'\hat{r} and r using the law of cosines:
$$P = \sqrt{r'^{2}+r^{2}-2rr'cos(\theta)}$$
Let h be the z height from r' to r
$$h = (0-z')\hat{z}$$

thus R by the pythagorean theorem must be $$R = \sqrt{h^{2}+P^{2}}$$
simplifying and plugging in R
$$R = \sqrt{(-z)^{2}+r'^{2}+r^{2}-2rr'cos(\theta)}$$

at this point I am a little bit lost, I know that the R value should be a vector but it is a scalar, I know that the field will be only in the $\hat{r}$ direction. the differential charge $$dq = \rho dv=\rho r'd\theta'dr'dz'$$

I'm not sure where I am going wrong, The integral I would end up with is:
$$E = \frac{1}{4\pi \varepsilon _{0}}\int_{z=-\infty }^{\infty}\int_{r=0}^{a}\int_{\theta=0}^{2\pi}\frac{\rho R}{R^3}\hat{r}$$
This integral is not only difficult but goes to zero as the z^2 integrated at both inifinites will send the integral to zero.
Here is an image I have drawn for convenience: https://i.sli.mg/CRVdar.png

2. Sep 19, 2016

### Simon Bridge

... you have defined R to be the length of a vector havn't you?.

The hint says to use cylindrical coordinates and put the test charge on the x axis ... that is $\theta=0$
Choose z=0, for the target location, as well - for convenience (does the choice of z matter?) ... try sketching the overhead position.
Target position is at $\vec r = (x,0,0)$ in cylindrical coords

Note: the electric field element at position $\vec r$ due to charge element $dq$ at position $\vec p$ is given by:
$$d\vec E = \frac{k(\vec p - \vec r)\;dq}{|\vec p - \vec r|^3}$$ ... (check) integrate over all possible values of $\vec p$.
The cylindrical-coords area element on the surface of a cylinder radius $R$ is $dA = Rd\theta dz$
... you can often exploit the symmetry of the situation to anticipate how the vector's will integrate out.

ie. what will happen to the z-components of the field at $\vec r$ after during the integration?

3. Sep 19, 2016

### Taylor T

My thinking behind R needing to be a scalar is the lack of directionality after calculation because there are no unit vectors left. I know that due to the symmetry of the object that it should only be in the [TeX]\hat{r}[/TeX] direction.

My r vector assumes this placement of the test location. But is the calculation of the big R vector reasonable? When using cylindrical coordinates the vector subtraction does not necessarily (and in most cases should not ) provide the distance vector necessary between the two points. Is my calculation of this distance vector in cylindrical coordinates reasonable?

When integrating this quantity one finds the Z causes the fractions to approach zero at both evaluations. How is this possible?

4. Sep 19, 2016

### Simon Bridge

That's the reasoning... but you have the wrong $\theta$ ...
It is usually clearer is you define the radius of the cylinder ... if you call it (you've taken all the good letters) c,
then $p^2 = c^2+r^2 + 2cr\cos\theta$ and $R^2=p^2+z^2$

5. Sep 19, 2016

### rude man

I would try to solve Poisson's equation instead of dealing with the E field directly: ∇2Φ = ρ.
Then E = - ∇Φ.
Of course, use the hint they gave you. And exploit symmetry, making the equation relatively simple to solve.
(I haven't worked it yet but will if you show interest).

6. Sep 19, 2016

### Taylor T

I would have used gauss law or Poisson's equations but because of its location in the text it must be completed using coulombs law sadly.

In response to simon, would I not need to integrate through the radius of the cylinder rather than use it in calculation of R as it is a solid cylinder rather than a shell?

7. Sep 19, 2016

### rude man

Yuk! But I decided to try to work the problem the Poisson way so if you post your answer I'm willing to compare with mine. Have fun!
EDIT: tried it, failed. The potential → ∞ at r=0. Should have anticipated this which is typical of any infinite-dimensioned media. So, good luck with Coulomb!

Last edited: Sep 19, 2016
8. Sep 19, 2016

### TSny

Yes. Here the $\hat{r}$ direction is the $\hat{i}$ direction, where $\hat{i}$ is a unit vector in positive x direction.

So, going back to $$\vec{E} = \frac{1}{4\pi \varepsilon _{0}}\int _{v}\frac{\rho\vec{R} }{\left \| R \right \|^{3}}$$ you need to evaluate $$\vec{E} \cdot \hat{i} = \frac{1}{4\pi \varepsilon _{0}}\int _{v}\frac{\rho\vec{R} \cdot \hat{i} }{\left \| R \right \|^{3}}$$.

Can you simplify $\vec{R} \cdot \hat{i}$ in terms of the cylindrical coordinates ($r'$, $\theta'$, $z'$) of the element of charge in the cylinder and the distance $r$ to the field point?

The notation can be a bit confusing. The vector $\vec{r} '$ that is drawn in your picture in post #1 is actually $\vec{r} ' = r ' \hat{r} ' + z \hat{z}$, where $r'$ is one of the cylindrical coordinates of the element of charge and the unit vector $\hat{r}'$ is a unit vector in the xy plane that makes an angle $\theta'$ to the x axis. So, the cylindrical coordinate $r'$ is not the magnitude of vector $\vec{r}'$ drawn in your picture nor is $\hat{r}'$ in the same direction as $\vec{r}'$. It might be less confusing to use a different symbol for the cylindrical coordinate $r'$, perhaps $s'$:

($r'$, $\theta'$, $z'$) → ($s'$, $\theta'$, $z'$).

Then $\vec{r}' = s' \hat{s}' + z \hat{z}$.

Last edited: Sep 19, 2016
9. Sep 20, 2016

### Simon Bridge

Notation can get confusing...
Since texts want to use $\vec r$ as a general vector, and they want to be able to use the convention that $r=|\vec r|$, they generally do not like to call the radial component "r" ... the books I've seen use $\rho$ for this. Thus, the generic vector in cylindrical coordinates is $\vec r = (r_\rho, r_\theta, r_z)$ and $r^2=r_\rho^2+r_z^2$ easily enough. It is a common shorthand, since $\vec r$ is understood to be a position vector, to write $\vec r = (\rho,\theta,z)$.

The problem statement unfortunately uses $\rho$ for the surface charge density ... which we'd usually call $\sigma$, in part, to avoid this confusion.
The situation is further confused by the choices made in the working so far ...

Changing to a clearer notation: ... the problem just says to find the electric field everywhere due to a cylindrical shell of charge density $\sigma$.
We are free to choose our variables, lets pick R for the radius of the cylinder and define other variables as we go.

In general, the electric field element $d\vec E (\vec r)$ due to charge element $dq(\vec p)$ (charge at position $\vec p$) is given by $$d\vec E(\vec r) = \frac{k\sigma\;dA}{|\vec r - \vec p|^3}(\vec r - \vec p)$$ ... strategy is to integrate over all the charge present, choosing cylindrical-polar coords with z-axis along the cylinder axis.
Symmetry suggests that the field should depend on the radial distance alone - so choose $\vec r = (r,0,0)$ and $\vec p = (R,\theta,z)$ and integrate over all $\vec p$. (It is common for texts to use $\vec r'$ in the role I have chosen for $\vec p$ ... that's OK and normal, I just like to avoid primed variables where I feel I can get away with it and calling a position "p" has a nice ring to it.)

Notice, in this specific case: $|\vec r| = \sqrt{r_\rho^2 + r_z^2} = r$ ... which is handy, and the definitions have been finessed to produce this result.

We can compute $|\vec r - \vec p|$ from our knowledge of the geometry of triangles ... we know that $|\vec p| = p$ for instance. We could use the cosine rule on $\vec p$ and $\vec r$ if we knew the angle between them - which we don't, not directly. Anyway, even if we did, we would still need the answer in terms of the angle $\theta$ - which is actually the angle between $\vec p'$ (the projection of $\vec p$ onto the x-y plane) and $\vec r$
ie. $\vec p' = \vec p - z\hat k = (R,\theta,0)$ and $\vec r\cdot\vec p' = rp\cos\theta$ holds... etc.

So we can use the cosine rule between $\vec p'$ and $\vec r$, and use regular pythagoras to get the length we want ($\hat k \perp \vec p'$)
Thus: $|\vec r - \vec p|^2 = z^2 + R^2 + r^2 + 2Rr\cos\theta$ ... which is as far as we've got. (Check my geometry - I don't always get this right.)

Recall: $z$ and $\theta$ are the variables we are integrating over... this will leave "r" as the unknown that E varies with respect to.
The next issue is to deal with the vector sum that results from the integration. We'd rather not do that by brute force through the algebra, so we turn to geometry for help like we did for the magnitude above, we can also exploit our understanding of the physics of electric fields.

From the symmetry, we expect the resulting field to have no $\theta$ or $z$ directions, and that the remaining direction has no dependence on $\theta$ or $z$. So we expect $\vec E = E(r)\hat r: \hat r : \hat r = \vec r/r$ ... note that $d\vec E = \big(dE_\rho(\rho,\theta,z), dE_\theta(\rho,\theta,z), dE_z(\rho,\theta,z)\big)$ ... which should suggest a strategy.

Failing that ... just look at the situation for a ring of charge and see what happens, then investigate the case that the ring is not in the x-y plane.

That is the advise so far...

Last edited: Sep 20, 2016