I would like to evaluate this summation:
\begin{align} \sum_{j=1}^{NM}\left[(u_{j_x} + u_{j_y})^2 - 2(1-\rho) u_{j_x} u_{j_y}\right], \end{align}
where $NM$ is some number greater than or equal to $N$, $u_{j_x} = \cos[\theta]\mu_{j_x} - \sin[\theta]\mu_{j_y}$ and $u_{j_y} = \sin[\theta]\mu_{j_x} + \cos[\theta]\mu_{j_y}$ and with
\begin{split} \mu_{j_x} &= \left[(j - 1)\%N - \left(\frac{N-1}{2}\right)\right] d_x, \\ \mu_{j_y} &= \left[\left\lceil{\frac{j}{N}}\right\rceil+ \left(\frac{N+1}{2}\right)\right] d_y. \end{split}
I have plot the result in Mathematica
and have seen that the first term in the summation is a constant term and the second term oscillates. I would like to get some analytic expressions for the sum rather than simulating it numerically. The script I refer to is the following:
rotation = {};
rotation = Append[rotation, {"Theta", "sumterm"}];
μx[i_, n_, dx_] := (Mod[i - 1, n] + 1 - (n + 1)/2) dx;
μy[i_, n_, dy_] := (Ceiling[i/n] - (n + 1)/2) dy;
μxn[i_, n_, dx_, dy_, θ_] := Cos[θ] μx[i, n, dx] - Sin[θ] μy[i, n, dy];
μyn[i_, n_, dx_, dy_, θ_] := Sin[θ] μx[i, n, dx] + Cos[θ] μy[i, n, dy];
n = 10;
m = 10;
s = m n;
dx = 1;
dy = 1;
ρ = 0.0;
Do[
sumterm =
Sum[
(μxn[i, n, dx, dy, θ] + μyn[i, n, dx, dy, θ])^2 -
2 (1- ρ) μxn[i, n, dx, dy, θ] μyn[i, n, dx, dy, θ],
{i, 1, s, 1}];
rotation = Append[rotation, {θ // N, sumterm}],
{θ, 0 Degree , 360 Degree, 2 Degree}];
ListLinePlot[rotation, PlotRange -> All]