I want to calculate the derivative of the following function $$ y = {(\cos x - 1)}^{\sec x - 1}$$
I searched and found a video on YouTube which started solving this by applying natural logarithm in both sides. $$ \ln (y) = \ln {(\cos x - 1)^{\sec x - 1}}$$ $$\Rightarrow \frac{y'}{y} = (\sec x - 1).[\ln(\cos x - 1)]$$ Here is the part I do not understand. Since we used natural logarithm we must have $$\cos x - 1> 0 \Rightarrow \cos x > 1$$
For logarithm to be well defined, however it is impossible for any x. So, I don't know whether the video from YouTube made a mistake or whether my reasoning has some flaw I can't find. Please help me understand the mistake and calculate the derivative properly! Thanks in advance!