  We study a planar polynomial differential system, given by \dot{x}=P(x,y),
\dot{y}=Q(x,y). We consider a function I(x,y)=\exp \{h_2(x) A_1(x,y) \diagup
A_0(x,y) \} h_1(x) \prod_{i=1}^{\ell} (y-g_i(x))^{\alpha_i}, where g_i(x) are
algebraic functions, A_1(x,y)=\prod_{k=1}^r (y-a_k(x)), A_0(x,y)=\prod_{j=1}^s
(y-\tilde{g}_j(x)) with a_k(x) and \tilde{g}_j(x) algebraic functions, A_0 and
A_1 do not share any common factor, h_2(x) is a rational function, h(x) and
h_1(x) are functions with a rational logarithmic derivative and \alpha_i are
complex numbers. We show that if I(x,y) is a first integral or an integrating
factor, then I(x,y) is a Darboux function. In order to prove this result, we
show that if g(x) is such that there exists an irreducible polynomial f(x,y)
with f(x,g(x)) \equiv 0, then f(x,y)=0 is an invariant algebraic curve of the
system. In relation with this fact, we give some characteristics related to
particular solutions and functions of the form I(x,y) such as the structure of
their cofactor. Moreover, we consider a function of the form \Phi(x,y):= \exp
\{h_2(x) A_1(x,y) / A_0 (x,y) \}. We show that if the derivative of \Phi(x,y)
with respect to the flow is well defined over A_0(x,y)=0 then \Phi(x,y) gives
rise to an exponential factor.
