I have been thinking about how to get a general solution for the continuity equation:
$$\frac{\partial \rho(\vec{r},t)}{\partial t}+\vec{\nabla}\cdot\vec{J}(\vec{r},t)=F(\vec{r},t)$$
and I figured the way to proceed is to reduce the problem to one I already know how to solve. Therefore, under the condition that the current density can be expressed as the gradient of some scalar function $V(\vec{r},t)$ (mathematically, $\vec{J}=\vec{\nabla}V$), we would get a laplacian operator in the continuity equation and end up with a Poisson's equation, which we can solve:
$$\frac{\partial \rho}{\partial t}+\nabla^2V=F$$
and regrouping all the terms except for the laplacian:
$$\nabla^2V=G(\vec{r},t)$$
Of course, this solution proposal assumes that $\rho,F$ are known, which can be quite restricting, let alone that we already assumed before that $\vec{J}$ can be expressed as the gradient of a scalar function. Would it be of any interest for me to keep exploring this proposal or is it too restrictive from the beginning? Also, is there a general solution for the continuity equation?
Note: I've already checked this post but it doesn't really apply to my question, and the only answer there is to it has a negative score