Inversion of the source and vorticity equations for supercavitating hydrofoils