To Leibniz

You are given that for constant \(a> 1\), the equation below holds true, \[ \displaystyle \int_0^\pi \dfrac{dx}{a - \cos x} = \dfrac\pi{\sqrt{a^2-1}} \; . \] With this information, find the exact closed form of the integral above.