DSolve[2*x*Sin[y[x]] + Cos[x]*y[x]^2 + (x^2*Cos[y[x]] + 2*Sin[x]*y[x])*Derivative[1][y][x] == 0,y[x],x]