Electric potential of sphere

(a) I am a little confused about this part. The point at A to B isn't radial. The electric field is radially outward, but if I look at the integral

$$\int_{a}^{b}\mathbf{E}\cdot d\mathbf{s} = \int_{a}^{b}\frac{\rho r}{3\epsilon_0}\mathbf{\hat{r}}\cdot d\mathbf{s}$$

The vector ds and r can't be in the same direction, so do I have to express it in norm form of the dot product? I am afraid to do so. So my wishful thinking answer (since it says it is 2 marks ) is

$$\int_{a}^{b}\mathbf{E}\cdot d\mathbf{s} = \int_{r}^{R} \frac{\rho r}{3\epsilon_0}dr$$

(b) Okay this one isn't too bad, but i am extremely paranoid. So I went back to the definition of potential

$$V = k\int\frac{dq}{d}$$ Since the density is uniform, I simply get $V = \dfrac{kQ}{d}$

Now I just substitute $r$ into equation and get $V = \dfrac{kQ}{r} = \dfrac{Q}{4\pi \epsilon_0r}$.

Note that "d" is the radial distance. I avoided using r or R becuase the picture uses r and R

-
You find the potential as a function of r, and then subtract the potential at the two points, don't do the integral. You did the second problem wrong. – Ron Maimon Aug 9 '12 at 9:01
subtract for part a, for part b, you integrate E from 0 to A along a radial line. The field is ${\rho\over 3}r$, so you get ${\rho\over 6}r^2 + C$ where C is a constant, which is fixed from matching the potential to the potential from the sphere at r=R. – Ron Maimon Aug 9 '12 at 18:34
Misleading is a little harsh--- the problem is testing to see if you understand potential. The answer would be that if both points are outside the sphere. The potential inside isn't $Q/R$ anymore, but you find what it is at any value of r, and then subtract at the two points. – Ron Maimon Aug 9 '12 at 18:42
Also, i just noticed the edit in tags. This isn't really homework, I just picked the problem from an online source. – Hawk Aug 9 '12 at 20:20
Your terms and constants are wrong, try it again. The answer you should get is $V(d)={ kQ\over d}$ for $d>R$, and $V(d) = {3kQ \over 2R^3} - {kQ\over 2R^3} d^2$ for $d<R$. You can check that the two forms match at d=R, and that the derivative of V is the electric field you know from Gauss's law. You can't get rid of the $4\pi$ factors from all the terms if you use both $Q$ and $\rho$, since the $4\pi$ is coming from the volume of the sphere $Q={4\pi R^3\over 3 } \rho$. – Ron Maimon Aug 10 '12 at 1:03

Why are you looking for a radial surface..? Look it as an Equipotential surface (a surface where all points are at same constant electric potential) as it comes with sphere. Hence, you can assume the points A to B as radial to find the potential difference.

-

Use Gauss theorem to get the electric field at a distance r of the center. By symmetry, the electric field is radial and constant on any sphere of radius r, so it is easy to calculate its flux. Then compute the circulation of E between A and B to get Vb-Va

-
Why do I need to calculate the Electric field again? It's given to me. I don't see why the flux plays a role here. – Hawk Aug 9 '12 at 18:16
You are right. I did not properly read the first lines. You only need to calculate the circulation of E from A to B. Advice: choose the path AA'+A'B where A' lies on OA and the same circle than B. – Shaktyai Aug 9 '12 at 20:48