In this talk, we present some advances to two open problems using techniques of algebraic geometry. 

Firstly, we obtain several necessary conditions for algebraic integrability of a planar polynomial foliation. Moreover, we describe several algorithms to decide on algebraic integrability (under certain conditions) and to compute a rational first integral in the positive case. We use, as a main tool, the extension of the planar foliation to a foliation on the projective plane or a Hirzebruch surface. 

Finally, we prove some results related to the Bounded Negativity conjecture on rational surfaces.