Verify working with one side only: sin^2x-1=-cos^2x
You can apply the identity sin^2x + cos^2x =1 to resolve this.