Given: (sin(pix)+cos(piy))^2 = 2(sin(πx)+cos(πy))2=2
Differentiate:
(d((sin(pix)+cos(piy))^2))/dx = (d(2))/dxd((sin(πx)+cos(πy))2)dx=d(2)dx
Use the chain rule on (d((sin(pix)+cos(piy))^2))/dxd((sin(πx)+cos(πy))2)dx
The chain rule is:
(d(g(h(x,y))))/dx = (dg)/(dh)(dh)/dxd(g(h(x,y)))dx=dgdhdhdx
let h(x,y) = sin(pix)+cos(piy)h(x,y)=sin(πx)+cos(πy), then:
(dh)/dx = picos(pix) -pisin(piy)dy/dxdhdx=πcos(πx)−πsin(πy)dydx
g = (h(x,y))^2g=(h(x,y))2
(dg)/(dh) = 2h(x,y)dgdh=2h(x,y)
(d((sin(pix)+cos(piy))^2))/dx = 2h(x,y)(picos(pix) -pisin(piy)dy/dx)d((sin(πx)+cos(πy))2)dx=2h(x,y)(πcos(πx)−πsin(πy)dydx)
(d((sin(pix)+cos(piy))^2))/dx = 2(sin(pix)+cos(piy))(picos(pix) -pisin(piy)dy/dx)d((sin(πx)+cos(πy))2)dx=2(sin(πx)+cos(πy))(πcos(πx)−πsin(πy)dydx)
The right side is just derivative of a constant:
(d(2))/dx = 0d(2)dx=0
Put the terms back into the equation:
2(sin(pix)+cos(piy))(picos(pix) -pisin(piy)dy/dx) = 02(sin(πx)+cos(πy))(πcos(πx)−πsin(πy)dydx)=0
Solve for dy/dxdydx
-cos(pix) + sin(piy)dy/dx = 0−cos(πx)+sin(πy)dydx=0
sin(piy)dy/dx = cos(pix)sin(πy)dydx=cos(πx)
dy/dx = cos(pix)/sin(piy)dydx=cos(πx)sin(πy)