This was a problem in our physics final exam and I still haven't figured it out completely. A long non-conductive cylindrical shell with inner radius "a" and outer radius "b" is surrounded by another cylindrical shell with inner radius "c" and outer radius "d" such that a<b<c<d. The inner shell has a charge density of $$\rho=-Br $$ and the outer shell has a density of $$\rho=Ar.$$ $$(A, B>0)$$
Consider infinity to have zero potential.
find the Electric potential where:
a) r>d
b) c<r<d
c) a<r<b
d) r<a
e) find the ratio of A to B such that Electric Potential would be zero in the region where r>d.
I don't know if it's correct butfor part a, I tried to solve it in this way(I don't know if it s correct). We can find the electric field in this region using gauss's law: $$E_5=\frac {1}{3\epsilon_0 r}A(d^3-c^3)-B(d^3-a^3)$$ and then considering P as a point located in this region(r>d) with distance r from the center: $$V_p-V_\infty = +\int_{\infty}^r E_5.dr $$ And I get stuck in this part, where the right-hand integral is undefined. I don't know whether I'm making a mistake somewhere or there's something wrong with the question.