This is an easy integral so I am just looking for a simple confirmation.
The integral and the answer which I see in my book is this one.
$$\int \frac{1}{\sin(x) \cdot \cos(x)} \, dx = \ln \left|\tan(x)\right|$$
But they say this is true/valid only for $$x \in (0, \pi/2)$$
while I think it is true for $x \in (-\pi/2, 0) \cup (0, \pi/2)$
Am I correct or not?
Yes, you're right. The sign of $x$ can either be positive or negative without changing the result. If $x < 0$, we let $t = - x$, $dt = - dx$, then: $$\int \frac{1}{\sin x \cdot \cos x}\,\mathrm{d}x = \int \frac{-1}{\sin (-t)\cdot \cos (-t)}\,\mathrm{d}t=\int \frac{1}{\sin t \cdot \cos t} \, \mathrm{d}t=$$
$$ = \ln \left\vert\tan t \right\vert +C =\ln \left\vert \tan x \right\vert+C$$ where $C$ is a constant.