How could I have guess that $-\frac{1}{2}x\sin(x)=\sum_q q (-1)^q \frac{x^{2q}}{(2q)!} $ In some calculations I ended up with the following series: 
$$\sum_q q (-1)^q \frac{x^{2q}}{(2q)!} $$
I wanted to compute it, I thought it was not really possible, but then I asked mathematica and he magically found me the following result:
$$-\frac{1}{2}x\sin(x)=\sum_q q (-1)^q \frac{x^{2q}}{(2q)!} $$
When I check afterward I agree with the equality. However I would like to know if there are easy trick to see before that it was true.
Same questions for power of $q$, he founds me for example :
$$\sum_q q^2 (-1)^q \frac{x^{2q}}{(2q)!} = -\frac{1}{4} x (\sin (x)+x \cos (x))$$
In summary : before knowing the answer, how could I know that 
$$-\frac{1}{2}x\sin(x)=\sum_q q (-1)^q \frac{x^{2q}}{(2q)!} $$
 A: So your mathematician friend stares a few seconds at your seemingly impossible problem and then just gives you the answer. How on earth did they pull off this black magic? The answer is that it was, of course, not magic at all, they simply applied a couple of easy-to-use standard tricks in their head. You could have done the same if only you knew their tricks! Let's look at two tricks I would have used to solve this problem at a glance. 
The first is so seemingly obvious that it is hardly a trick at all: Try to rewrite the series in terms of something you already know know. In this case, it would have been much easier if the series were:
$$\sum_q(-1)^q\frac{x^{2q}}{(2q)!}=\cos(x)$$
So if only we could somehow multiply this series by $q$, we would be done! This brings us to the second trick: the "differentiate and then multiply by $x$-trick". Since:
$$x\frac{d}{dx}x^n = x\left(nx^{n-1}\right)=nx^n$$
We have for any (convergent) power series:
$$x\frac{d}{dx}\sum_na_nx^n=\sum_nna_nx^n$$
Applying this trick to the Maclaurin series for $\cos(x)$ gives
$$x\frac{d}{dx}\cos(x) = \sum_q(2q)(-1)^q\frac{x^{2q}}{(2q)!}=2\sum_qq(-1)^q\frac{x^{2q}}{(2q)!}$$
So
$$\sum_qq(-1)^q\frac{x^{2q}}{(2q)!}=\frac12x\frac{d}{dx}\cos(x)=-\frac12x\sin(x)$$
You can apply the same trick once more to get:
$$\sum_qq^2(-1)^q\frac{x^{2q}}{(2q)!}=\frac12x\frac{d}{dx}\left(-\frac12x\sin(x)\right)=-\frac14x(\sin(x)+x\cos(x))$$
