$X_1, ... X_n$ are an iid sample from a normal population whose mean and variance are unknown, and let $S^2 = \frac{1}{n}\sum_{i=1}^n (X_i-\bar{X})^2$. Suppose $1 - \alpha = P(\frac{\sqrt nS}{\sqrt a} \leq \sigma \leq \frac{\sqrt n S}{\sqrt b})$ such that $[\frac{\sqrt nS}{\sqrt a}, \frac{\sqrt n S}{\sqrt b}]$ is a $1 - \alpha$ confidence interval of $\sigma$. Show that the values of a and b that minimises the length of the CI satisfies $a^{n/2}e^{-a/2} - b^{n/2}e^{-b/2} = 0$.
What I have: I know that $\frac{nS^2}{\sigma^2} \sim \chi^2_{df = n-1}$. The equation is reminiscient of the $\chi^2$ pdf, and the furthest I've got so far is:
$$\frac{1}{2^{{(n-1)}/{2}} \Gamma(\frac{n-1}{2})}\int_a^b x^{\frac{n-1}{2}-1} e^{-\frac{x}{2}} dx = 1 - \alpha $$
One thing I've considered is to take partial derivatives wrt b on both sides, using the Fundamental Theorem of Calculus on the right, which allows me to show that $b^{n/2}e^{-b/2} = 0$; then do the same process, taking derivatives wrt a to show that $a^{n/2}e^{-a/2} = 0$. Obviously, 0-0=0, but I feel the answer can't be that obvious, so there must be something wrong with this answer.
Can someone help me with this?