Let's say I want to integrate $\int\sec^3xdx$. Due to the way this expression is set up, you must use integration by parts, and not u-sub, etc.
Applying integration by parts, I get $\sec{x}\tan{x}-\int{\sec{x}\tan^2{x}dx}$.
For the new integral here, using integration by parts again results in $\sec{x}\tan{x}-(\sec{x}\tan{x}-\int\sec^3{x}dx)$. The $\sec{x}\tan{x}$ terms cancel out, resulting in just $\int\sec^3{x}dx$. Uh-oh... isn't that where we started?? Wump wump.
And to make matters even more confusing, consider $2\int\sec^3xdx$, which we'll assign to the variable $a$. Applying all of the above steps again, we somehow end up with $a = 2a$... hang on a minute, that doesn't seem about right.
Of course, the real reason behind this seemingly "impossible" result is that an antiderivative isn't just one equation, it's a whole set. Hence the "$+C$". And due to the properties of logarithms, it's not inconceivable that multiplying $a$ by a scalar multiple will indeed result in another member of $a$, right?
I'd like to make sure my logic is all true, and logarithms are indeed the reason why this is happening. I'd also like to know what to do to avert this issue should I ever come across it.
There are various ways to perform integrate by parts. To avoid cancellation, integrate as follows
$$\int \sec^3 x\ dx=\frac12\int \csc x\ d(\tan^2 x) =\frac12\sec x \tan x +\frac12 \int \sec x\ dx $$