The function f(x) will be undefined if any of the denominators is zero. That will be the case for Q=0 and for R=0. (You can find <em>some of the excluded values</em> by examining g(x) = P/R.)
To find the excluded values, find the zeros of the denominator polynomials.
___
By itself, examining g(x) may not tell you <em>all</em> of the excluded values of the domain of f(x). The zeros of Q also need to be excluded.