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. $ We get answer tan x = 1 or tan x = 0.

Thus X is either $ n \pi $ Or $ X is n \pi + \frac{π}{4} $

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 X/2= (\sqrt 2 – 1) 2 \sin X/2 \cos X/2 $

Thus solution is sin X/2 = 0 and tan x/2 = π/8

Thus X is either $ X = 2n \pi $ Or $ X = 2n\pi + π/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 $