If I take the implicit derivative without dividing, I get the solution $\frac{dy}{dx} = (\sec(x) \tan(x) \cos(y)) \frac{\cos(y)-\sin(y))}{\sec(x)-1}$.
If I divide both sides by $\sec(x) \tan(y)$, I get $\frac{dy}{dx} = -\sin(x) (\sin y)^2$.
This solution does additionally assume $y$ is not equal to $k \pi$.
For the second solution, I did separation of variables to get $y=-\arctan(\sec(x))$. When this is plugged back in to the original equation, we get $-(\sec(x))^2=0$, which is impossible, apparently disproving this whole method.
What is going on? Why are the implicit derivatives different?


These two different expressions for the derivative are equivalent when $x$ and $y$ satisfy $$ \sec(x) + \tan(y) = \sec(x)\tan(y). $$ Let us prove that. Suposing that $$ \sec(x) + \tan(y) = \sec(x)\tan(y), $$ if we multiply by $\cos(x)\cos(y)$ on both sides, we get $$ \cos(y)+\sin(y)\cos(x) = \sin(y), $$ so
and
Keep these two identities in mind.
Begining with the first equation you got for the derivative: $$ \frac{dy}{dx} = \frac{\sec(x)\tan(x)\cos(y)(\cos(y)-sin(y))}{\sec(x)-1} = \frac{\sec(x)\tan(x)\cos(y)(\cos(y)-\sin(y))}{\sec(x)-1}\frac{\cos(x)}{\cos(x)} =\frac{\tan(x)\cos(y)(\cos(y)-\sin(y))}{1-\cos(x)} $$ Substituing both the identities we stated at the begining, $$ \frac{dy}{dx} =\tan(x)\cos(y)(-\sin(y)\cos(x))\tan(y) = -\sin(x)\sin^2(y), $$ as we wished.