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.
Without even reading I answer: the antiderivatives of a function are equal only up to a an additive constant, that is any two antiderivatives will always differ by a constant on an interval.
Edit: Ok, having now read the question I confirm my suspicion, note that the symbol $\int f(x)dx$ is not a well defined function. You should interpret the symbol $\int f(x)dx$ as being an undertermined differentiable function which, once you differentiate, yields $f(x)$. Although more formally I believe it's more common to define $\int f(x)dx$ as the set of functions described above, that is, for some non degenerate interval $I$, $$\int f(x)dx=\{F\in \Bbb R^I: \text{F is differentiable and }(\forall x\in I)(F'(x)=f(x))\}.$$
Using this definition one has to very careful about what one means with $\int f(x)dx=g(x)$, because it doesn't mean what one would initially suspect.