# Closed form expression for $Tr\left[ (\mathbf{DW})^k \right]$

Given the $$N \times N$$ diagonal matrices $$\mathbf{D}$$ and $$\mathbf{W}$$ as defined below

$$\begin{split} \mathbf{DW} &= \left[ \begin{array}{cccc} \beta_{1} & 0 & \cdots & 0 \\ 0 & \beta_{2} & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \beta_{N} \\ \end{array} \right] % \left[ \begin{array}{cccc} M & \sum_{m=0}^{M-1}{\mbox{e}^{-i m \pi \theta_{1,2}}} & \cdots & \sum_{m=0}^{M-1}{\mbox{e}^{-i m \pi \theta_{1,N}}} \\ \sum_{m=0}^{M-1}{\mbox{e}^{-i m \pi \theta_{2,1}}} & M & \cdots & \sum_{m=0}^{M-1}{\mbox{e}^{-i m \pi \theta_{2,N}}}\\ \vdots & \vdots & \ddots & \vdots \\ \sum_{m=0}^{M-1}{\mbox{e}^{-i m \pi \theta_{N,1}}} & \sum_{m=0}^{M-1}{\mbox{e}^{-i m \pi \theta_{N,2}}} & \cdots & M \\ \end{array} \right] \end{split}$$

where $$\theta_{i,j} = \theta_{j,i}$$ and $$\theta_{i,j} = 0$$ when $$i = j$$.

I would like to know if there is a closed form for $$$$Tr\left[ (\mathbf{DW})^k \right],$$$$ where $$Tr[.]$$ is the matrix trace operator and $$k$$ is an integer greater than or equal to 1.

So far I have been able to manually find up to $$Tr\left[ (\mathbf{DW})^3 \right]$$ but it gets too cumbersome for $$k \geq 4$$. But perhaps, hopefully, someone out there knows a closed form for this.