How could I find the vector potential in cylindrical coordinates? In a physics problem I'm asked to find the vector potential $\vec{A}$ given that magnetic field is $\vec{B}=\dfrac{k \mu_0 s^3}{4}\hat{\phi}$ where $k$ and $\mu_0$ are constants.
I know that $\nabla \times \vec{A}=\vec{B}$.
So when I unravel the operator,
$\dfrac{1}{s}\dfrac{\partial A_{z}}{\partial \phi}=\dfrac{\partial A_{\phi}}{\partial z}$,
$\dfrac{\partial A_s}{\partial z}-\dfrac{\partial A_z}{\partial s}=\dfrac{k \mu_0 s^3}{4}$, $\dfrac{\partial A_s}{\partial \phi}=\dfrac{\partial (sA_{\phi})}{\partial s}$.
As you could see, I'm not sure what to do from here.  Also, I am given the current per unit area $\vec{J}=ks^2\hat{z}$ where I could find $\vec{A}$ from $\nabla^2 \vec{A}=-\mu_0\vec{J}$, but I think it's an even messier route. Any instructions on how to proceed or an easier method to find $\vec{A}$ are appreciated.
 A: Here's a hint: 
Note first that the solution $\vec{A}$ that you seek is defined only up to an additive gradient. In other words, if $\vec{A}$ is a solution to your problem, then so is $\vec{A}' = \vec{A} + \nabla\xi$, where $\xi = \xi(s, \phi, z )$ is differentiable once. This is true because $\nabla \times \nabla\xi = 0$.
These represent a family of vector potentials that result in the same physical field $\vec{B}$ on taking the curl (gauge invariance). You're basically at complete liberty to choose any $\xi$ you please as long as its first derivative exists. Substitute the expression for $\vec{A}'$ into the 3 equations you obtained from the curl, and make intelligent choices for the partial derivatives of $\xi$. You should end up with a system of PDEs that are easier to solve than the extremely complex ones that the original curl gave you.
I worked through it and got:
$$
\vec{A} = \left[ -\frac{k\mu_0 s^4}{16} + f(z) \right] \hat{z}
$$
where $f(z)$ is any function of $z$. You can even toss it away if you like!
