How would one prove the following statement?
$f(x)=\frac x{\sin x}$ is convex in $[0,\pi)$.
After having posted the question, I came upon two proofs which I have now posted in the answer below. I would like to know other proofs as well, even the brute force ones. Can we utilize the identity $\frac{\pi x}{\sin(\pi x)}=\Gamma(1+x)\Gamma(1-x)$ where $\Gamma$ is the gamma function? How about the fact that $f$ is the reciprocal of the sinc function with all the nice properties? Or can we represent $f$ by an integral $\int g(t,x)d\mu(t)$ where $g(t,x)$ is convex with respect to $x$ for every $t$ and $\mu(t)$ is a measure of $t$?
Here is a brute force proof via taking the second derivative. \begin{align} f''(x) &= \frac1{\sin^3x}\big(x(1+\cos^2 x)-2\sin x\cos x\big) \\ &= \frac1{\sin^3 x}\int_0^x \sin t(3\sin t-2t\cos t)\,\mathrm dt \\ &>0 \end{align} since $\tan t>\frac23t,\forall x\in\big[0,\frac\pi2\big)$ and $\cos t<0,\,\forall x\in\big(\frac\pi2,\pi\big)$.