I saw this post come up during review, and my lizard brain yelling ANIMATED GIF ARGH DIE IN A FIRE overcame any rational response. I'm not sure I've seen any GIFs in MSE before that. Here is a prior meta discussion that generally agrees that small simple animated images with a relatively slow framerate are welcome here. Is there also consensus in the other direction that large "noisy" fast GIFs should be hidden behind links?
In the rare cases where a GIF aids the post’s comprehensibility better than a still image could, then the GIF should remain. I’d argue your question is an example of this, although MathJax would’ve been better, had the asker tried to write the question down. Otherwise, I believe we should either make the images still, or remove them altogether.