How to evaluate closed form of $\int_{0}^{\pi}\sin(x)\ln^n\left(k\cos\left({x\over 2}\right)\right)\mathrm dx=F(n,k)?$ How can we evaluate the closed form for this integral

$$\int_{0}^{\pi}\sin(x)\ln^n\left(k\cos\left({x\over 2}\right)\right)\mathrm dx=F(n,k)\color{red}?\tag1$$

Where $n\ge0$ and $k>0$
Given that the first few values of $F(n,k)$ are:
$$F(0,k)=2$$
$$F(1,k)=2\ln(k)-1$$
$$F(2,k)=2\ln^2(k)-2\ln(k)+1$$
$$F(3,k)=2\ln^3(k)-3\ln^2(k)+3\ln(k)-{3\over 2}$$
$$F(4,k)=2\ln^4(k)-4\ln^3(k)+6\ln^2(k)-6\ln(k)+3$$
It may take the closed form of:

$$F(n,k)=\sum_{j=0}^{n}(-1)^ja_j\ln^j(k)$$

$u={x\over 2}\implies 2du=dx$
$$2\int_{0}^{\pi/2}\sin(2u)\ln^n(k\cos(u))\mathrm du\tag2$$
$v=k\cos(u)\implies du=-{dv\over k\sin(u)}$
$${4\over k^2}\int_{0}^{k}v\ln^n(v)\mathrm dv\tag3$$
$$I_n=\int v\ln^n(v)\mathrm dv={v^2\over 2}\ln^n(v)-{n\over 2}\int v\ln^{n-1}(v)\mathrm dv\tag4$$
$$I_n={v^2\over 2}\ln^n(v)-{n\over 2}I_{n-1}\tag5$$
 A: We can evaluate the integral of interest by making use of the identity
$$\frac{d}{da}\int_0^k v^a\,dv=\int_0^k v^a\log(v)\,dv\tag 1$$
Using induction, it is easy to see from $(1)$ that
$$\frac{d^n}{da^n}\int_0^k v^a\,dv=\int_0^k v^a\log^n(v)\,dv\tag 2$$
whence setting $a=1$ in $(2)$ yields
$$\left.\left(\frac{d^n}{da^n}\int_0^k v^a\,dv\right)\right|_{a=1}=\int_0^k v\log^n(v)\,dv\tag 3$$
Applying $(3)$ and Leibniz's Rule for product differentiation reveals
$$\begin{align}
F(n,k)&=\frac4{k^2}\int_0^k v\log^n(v)\,dv\\\\
&=\frac4{k^2}\left.\left( \frac{d^n}{da^n}\int_0^k v^{a}\,dv\right)\right|_{a=1}\\\\
&=\frac4{k^2}\left.\left( \frac{d^n}{da^n}\frac{k^{a+1}}{a+1}\right)\right|_{a=1}\\\\
&=\frac4{k^2}\left.\left( \sum_{\ell=0}^n \binom{n}{\ell}\frac{d^{n-\ell}k^{a+1}}{da^{n-\ell}}\frac{d^\ell(a+1)^{-1}}{da^\ell}\right)\right|_{a=1}\\\\
&=\frac4{k^2}\sum_{\ell=0}^n \binom{n}{\ell}\,k^2\log^{n-\ell}(k)(-1)^\ell \ell!2^{-(\ell+1)}\\\\
&=\sum_{\ell=0}^n \binom{n}{\ell} \frac{(-1)^\ell(\ell!)\log^{n-\ell}(k)}{ 2^{(\ell-1)}}
\end{align}$$
And we are done!
A: Since $\int_{0}^{1}v\log^n(v)\,dv \stackrel{v\mapsto e^{-t}}{=} \int_{0}^{+\infty}(-1)^n t^n e^{-2t}\,dt = \frac{(-1)^n}{2^{n+1}} n!$ we have:
$$\begin{eqnarray*}F(n,k)=\frac{4}{k^2}\int_{0}^{k}v\log^n(v)\,dv&\stackrel{v\mapsto ku}{=}&4\int_{0}^{1}u\left(\log u+\log k\right)^n\,du\\&=&4\sum_{j=0}^{n}\binom{n}{j}\left(\log k\right)^{n-j}\int_{0}^{1}u\log^j(u)\,du\\&=&2\sum_{j=0}^{n}\binom{n}{j}(\log k)^{n-j}\frac{(-1)^j j!}{2^{j}}\\&=&\frac{n!}{2^{n-1}}\sum_{j=0}^{n}\frac{(2\log k)^{j}(-1)^{n-j}}{j!}.\end{eqnarray*}$$
