What's the $n$-th derivative of $\ln(\sin(x))$? I want to find the $n$-th derivative of $\ln(\sin x)$, i.e.
$$
\frac{d^n\ln(\sin x)}{dx^n}
$$
where $x\in (0,\pi/2)$ such that $\sin x>0$. To make the problem definitely, $x=\pi/4$ is assumed. In wolframalpha, we know that for $n=1,2,\cdots$, we have $1,-2,4,-16,80,-512,\cdots$. So, what's the general behavior of the derivative w.r.t. $n$?
 A: Hint. One may observe that
$$
\frac{d\ln(\sin x)}{dx}= \cot x \tag1
$$ gives
$$
\left.\frac{d^n\ln(\sin x)}{dx^n}\right|_{\large x=\frac{\pi}4}=\left.\frac{d^{n-1}}{dx^{n-1}}\left( \cot x\right)\right|_{\large x=\frac{\pi}4}\tag2
$$  An approach is to use the reflection formula for the digamma function:
$$
\cot{ x}=\frac1\pi\left(\psi\left(1-\frac{x}{\pi}\right)-\psi\left(\frac{x}{\pi}\right)\right)\tag3
$$
Then, for $x$ sufficiently near $\dfrac{\pi}4$, we have
$$
\begin{align}
\cot{x}
&=\frac1\pi\left(\psi\left(1-\frac{x}{\pi}\right)-\psi\left(\frac{x}{\pi}\right)\right)\\
&=\frac1\pi\int^1_0\frac{t^{x/\pi-1}-t^{-x/\pi}}{1-t}\:{\rm d}t\\
&=\frac1\pi\sum_{k=0}^\infty\int^1_0\left(t^{x/\pi+k-1}-t^{-x/\pi+k}\right){\rm d}t\\
&=\sum_{k=0}^\infty\left(\frac{1}{x+k\pi}+\frac{1}{x-(k+1)\pi}\right)\\
&=\sum_{k=0}^\infty\left(\frac{1}{x-\pi/4+(k+1/4)\pi}+\frac{1}{x-\pi/4-(k+3/4)\pi}\right)\\
&=\sum^\infty_{k=0}\sum^\infty_{n=0}\left(\frac{(-1)^n}{\pi^{n+1}(k+1/4)^{n+1}}-\frac{1}{\pi^{n+1}(k+3/4)^{n+1}}\right)\left(x-\frac{\pi}4\right)^n\\
&=1+\sum^\infty_{n=1}\frac{(-1)^n\zeta(n+1,1/4)-\zeta(n+1,3/4)}{\pi^{n+1}}\left(x-\frac{\pi}4\right)^n
\end{align}
$$ where $\zeta(\cdot,\cdot)$ is the Hurwitz zeta function. 
Thus, by the Taylor series expansion formula, one gets, for $n=2,3,4,\cdots$,

$$
\left.\frac{d^n\ln(\sin x)}{dx^n}\right|_{\large x=\frac{\pi}4}=(n-1)!\:\frac{(-1)^{n-1}\zeta(n,1/4)-\zeta(n,3/4)}{\pi^{n}}\tag4
$$ 

which one may eventually rewrite as

$$
\left.\frac{d^n\ln(\sin x)}{dx^n}\right|_{\large x=\frac{\pi}4}=(-1)^{n(n-1)/2}\left(2^{n-1}E_{n-1}+2^{2n-1}\left(2^n-1\right)\frac{B_n}n\right) \tag5
$$ 

where $E_n$ and $B_n$ are Euler and Bernoulli numbers respectively.
