# Potential energy of a charge in a magnetic quadrupole field

I have a charged particle of charge $$q$$ that moves with velocity $$\vec{V}$$ from a position $$\vec{r}$$, inside a magnetic quadrupole field of the form: $$\vec{B}=B_{0}(x,y, -2z)$$ The Lorentz force acts upon this particle: $$\vec{f}_{Lorentz}=q\vec{V}\times\vec{B}=qB_0[(-2V_{y}z-V_zy)\hat{x}+(V_zx+2V_xz)\hat{y}+(V_xy-V_yx)\hat{z}]$$ I know the trajectory and velocity of the particle as a function of time $$(\hat{r}(t)$$, $$\hat{V}(t))$$, but I can't manage to find the potential of this force. I suppose that I should use the integral $$V_{Lorentz}=-\int{\vec{F}_{Lorentz}\dot{}d\vec{r}}$$, But i'm not sure how or if maybe I could get a closed expression for this potential.

Thanks!

$$\nabla\times\left(V\times B\right)=V\overbrace{\nabla\cdot B}^{=0}-B\nabla\cdot V + B\cdot\nabla V - V\cdot\nabla B \neq 0$$
$$\vec{V}$$ must make the above zero: otherwise the force may not be written with a scalar potential.