we get by the chain rule:
#y'=1+1/cos^2(xy)(y+xy')#
#dy/dx = 1 + y/cos^2(xy) + dy/dx (x/cos^2(xy))#
#dy/dx - dy/dx(x/cos^2(xy)) = 1+ysec^2(xy)#
#dy/dx * (1-frac{x}{cos^2(xy)}) = 1+ysec^2(xy)#
#dy/dx = frac{1+ysec^2(xy)}{1 - xsec^2(xy)}#
Multiplying by #cos^2(xy)# over #cos^2(xy)# we get
#dy/dx=frac{cos^2(xy)+y}{cos^2(xy)-x}#