This is beyond differential equations, it includes FEA as well. Barrel shape/contour, type of steel, and a bunch of other things.
.is there a "sweet spot " between a given barrel length and velocity nodes....?
yes This is why barrel tuners work and why with every change of load your shot placement will differ, also why floating a barrel works.
In the late 1890's Schutzen shooters would often silver solder their barrels to the 1885 receiver to change the harmonics of the gun, not sure if they knew that is why the gun became more accurate or not though.