Why integration constant is real? OK, we are all taught at school that the undefined integral of a function $f(x)$ is
$$\int f(x)\;\text{d}x = F(x) + k$$
where $F'(x) = f(x)$ and $k \in \mathbb R$.
But, why $k$ must be real?
I know the basis of including that $k$ is the fact that the difference between all primitives of a function is a constant, but, couldn't it be complex, and say the following?
$$\int f(x)\;\text{d}x = F(x) + k,\qquad \text{where $F'(x) = f(x)$ and $k \in \mathbb C$}$$
 A: In general, it is not the case that $C$ must be real. Whenever you have a function, you always need to specify where it maps. Is it $f:\mathbb{C}\to\mathbb{R}$? $f:\mathbb{R^n}\to\mathbb{R}$? $f:\mathbb{R}\to\mathbb{R^n}$? Since we, in calculus, very often deal with functions $f:\mathbb{R}\to\mathbb{R}$, this is sometimes left off and assumed that the reader will know, however we do talk about function in other function spaces.
If $f:A\to B$, then the constant of integration must be an element of $B$. This is easily seen, as $F(0)=C$.
A: In my opinion, the answer is because in high-school you get prepared for "higher" mathematics, so they try not to complicate it too much. First of all, it is obvious that if you only deal with real-valued functions, you will only get real values of $k$. For instance, in my country, the topic of complex numbers is studied apart from everything, and I understood that once I studied complex analysis in the university. You cannot just go to a high-school class and talk about complex functions, because some of these are defined in special ways (logarithms, powers, trigonometric functions, etc.). That is why we study complex numbers and not complex analysis (from my point of view, of course).
Also, one more example of a similar fact: the first time we learn to solve quadratic equations (kids are around 14 y.o. when they learn that), whenever a solution of such equation is a complex number, they just tell students that there is no solution (some years later they learn there is actually a solution, which is not real). I am not saying this statement is right or wrong, I am just stating how they teach us in my country. The same with integrals, some years later you will be taught that $k$ can also be complex in some cases.
A: Sure, it can be.
It's just that in Calc I, II, III you strictly deal with functions $\mathbb{R} \rightarrow \mathbb{R}$, so if you want these functions to be closed indefinite integration, you need the constant to be $\in \mathbb{R}$.
