A student solved the equation sin2x/cos x and found an answer of pi/2 Describe the student's error

To find:
To determine whether the x = pi/2 is the answer of the equation
[tex]\frac{\sin2x}{\cos x}=2[/tex]Solution:
The solution of the equation is as follows:
[tex]\begin{gathered} \frac{\sin2x}{\cos x}=2 \\ \frac{2\sin x\cos x}{\cos x}=2 \\ \sin x=1 \\ x=\frac{\pi}{2} \end{gathered}[/tex]But at x = pi/2, the denominator of the function is zero, so, the function is not defined at x = pi/2.
Thus, the answer is "The function is not defined at x = pi/2. So, it is not the answer to the equation."