y=cos[xy^2], differentiaing both side of this expression w.r.t x,
dy/dx=-sin[xy^2]d/dx[xy^2] [ chain rule]..........[1]
We now need to find d/dx[xy^2] using the product rule, i.e,
d[uv]=vdu+udv, where u and v are both functions of x, by implicit differentiation.[v=y^2and u=x in this case]
So d/dx[xy^2]=[y^2+2xydy/dx]
Therefore dy/dx=-sin[xy^2][y^2+2xydy/dx]=[-y^2sin[xy^2]-[2xysin[xy^2]dy/dx]
dy/dx+dy/dx2xysin[xy^2]=-y^2sin[xy^2]
dy/dx[1+2xysin[xy^2]=-y^2sin [xy^2],
And so dy/dx=-y^2sin[xy^2]/[1+2xysin[xy^2] Hope this was helpful.