Step 1: Finding the domain (A):
For the function $f(x)$ to exist, the expression inside the square root in the denominator must be strictly greater than zero.
Hence, we require
\[
|x| - x^2>0
\]
To solve this inequality, consider two cases based on the definition of $|x|$.
Case 1: When $x \ge 0$
\[
|x| = x \Rightarrow x - x^2>0 \Rightarrow x(1 - x)>0
\]
This holds when $0<x<1$.
Case 2: When $x<0$
\[
|x| = -x \Rightarrow -x - x^2>0 \Rightarrow -x(1 + x)>0
\]
\[
\Rightarrow x(x + 1)<0
\]
This is satisfied for $-1<x<0$.
Combining both intervals, the domain is
\[
A = (-1, 0) \cup (0, 1)
\]
Step 2: Finding the range (B):
Let
\[
y = \frac{1}{\sqrt{|x| - x^2}}
\]
Since the denominator is a square root, it is always positive, so $y>0$.
To find the range, maximize the denominator. Let
\[
g(x) = |x| - x^2
\]
For $x \in (0,1)$,
\[
g(x) = x - x^2
\]
This attains its maximum at $x = \frac{1}{2}$, giving
\[
g\left(\frac{1}{2}\right) = \frac{1}{4}
\]
For $x \in (-1,0)$,
\[
g(x) = -x - x^2
\]
This reaches its maximum at $x = -\frac{1}{2}$, also giving
\[
g\left(-\frac{1}{2}\right) = \frac{1}{4}
\]
Thus, the maximum value of the denominator is
\[
\sqrt{\frac{1}{4}} = \frac{1}{2}
\]
Hence, the minimum value of $y$ is
\[
y_{\min} = \frac{1}{1/2} = 2
\]
As $x$ approaches $-1$, $0$, or $1$, the denominator approaches zero from the positive side, so $y$ increases without bound.
Therefore, the range is
\[
B = [2, \infty)
\]
Step 3: Finding $A \cup B$:
\[
A = (-1, 0) \cup (0, 1), B = [2, \infty)
\]
\[
\boxed{A \cup B = (-1, 0) \cup (0, 1) \cup [2, \infty)}
\]