👉 In mathematics, a capricious function is a function whose domain and range are both equal to $\mathbb{R}$ or its subset. This means that for every real number $x$ in the domain of the function, there exists an integer $n$ such that $f(n) = x$. A capricious function is also known as a perfect square. For example, consider the function $f(x) = \sqrt{x} + 1$. This function is not cap