Consider $\int\cos(t-x)\sin(x)dx,$ where $t$ is a constant.
Evaluating the integral by parts, let \begin{align} u = \cos(t-x),\ dv = \sin(x), \\ du = \sin(t-x),\ v = -\cos(x), \end{align} so $ \int\cos(t-x)\sin(x)dx = -\cos(t-x)\cos(x) - \int\sin(t-x)\cdot-\cos(x)dx. $ Evaluating the integral on the right by parts again (with a slight abuse of notation), \begin{align} u = \sin(t-x),&\quad dv = -\cos(x), \\ du = -\cos(t-x),&\quad v = -\sin(x), \end{align} we get \begin{align} \int\cos(t-x)\sin(x)dx &= -\cos(t-x)\cos(x) - \left( -\sin(t-x)\sin(x)-\int\cos(t-x)\sin(x)dx\right) \\ &= -\cos(t-x)\cos(x) + \sin(t-x)\sin(x) + \int\cos(t-x)\sin(x)dx, \end{align} and subtracting the integral from both sides, we obtain the dazzling new identity $\sin(t-x)\sin(x)-\cos(t-x)\cos(x)=0$ for all $t$ and $x$!
Pushing it further, the LHS expression is $-\cos(t)$, and as $t$ was just an arbitrary constant, this implies $\cos(x)$ is identically zero!
Now I obviously know something's wrong here. But what, and where? Where's the flaw in my reasoning?
P.S. I can evaluate the integral to get the proper answer lol. But this was rather interesting.