What is the implicit domain of an integral? The derivative of $f(x) = \ln(x)$ is $\frac{1}{x}$, with domain $(0, \infty)$.  The derivative implicitly has the domain of $f(x)$.
Reversing the direction, the indefinite integral / antiderivative
$$
 \int \frac{1}{x}\,dx
$$
is solved by Khan with the answer $\ln(|x|) + C$ where $x \ne 0$.  As opposed to the naive answer $\ln(x)$ which would have to be limited to $x > 0$.
I was wondering whether we should implicitly assume indefinite integrals are to be solved for the maximum possible domain? Any tips/corrections on how domains work with derivatives vs integrals is welcome.
 A: The domain of an antiderivative function is trivially the subset of the domain of the integrand where it is integrable.

I would rather write a general indefinite integral of $\dfrac 1x$ as
$$\log(|x|)+C+C'u(x)$$ where $u$ denotes a Heaviside step.
A: It's not that the answer ${\ln(x) + c}$ is incorrect, as you pointed out it's just limited to ${x>0}$. When doing indefinite integrals, you should definitely be careful about specifying the domain over which your answer is correct. In this particular case, ${\ln|x| + c}$ is just an expression which encapsulates the integral for both cases ${x>0}$ and ${x<0}$
A: When we do mathematics outside a classroom setting, we must be careful. A function, to be uniquely defined, must have its domain specified. Otherwise, you are not actually talking about a function, but about a family of graphs. The symbol $\ln$ is a symbol which, by definition, refers to some function $(0,\infty)\rightarrow\mathbb{R},$ and the domain is not changed unless otherwise specified. As such, we have the result that $$\forall{x\in(0,\infty)},\,\ln'(x)=\frac1{x}.$$ However, notice the following: if we define $\ln_-$ by $\ln_-:(-\infty,0)\rightarrow\mathbb{R},$ $\ln_-(x):=\ln(-x),$ then $$\forall{x\in(-\infty,0)},\,\ln_-'(x)=\frac1{x}.$$ As such, we can define a family of functions $f_{A,\,B}:(-\infty,0)\cup(0,\infty)\rightarrow\mathbb{R},$ with $$f_{A,\,B}(x)=\begin{cases}\ln_-(x)+A&x\lt0\\\ln(x)+B&x\gt0\end{cases}.$$ This family of functions satisfies the property that $$\forall{A,B\in\mathbb{R}},\,\forall{x\in(-\infty,0)\cup(0,\infty)},\,f_{A,\,B}'(x)=\frac1{x}.$$ This to say, that if we define $g:(-\infty,0)\cup(0,\infty)\rightarrow\mathbb{R},$ $$g(x)=\frac1{x},$$ then we have that $$\forall{A,B\in\mathbb{R}},\,f_{A,\,B}'=g.$$ In conclusion: specifying your domain matters. A deduction as to what the antiderivatives or derivative is cannot be made without first talking about the domain.
