Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
Argh I keep hitting enter too soon. Updating. – Josh Chen Oct 1 '11 at 2:01… – jericson Oct 1 '11 at 2:09
You've tried expanding out using the difference of two angles formula for the cosine? – J. M. Oct 1 '11 at 2:12
Question's been updated thanks. – Josh Chen Oct 1 '11 at 2:35
In your last step you say $=0$, but you should actually say "is constant". – Michael Hardy Oct 1 '11 at 2:43
up vote 4 down vote accepted

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}$".

share|cite|improve this answer
Ahaha oops. In the fun of the moment I completely forgot $+c$. So the great mystery was all because of that high-school mistake. :P – Josh Chen Oct 1 '11 at 2:58

The issue is that you're working with indefinite integrals, so you have to be careful about arbitrary constants of integration. When using by-parts integration on indefinite integrals you're only guaranteed to get another antiderivative, not necessarily the same antiderivative as this example clearly demonstrates. Here it turns out that the LHS is the original antiderivative, and the RHS is the same antiderivative plus $-\cos t$ (which is a constant with respect to $x$).

If you worked the same example out with definite integration instead, you would wind up with $$0=-\cos( t)\big|_{x=a}^{x=b}=-\cos t-(-\cos t)=0. $$

share|cite|improve this answer
Equally good answer! Thanks :) – Josh Chen Oct 1 '11 at 2:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.