If my magnetic vector potential and electric scalar potential follow the Lorenz gauge, then to find the gauge function that does the gauge transformation I have to solve the wave equation. For the wave equation do I have the freedom to solve the PDE for any coordinate system I want then convert after to necessary system or Let's say my magnetic vector potential is in spherical coordinates would I need to solve the spherical wave equation. If I have to solve the spherical wave equation could you give an example of how to solve the spherical wave equation?