I've been working on finding the closed form of this:$$\sum_{k=1}^nk\sin^2(kx).$$ Using the fact that:$$\sum_{k=1}^nku^k={u\over (1-u)^2}\bigg[nu^{n+1}-(n+1)u^n+1\bigg]\forall u\ge 1\quad (1)$$
I started by substituting $$cos(2kx)={exp(i(2kx))+exp(-i(2kx))\over 2}\quad \quad (2)$$
Which helped me simplify down into $${1\over4}\bigg[n(n+1)-\sum_{k=1}^nk(e^{i2x})^k-\sum_{k=1}^nk(e^{-i2x})^k\bigg]$$ Then I was able to apply $(1)$ to it along with a multiplication of a nifty one in the form of ${exp(i4x)\over exp(i4x)}.$
I then was able to simplify down into: $${1\over4}\bigg[n(n+1)+{1\over 2\cos(2x)-1}\bigg(n(2cos(2x))^{n+1}-(n+1)(2cos(2x))^n+2\bigg)\bigg]$$ Question:
I believed this was the closed form. I was told though that It wasn't complete enough because I didn't take into account when $u=1$ Why do I need to take that into account.
If you'd like me to expand my work just tell me and I will expand it.
EDIT:
So I have figured out that I need to consider when $u=1$ and my $u=e^{12x}$ and $u=e^{-i2x}$ So I found that both of my $u$'s equal $1$ when $x=n\pi$ now do I just go back and plug my $x$ into the original summation. Which since $n$ and $k$ are integers it's always going to be a multiple of $\pi$ so my $\sin$ is always going to be $0$ right?
You stated (1) for $u \ge 1$, but in your application $u = e^{2kxi}$ is complex. What you mean is $u \ne 1$. You then have to consider the case $u = 1$ separately. I don't see how you get a denominator of $2 \cos(2x)-1$: I think it should be $\cos(2x)-1$