sin x + cos y =1, so cos y = 1-sin x, so sin y = sqrt(1-(1-sin x)^2)=sqrt(2sin x - sin^2x)
If we differentiate with respect to x we get cos x - sin y.dy/dx=0. So we can write dy/dx=(cos x)/(sin y).
Differentiate again and we get
-sin x - cosy(dy/dx)(dy/dx) - sin y.d2y/dx2=0 [d2y/dx2 represents the second derivative]
-sin x - (1-sin x)cos^2x/sin^2y - sin y.d2y/dx2=0 when we make some substitutions. From this we get the second derivative:
sin y.d2y/dx2=-(sin x + (1-sin x)cos^2x/(2sin x-sin^2x)=-(2sin^2x-sin^3x + (1-sin x)cos^2x)/(2sin x-sin^2x)
The final substitution gives d2y/dx2=-(2sin^2x-sin^3x + (1-sin x)cos^2x)/(2sin x-sin^2x).sqrt(2sin x - sin^2x)
=-(2sin^2x-sin^3x+(1-sin x)(1-sin^2x))/(sin x(2-sin x))^(3/2)
=-(2sin^2x-sin^3x+1-sin^2x-sin x+sin^3x)/(sin x(2-sin x))^(3/2)
=-(sin^2x-sin x+1)/(sin x(2-sin x))^(3/2) or (sin x-sin^2x-1)/(sin x(2-sin x))^(3/2)