= Solution
The condition at infinity gives $C_{\rm out}=0$. Matching the <electric potential> at $r=a$ gives
$$
\frac{k}{2a}+C_{\rm in}=-\frac ka,
\qquad C_{\rm in}=-\frac{3k}{2a}.
$$
Consequently
$$
\boxed{V(r)=\begin{cases}
\dfrac{k}{2a^3}(r^2-3a^2),&0\leq r<a,\\
-\dfrac kr,&r\geq a.
\end{cases}}
$$
This <function> is finite and differentiable at the origin. At the joining radius, both $V$ and $V'$ match, giving $V(a)=-k/a$ and $V'(a)=k/a^2$. Thus the <electric field> is continuous there as well as being conservative on each side. This is the <potential of a uniform spherical source>, with source coefficient $3k/a^3$.
\Image[/past-exam-of-the-mathematics-course-of-the-year-1-of-the-natural-sciences-course-of-the-university-of-cambridge/2012/paper-2-radial-potential.png]
{title=Continuous radial potential and inward electric field, normalized at the sphere boundary}
Back to article page