If you have:
You know the first derivative of:
and so the second derivative will be
So the kth derivative will be:
We don't know if we get a sinus or a cosinus, that's the reason we wright trig(nx).
Do this also for the other sum.
Does this help you? ...