I'm doing some self studying of introductory physics, and was working a question from a textbook that has several parts. The first few parts asked me to show that the magnetic field of an infinite current carrying cylinder has the form $\vec{B} = f(r)\begin{bmatrix}0 & z & -y\end{bmatrix}$ if we choose the x axis to be the central axis of the pipe. where $r = \sqrt{y^2 + z^2}$. I was then asked to show that in the empty space interior that $f(r) = \frac{a}{r^2}$, where $a$ is a constant of integration. I succeeded at that as well, following the outline in the textbook, I used the definition of curl as a derivative, computed curl and performed some integration. In summary, I have shown that inside the cylinder $\vec{B} = \frac{a}{r^2}\begin{bmatrix}0 & z & -y\end{bmatrix}$.
However, I'm stuck on what should be a simple corollary of my result, which is to show that the magnetic field inside the cylinder in empty space is always $0$. The hint is that the field at the central axis is $0$ by symmetry, which I understand. But, then I should use my result above for the field inside and the fact that the field is $0$ at the central axis to show it is $0$ everywhere inside. This is supposed to be a simple conclusion to all of the work I did above, but I'm just not seeing it.