I had a calculus final yesterday, and in a question we had to find a primitive of $\tan(x)$ in order to solve a differential equation.
A friend of mine forgot that such a primitive could easily be found, tried to integrate $\tan(x)$ by parts... and then arrived to the result $0 = -1$. The kind of thing you're pretty satisfied to "prove", except during an important exam. :-°
So afterwards I tried to do the same :
$$\begin{align*} \int \tan(x)dx &= \int \sin(x) \times \frac{1}{\cos(x)}dx \\[0.1in] &= -\frac{\cos(x)}{\cos(x)} - \int - \frac{\cos(x) \times \sin(x)}{\cos(x)^2}dx \\[0.1in] &= -1 + \int \tan(x)dx \end{align*}$$
And therefore we get :
$$ \int \tan(x)dx = -1 + \int \tan(x)dx \implies 0 = -1$$
What? The reasoning sounds about right to me. Could someone explain where something went wrong?
Thanks, Christophe.