I am looking for ideas on how to solve this equation: [tex] \nabla \cdot \left( \vec{A} + F \hat{b} \right) = 0 [/tex] where [itex]\vec{A}[/itex] and [itex]\hat{b}[/itex] are known vectors of [itex](r,\theta,\phi)[/itex] and [itex]F[/itex] is the unknown scalar function to be determined. Also, [itex]\nabla \cdot \hat{b} = 0[/itex]. So the equation can also be expressed as [tex] (\nabla F) \cdot \hat{b} + \nabla \cdot \vec{A} = 0 [/tex] I am trying to solve this numerically, and so I have b and A on a 3D grid. But I would like to avoid using a 3D finite differencing scheme, if there is a way to simplify this to an algebraic equation. I'm thinking it may be possible to expand these vectors in some sort of basis (like vector spherical harmonics?) along with some radial basis functions and then solve for the coefficients of [itex]F[/itex] in terms of the coefficients of [itex]\vec{A}[/itex] or something like that. Does anyone have experience with this type of equation and would know an appropriate basis to use?