The normal at a point P(x, y) of a curve meets the x-axis at Q and N is the foot of the perpendicular from P on x-axis, If NQ=x(1+y2)1+x2, then equation of the curve passing through (3, 1) is