We consider the inhomogeneous div-curl system (i.e. to find a vector field with prescribed div and curl) in a bounded star-shaped domain in $$\mathbb {R}^3$$ . An explicit general solution is given in terms of classical integral operators, completing previously known results obtained under restrictive conditions. This solution allows us to solve questions related to the quaternionic main Vekua equation $$DW=(Df/f)\overline{W}$$ in $$\mathbb {R}^3$$ , such as finding the vector part when the scalar part is known. In addition, using the general solution to the div-curl system and the known existence of the solution of the inhomogeneous conductivity equation, we prove the existence of solutions of the inhomogeneous double curl equation, and give an explicit solution for the case of static Maxwell’s equations with only variable permeability.