Prove that $\cos(x)$ is identically zero using integration by parts 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.

A standard trigonometric identity says that
$$\sin(t-x)\sin(x)-\cos(t-x)\cos(x)$$
is equal to
$$
-\cos((t-x)+x)
$$
and that is $-\cos t$.  As a function of $x$, this is a constant, i.e. since there's no "$x$" in this expression, it doesn't change as $x$ changes.  Since the "dazzling new identity", if stated correctly, would say, not that the expression equals $0$, but that the expression is constant, it seems your derivation is correct.  Except that you wrote "$=0$" where you needed "$=\text{constant}$".
