Using the product rule: d/dx(ab)=ab’ + a’b where a and b are variables which have been differentiated with respect to x
Derivative: 2(x^2(dy/dx)+2xy) + 2 + 4dy/dx+πsin(πy)dy/dx=0
Expand brackets: 2x^2(dy/dx)+4xy+2+4dy/dx+πsin(πy)dy/dx=0
Collect dy/dx terms: dy/dx(2x^2+4+πsin(πy))+4xy+2=0
Subtract non dy/dx terms: dy/dx(2x^2+4+πsin(πy))=-(4xy+2)
Divide through by 2x^2+4+πsin(πy): dy/dx=-(4xy+2)/(2x^2+4+πsin(πy))