If I understood correctly, I got the answer here that one does not have to do case analysis when computing indefinite integrals of integrands which involve absolute values, as long as the derivative of the computed primitive is equal to the integrand. However, looking at the solution here, both intervals on which the integrand was defined were analysed separately, so I wonder if I maybe took too many shortcuts when always considering only the positive case of the functions when taking the absolute value.
Is there a rule about that? Should I maybe always treat independently each interval where the derivative of the integrand is continuous or even smooth?
Note: This is a part of what was before here. A related question also seems still open.
Too long to post as a comment:
I merely skimmed the links, but if I understand your question correctly, the point is that we can afford to be careless about that case analysis because as long as differentiating our provisional antiderivative returns the given integrand, then that resulting antiderivative must be correct, in practice anyway; strictly speaking, we also ought to specify a separate integration constant for each maximal disjoint interval of the integrand's domain.
Ryszard's suggestion is premised on wishing to gloss over providing justifications during the working, and the requirement here to differentiate the antiderivative at the final step is merely to make up for this hand-waving.
To be clear: the obtained antiderivative is provisional because of hand-waving—any hand-waving—not necessarily by avoiding cases. On the other hand, if we haven't performed any potentially invalid step, then the obtained antiderivative is not provisional and there is no need to differentiate it.
Quanto's solution!