A student solve the equation… (question in the picture). Thank you

Answer:
The equation is given below as
[tex]\frac{sin(2x)}{cos(x)}=2,0\leq x\leq\pi[/tex]Step 1:
Cross multiply
[tex]\begin{gathered} \begin{equation*} \frac{sin(2x)}{cos(x)}=2 \end{equation*} \\ sin(2x)=2cos(x) \\ sin(2x)-2cos(x)=0 \end{gathered}[/tex]Step 2:
Apply the trig identity below
[tex]sin(2x)=2sin(x)cos(x)[/tex][tex]\begin{gathered} s\imaginaryI n(2x)-2cos(x)=0 \\ 2sin(x)cos(x)-2cos(x)=0 \\ by\text{ rearranging, we will have} \\ -2cos(x)+2sin(x)cos(x)=0 \end{gathered}[/tex]Step 3:
Factor out 2cos(x)
[tex]\begin{gathered} -2cos(x)+2s\imaginaryI n(x)cos(x)=0 \\ 2cos(x)(-1+sin(x))=0 \\ 2cos(x)(sin(x)-1)=0 \\ 2cos(x)=0,sin(x)-1=0 \\ cos(x)=0,sin(x)=1 \\ x=\cos^{-1}0,x=\sin^{-1}1 \\ x=\frac{\pi}{2},x=\frac{\pi}{2}, \end{gathered}[/tex]Step 4:
Check for undefined points
[tex]\begin{gathered} cos(x)=0 \\ x=\cos^{-1}0 \\ x=\frac{\pi}{2} \end{gathered}[/tex]Since the equation is undefined for π/2,
Hence,
There is no solution for x
[tex]\mathrm{No\:Solution\:for}\:x\in \mathbb{R}[/tex]Her error is that π/2 will make the equation undefined for the equation in the question.
Therefore,
π/2 cannot be the answer