please explain as well, solve the trigonometric equation

Given:
The trigonometric equation is:
[tex]\tan x\sin x=\tan x\cos x[/tex]
To find:
The solutions for the given equation over [tex]0^\circ<x\leq 360^\circ[/tex].
Solution:
We have,
[tex]\tan x\sin x=\tan x\cos x[/tex]
It can be written as
[tex]\tan x\sin x-\tan x\cos x=0[/tex]
[tex]\tan x(\sin x-\cos x)=0[/tex]
[tex]\tan x=0[/tex] and [tex](\sin x-\cos x)=0[/tex]
The solutions over [tex]0^\circ<x\leq 360^\circ[/tex] are:
[tex]x=90^\circ,180^\circ[/tex] and [tex]\sin x=\cos x[/tex]
[tex]x=90^\circ,180^\circ[/tex] and [tex]x=45^\circ, 225^\circ[/tex]
Therefore, the correct option is D.