  We study large deviations in interacting quantum liquids with the polytropic
equation of state $P(\rho)\sim \rho^\gamma$, where $\rho$ is density and $P$ is
pressure. By solving hydrodynamic equations in imaginary time we evaluate the
instanton action and calculate the emptiness formation probability (EFP), the
probability that no particle resides in a macroscopic interval of a given size.
Analytic solutions are found for a certain infinite sequence of rational
polytropic indexes $\gamma$ and the result can be analytically continued to any
value of $\gamma\ge 1$. Our findings agree with (and significantly expand on)
previously known analytical and numerical results for EFP in quantum liquids.
We also discuss interesting universal spacetime features of the instanton
solution.
