Different methods give different answers Solve $ \sec x- 1 = (\sqrt 2 - 1) \tan x $ Solve $ \sec x- 1 = (\sqrt 2 - 1) \tan x $
Case 1)
Square both the sides and  using $ \sec ^2 x = 1+ \tan^2 x. $ And solving the quadratic we get answer $\tan x = 1$ or $\tan x = 0$.
Putting them back in also solves the equation.
Thus $x$ is either $n \pi $ or $x =  n \pi + \frac{\pi}{4}, n \in \mathbb{Z}$
Case 2)
$ \sec x- 1 = (\sqrt 2 - 1) \tan x $
$ \frac{1-\cos x}{\cos x} = (\sqrt 2 - 1) \frac{\sin x}{\cos x} $
$ 2\sin^2 \frac{x}{2}= (\sqrt 2 - 1) 2 \sin \frac{x}{2} \cos \frac{x}{2}$
Thus solution is $\sin \frac{x}{2} = 0$ and $\tan \frac{x}{2} = \frac{\pi}{8}$
Thus $x$ is either $x = 2n \pi$
Or  $x = 2n\pi + \frac{π}{4}$
These two answer are not same.  So something is wrong.
Even though below question look similar to this one. None of the concepts in its answers really help this question.
Different ways gives different results - solving $\tan 2a = \sqrt 3 $

Squaring both sides of an equation can introduce extraneous solutions.  Substitution demonstrates that if $n$ is odd, then $x = n\pi$ is not a solution as $-2 \neq 0$ and that $x = n\pi + \frac{\pi}{4}$ is not a solution as the LHS is negative while the RHS is positive.  On the other hand, direct substitution shows that your second method produces correct solutions.
