<s>[INST] Finding the Maximum of the Chi-Square density function Below is a problem which I did and I believe my answer is correct. I would like
somebody to confirm that (if true) and provide some additional comments about my style.
Thanks,
Bob
Problem:
Show that $\chi^2_v$ pdf has a maximum at $v - 2$ if $v > 2$.
Answer:
The $\chi^2_v$ pdf for $x >= 0$ is:
\begin{eqnarray*}
 f_(x) &=& \begin{cases}
  \frac{ x^{\frac{v}{2} - 1}e^{-\frac{x}{2}}} {2^{\frac{v}{2}} \Gamma(v/2)}
  & \text{for } x >= 0 \\
  0 & \text{otherwise} \\
 \end{cases} \\
\end{eqnarray*}
\newline
Now to find its maximum we compute $f'(x)$.
\begin{eqnarray*}
 f'(x) &=&
 \frac{\big(-\frac{1}{2}\big)x^{\frac{v}{2} - 1}e^{-\frac{x}{2}} + ( \frac{v}{2} - 1) x^{\frac{v}{2} - 2}e^{-\frac{x}{2}}} {2^{\frac{v}{2}} \Gamma(v/2)} \\
\end{eqnarray*}
Now we set $f'(x) = 0$.
\begin{eqnarray*}
 \frac{\big(-\frac{1}{2}\big)x^{\frac{v}{2} - 1}e^{-\frac{x}{2}} + ( \frac{v}{2} - 1) x^{\frac{v}{2} - 2}e^{-\frac{x}{2}}} {2^{\frac{v}{2}} \Gamma(v/2)} &=& 0 \\
 \big(-\frac{1}{2}\big)x^{\frac{v}{2} - 1}e^{-\frac{x}{2}} + ( \frac{v}{2} - 1) x^{\frac{v}{2} - 2}e^{-\frac{x}{2}} &=& 0 \\
 \big(-\frac{1}{2}\big)x^{\frac{v}{2} - 1} + ( \frac{v}{2} - 1) x^{\frac{v}{2} - 2} &=& 0 \\
 \big(-\frac{1}{2}\big)x + \frac{v}{2} - 1 &=& 0 \\
 x &=& v - 2 \\
\end{eqnarray*}
Now we know that $x = v - 2$ is an extreme point. The question is it a maximum
or a minimum. Since $f(0) = 0$ and $f(v-2) > 0$ we conclude that $x = v - 2$ is a maximum.
 [/INST] What you did makes a lot of sense, but what if it $v-2$ was a saddle point? 
A better way to see it is using the double derivative test, i.e. 
\begin{equation}
 f'(x) =
 \frac{\big(-\frac{1}{2}\big)x^{\frac{v}{2} - 1}e^{-\frac{x}{2}} + ( \frac{v}{2} - 1) x^{\frac{v}{2} - 2}e^{-\frac{x}{2}}} {2^{\frac{v}{2}} \Gamma(v/2)} 
\end{equation}
Then 
\begin{equation}
 f''(x)
 =
 \frac{1}{2^{\frac{v}{2}} \Gamma(v/2)}
 \dfrac{x^{\frac{v}{2}-3}\left(x^2+\left(4-2v\right)x+v^2-6v+8\right)\mathrm{e}^{-\frac{x}{2}}}{4}
\end{equation}
At the extremum, we have
\begin{equation}
 f''(v - 2) 
 =
 \frac{(v-2)^{\frac{v}{2}-3}}{4(2^{\frac{v}{2}} \Gamma(v/2))}
 ( (v-2)^2 -2(v-2)(v-2)  + (v-2)(v-4) )e^{-\frac{v-2}{2}}
\end{equation}
that is
\begin{equation}
 f''(v - 2) 
 =
 \frac{(v-2)^{\frac{v}{2}-3}e^{-\frac{v-2}{2}}}{4(2^{\frac{v}{2}} \Gamma(v/2))}
 ( -(v-2)^2  + (v-2)(v-4) )
\end{equation}
which is 
\begin{equation}
 f''(v - 2) 
 =
 -2
 \frac{(v-2)^{\frac{v}{2}-3}e^{-\frac{v-2}{2}}}{4(2^{\frac{v}{2}} \Gamma(v/2))}
 (v-2)
\end{equation}
For $v > 2$ it is easy to see that $f''(v-2)  < 0$, hence it is a maximum. 
</s>