Symbolic math engines barf on this ostensibly tractable integral.

180 Views Asked by At

$$\frac14 \int_{-M\pi}^{N\pi - s} \cos(tu/M) \cos((t+s)u/M)(1-\cos(t/M))(1-\cos((t+s)/N))\space \mathrm d t$$

with integer $u$.

Alpha runs out of time.

Maxima gives a tremendous result that can definitely be simplified by applying such identities as $\sin(x+\pi) = \sin(x - \pi) = -\sin(x)$, but even the use of scsimp doesn't help.

I've been waiting at least 20 minutes for SymPy to give me an answer.

Am I doomed to do this by hand? It would be error prone.

Some might care about the following, some not:

I'm trying to convolve a cosine under a Hann function with a cosine under a wider Hann function. This definite integral is one of two cases in this problem. Stating it this way allows me to avoid piecewise-type functions that are zero outside a certain interval. If there's another approach I'd love to learn about it.