First, lets note that [tex]tan(\theta)\cdot cos(\theta)=sin(\theta)[/tex]. This leads us with the following problem:
[tex]cos(\theta)-sin(\theta)=0[/tex]
Lets add sin on both sides, and we get:
[tex]cos(\theta)=sin(\theta)[/tex]
Now if we divide with sin on both sides we get:
[tex]\frac{cos(\theta)}{sin(\theta)}=1[/tex]
Now we can remember how cot is defined, it is (cos/sin). So we have:
[tex]cot(\theta)=1[/tex]
Now take the inverse of cot and we get:
[tex]\theta=cot^{-1}(1)=\pi\cdot n+ \frac{\pi}{4} , \quad n\in \mathbb{Z}[/tex]
In general we have [tex]cot^{-1}(1)=\frac{\pi}{4}[/tex], the reason we have to add pi times n, is because it is a function that has multiple answers, see the picture: