There was a question where $\quad0\le \big(3-\sin(2\pi x)\big)\sin(\pi x - \frac{\pi}{4})- \sin(3\pi x +\frac{\pi}{4})\le 2\sqrt{2}\quad $ and the user wanted to know what values of $x$ would be solutions.
I reasoned algebraically how both components involved $\quad (3-0)\sin(180 x^\circ - 45^\circ)- \sin(180x^\circ + 45^\circ) \quad$ and how how $\quad2n-1\quad $ was a low limit of one range and $\quad \frac{4n+1}{4}\quad $ was a high limit for another. I still had to use WolrframAlpha here to find the in-between limits
$$ (2 n - 1)<x\le \frac{2 \big(\pi n - \frac{3 π}{8}\big)}{\pi} \land n \in\mathbb{ Z}\quad \land \quad\frac{2 \big(\pi n + \frac{\pi}{8}\big)}{\pi}\le x\le\frac{(4 n + 1)}{2} \land n\in\mathbb{Z} $$
With these limits defined, they can be calculated manually because the 2n-and-4n values are easy and the $\pi$-values cancel. The problem is that I have not been able to reason how to define the two limits I did not find but that WolframAlpha did find.
I tried incrementing up or down from the "limits I found" and I did find that the high-low limits varied the $x$-values varied by no more that $\quad0.25\quad$ before $f(x)$ went out of range. The problem remained, I did not know how to define the other limits. I could just specify them as $\pm 0.25$ of the limits I found but that would be heuristic and not something I could prove.
Does anyone have an idea how WolframAlpha came up with the limits that involve $\space\pi?$
You are considering the function $ f = \big(3-\sin(2\pi x)\big)\sin(\pi x - \frac{\pi}{4})- \sin(3\pi x +\frac{\pi}{4}) $.
After some manipulations, I got the identity $f = 2\cos(\pi(x+1/4))^3 - 5\cos(\pi(x+1/4))$. So it is clear that the period length is $2$ and we only need to consider $x \in [0 \quad 2]$.
Setting $y = \cos(\pi(x+1/4))$ your inequality becomes $0\le y (2y^2 -5)\le 2\sqrt{2}$ and we need to look at the range $-1 < y < 1$.
So $0\le y (2y^2 -5)$ holds for $-1 < y < 0$ which is $\pi/2 < \pi(x+1/4) < 3 \pi/2$ or $1/4 < x < 5/4$.
Likewise, $y (2y^2 -5)\le 2\sqrt{2}$ holds for $-\sqrt{0.5} < y < 1$ which corresponds to two areas: $3 \pi/4 > \pi(x+1/4) $ or $0 < x < 0.5$; and $5 \pi/4 < \pi(x+1/4)$ or $x > 1$.
Combining lower and upper bound gives that the inequality holds for $0.25 < x < 0.5$ and for $1 < x < 1.25$, and of course for shifts of these areas by integer multiples of $2$. $\qquad \Box$