I have the following function: $f(x) = \cos(4x) + \sin(4x)$ in the range of $0 < x < \frac{\pi}{2}$.
Obviously as you can see this function is defined for every $x$. Let's say I want to find the extremum points for this function. I derive it, and attempt to compare it to zero to find possible extrema:
$$f'(x) = 4\cos(4x) - 4\sin(4x) = 0$$ $$\cos(4x) = \sin(4x)$$
My question — am I allowed to do the following: $$\sin(4x) = \cos(4x) \quad/\div \cos(4x)$$ $$\tan(4x) = 1$$
From here I can solve for $x$ and get possible extremum points. But notice that it is possible for the divisor to be equal to zero within the provided range, and both the function and derivative are still defined for those points. Is this illegal? Should I instead use trigonometric identities to break down these sort of problems? Alternatively, am I allowed to do this granted I provide a certain explanation?
Yes you can, because $$\cos(4x)=0$$ cannot correspond to a solution (this would imply $\sin(4x)=\pm1\ne0$).
The usual way to handle such situations is to perform a case study:
$\cos(4x)=0\to$ impossible;
$\cos(4x)\ne0\to\tan(4x)=1$.