Anti-Derivative Question Find the anti-derivative of $$\frac{10}{x^9}$$
My answer is $$F(x) = \frac{-5}{4x^8} + C$$while the textbook answer is $$F(x) = \begin{cases} \frac{-5}{4x^8} + C_1 &\text {if x > 0} \\\frac{-5}{4x^8} + C_2 &\text{if x < 0} \end{cases}$$
My Question is that, why is a piecewise function needed when both of them are the same.
 A: The textbook says the piecewise function is the correct answer because the domain of $F(x)$ is a disjoint union of two intervals, namely $(-\infty,0)$ and $(0,\infty)$, so a different constant of integration (like $C_1$ and $C_2$) may be chosen for each of the intervals. The textbook is just showing the "most general" antiderivative there is.
Whenever you have an antiderivative $F(x)$, it's always implied there is a domain to it because functions always need a domain. In this case, the domain of $F(x)$ is all real numbers except $0$ since $x=0$ makes $F(x)$ undefined.
The reason why people just casually take the indefinite integral and add that $+C$ at the end is because of a corollary of the Mean Value Theorem, which says
"If $f'(x) = g'(x)$ on $(a,b)$, then $f(x) = g(x) + C$ for some real number $C$."
Notice that this corollary doesn't apply to your $F(x)$ as a whole because you have a disjoint union of two intervals, not one interval like what the corollary states such as $(a,b)$. But for each component of your piecewise function separately, the theorem holds, and that's why your textbook is using that as a solution.
(Opinion) Depending on the class, it wouldn't be wrong to say any antiderivative of $F(x) = -\frac{5}{4x^8} + C$ and leave it at that because it should be easy to see that $x \neq 0$. And this is ignoring the fact that the domain of $F(x)$ is a disjoint union. It's similar to saying $\int\tan^2{x}dx = \sec^2{x} + C$, which doesn't hold true for any $\frac{\pi}{2} + n\pi$ (where $n$ is an integer), yet people just say $\int\tan^2{x}dx = \sec^2{x} + C$ and leave it at that. After all, I don't think there is a strict definition of what an indefinite integral is and that might be where the confusion is coming from. Not to mention, I think that's why you don't really learn about them in real analysis.
But the piecewise function the textbook provided is also correct. The two functions in that piecewise function are the "same" in that when you differentiate them, you'd get $f(x)$ back.
For more information, try watching this:
https://www.youtube.com/watch?v=u4kex7hDC2o&t=264s
