We don't write the domain of $\int f(x) dx$. Why? When we write an indefinite integral of a function $f(x)$, we write $\int f(x) dx$.
But we don't write the domain of $\int f(x) dx$.  
For example, we don't write the domain of $\int \frac{\sin x}{1 + \sin x} dx$.  
Why?  
Definition of primitive functions from "Introduction to Analysis" by Kunihiko Kodaira:  

Let $I$ be an interval.
  Let $f(x)$ be a function defined on $I$.
  If a function $F(x)$ which is defined on $I$ satisfies $F'(x) = f(x)$ on $I$, we call $F(x)$ a primitive function of $f(x)$.  

Definition of indefinite integrals  from "Introduction to Analysis" by Kunihiko Kodaira:  

Let $f(x)$ be a function defined on an interval $I$.
  We define an indefinite integral of $f(x)$ as a primitive function of $f(x)$.
  We use $\int f(x) dx$ for an indefinite integral of $f(x)$.  

 A: You really should keep the domain in mind when talking about antiderivatives and indefinite integrals. For instance, many people will write
$$ \int \frac1x \,dx = \log|x| + C $$
and possibly I'm in the minority for being bothered by this, but really $\frac1x$ has two separate indefinite integrals: one on $(0,\infty)$ and one on $(-\infty,0)$. So really,
$$ \int \frac1x \,dx = \log x + C_1, \quad \text{on }(0,\infty)$$
and
$$ \int \frac1x \,dx = \log (-x) + C_2, \quad \text{on }(-\infty,0).$$
Keeping the two separate, discourages people from writing $$ \int_{-1}^1 \frac1x \,dx = \log|1| - \log|-1| = 0.$$
If you look carefully at the definition, the author is actually defining an indefinite integral on $I$ since he defines an indefinite integral as "a primitive function of $f(x)$" and by definition "a primitive function of $f(x)$" is a function $F(x)$ whose domain is the same interval $I$ which is the domain of $f(x)$.

Take a moment to reflect on why we only consider functions whose domain is an interval rather than allowing for some holes in our domain (e.g. $1/x$ defined on $(-\infty,0)\cup(0,\infty)$).

This is fairly common what the author is doing. He defines "primitive function for $f(x)$" to mean the interval $I$ and a function $F(x)$ defined on $I$. So the interval is not part of the term being defined but is nonetheless important in the definition. Then when the author defines an indefinite integral as a primitive function, the interval $I$ is still part of the indefinite integral because $I$ is part of the primitive function.
You have to work backwards a bit to pick up all the pieces that are dropped by the terminology. E.g. the term "indefinite integral" doesn't mention the word function anywhere but it's still a function. Similarly when people define the term "function" in mathematics, they include the domain and codomain as part of the definition. When the author speaks of "a function $f(x)$ defined on $I$" that includes the codomain $\mathbb{R}$ even though he didn't say that explicitly.
Thus "indefinite integral of $f(x)$ on the interval $I$" means


*

*$f(x)$ is a function $f : I \to \mathbb{R}$

*there is a primitive function $F : I \to \mathbb{R}$ (meaning $F'(x) = f(x)$ for all $x \in I$)

*this primitive function is an indefinite integral of $f(x)$
If you work out all the details, you can't avoid $I$ when you work out what an indefinite integral actually is.
A: Let us say any function $f(x)$ is given. Now the domain of any function is the range of values of $x$for which the function is defined. Now the there are two more things regarding integrals, one is indefinite and other is definite.Let $f(x)=\cos(x)$ then the indefinite integral gives:
$$\int_{}^{}\cos(x) dx = \sin(x) + c$$
Now the RHS is a family of curves depending on the values of $c$ you will get different sinusoids. After you get the function it is usually a great practice to still go through the domain of the calculated function.
The definite integral :
$$\int_{0}^{\pi/2}\cos(x) dx = 1$$
which is the area under the curve of $f(x) = \cos x$ from the interval $[0,\pi/2]$. It gives you a number.
A: It doesn't matter because derivarives and integrals are defined with limits. This takes care of any removable discontinuities (holes).
As to whole areas where the function is not defined (like the area left of the y axis for $f(x)=\sqrt{x}$), the derivative/integral of that function will be undefined in this area too, because you cannot possibly measure a slope or compute an area of a curve in an area where there is no curve.
So, all in all, the domain of the function doesn't matter. The driving intuition behind integrals and derivatives kind of requires you to assume those things.
(Note that if you extend everything to the complex plane, domains don't really matter except for indeterminate forms which limits take care of, and undefined points which, well, they are usually one of the complex infinities.)
