Consider the infinite sum:
$$ \sum_{k=0}^{\infty} \frac{(-1)^{k} x^{3k+2}}{(3k+2)!}. $$
How can we compute the exact value that it converges to?
I think we can let $\omega = e^{2\pi i/3}$ so that $\omega^{3}=1$ and $1 + \omega + \omega ^2=0$ but I am not sure how to use this to compute the actual sum.
Here’s the full version of the solution I hinted at in my comment, however, I recommend trying it with just the hint first before looking at this solution.
Define the following three sums:
$$s_1(x)=\sum_{k=0}^{\infty} \frac{(-1)^k x^k}{k!}$$ $$s_2(x)=\sum_{k=0}^{\infty} \frac{(-1)^k (\omega x)^k}{k!}$$ $$s_3(x)=\sum_{k=0}^{\infty} \frac{(-1)^k (\omega^2x)^k}{k!}$$
If we add these three equations up, the $x^{3n+1}$ and $x^{3n+2}$ terms vanish because of the identity $1+\omega+\omega^2=0$, and we’re left with the following:
$$s_1(x)+s_2(x)+s_3(x)=3\sum_{k=0}^{\infty} \frac{(-1)^k x^{3k}}{(3k)!}$$
This is close to what we want, except we’ve now “selected” only the $3n+0$ terms instead of the $3n+2$ terms. We can fix this by adding scaled versions of our sums:
$$ s_1(x)+\omega s_2(x)+\omega^2 s_3(x)=3\sum_{k=0}^{\infty} \frac{(-1)^{k} x^{3k+2}}{(3k+2)!}$$
Notice that again we’ve used the fact that $1+\omega +\omega^2=0$, however by multiplying each sequence by some power of $\omega$, we make that product only take place in the $x^{3n}$ and $x^{3n+1}$ terms.
This tells us that:
$$\sum_{k=0}^{\infty} \frac{(-1)^k x^{3k+2}}{(3k+2)!}=\frac{\ s_1(x)+\omega s_2(x) + \omega^2 s_3(x)}{3}$$
We finish this by noticing that $s_1(x)=e^{-x}$, $s_2(x)=e^{-\omega x}$, and $s_3= e^{-\omega^2 x}$. So our final answer is:
$$\frac{e^{-x}+\omega e^{-\omega x} + \omega^2 e^{-\omega^2 x}}{3}$$
If you’d like to, you can expand this into real exponentials and trig functions using Euler’s formula.