# A problem with an integral

1. Aug 11, 2014

### ELB27

1. The problem statement, all variables and given/known data
While trying to find the electric field at a distance z from the center of a spherical surface that carries a uniform surface charge $\sigma$ I got stuck with the following integral (which I'm quite sure is correct):
$$\int_0^\pi \frac{(z-Rcos\theta)sin\theta d\theta}{(R^{2}+z^{2}-2Rzcos\theta)^{3/2}}$$

2. Relevant equations

3. The attempt at a solution
The only idea I had is to let $u=cos\theta ; du=-sin\theta d\theta$,then the integral becomes:
$$\int_0^\pi \frac{(Ru-z)du}{(R^{2}+z^{2}-2Rzu)^{3/2}}$$
and now I'm stuck. This looks very similar to a partial fractions problem except there is a square root in the denominator and if I understand correctly I'm not allowed to use partial fractions in this case.

Any help will be appreciated!

2. Aug 11, 2014

### Mogarrr

You want to integrate with respect to which variable?

3. Aug 11, 2014

### ELB27

preferably $\theta$ but if my substitution of $u$ is of any good than $u$ will do also.

4. Aug 11, 2014

### Simon Bridge

That looks sort-of familiar ... if you're sure, I'll start from there.

Remember that z does not depend on u in your last integral, so it has form $$\int \frac{ax-b}{(c-dx)^{3/2}}\;\text dx$$
... your main problem is to get rid of the square-root in the denominator.
How would you normally do that?

Last edited: Aug 11, 2014
5. Aug 11, 2014

### ELB27

substitute $$x=\frac{c}{d}sinu$$
EDIT: no, that's not correct, no 2nd power... perhaps multiply and divide by the square root. Am I allowed to use partial fractions with a square root in the numerator?

Last edited: Aug 11, 2014
6. Aug 11, 2014

### Simon Bridge

You do want to get rid of the root before attempting partial fractions.
How about $u^2=c-dx$ or $dx=c\sin^2\phi$

Aside: I probably should not have used "d" as a constant :(

7. Aug 11, 2014

### ELB27

Alright, substituting $v^2=c-gx$ (replacing $d$ with $g$) I am finally able to integrate and simplify to get the desired result:
$$\int\frac{\frac{ac-av^{2}}{g}-b}{v^{3}} \frac{-2v}{g} dv = \int\frac{2a}{g^{2}}dv - \int\frac{2ac}{g^{2}v^{2}}dv + \int\frac{2b}{gv^{2}}dv =\frac{2av}{g^{2}} + \frac{2ac}{g^{2}v} - \frac{2b}{gv} = \frac{1}{z^{2}}\left(\frac{R+z}{|R+z|}-\frac{R-z}{|R-z|}\right)$$

Thank you very much Simon!