sin2(x)+cos2(x)=1.
Divide through by cos2(x):
tan2(x)+1=sec2(x), so sec2(x)=tan2(x)+1.
So, to solve the given equation:
tan2(x)+1=tan2(x)tan(x)+1,
tan2(x)=tan2(x)tan(x), tan2(x)(1-tan(x))=0
1=tan(x), so x=45° or π/4 radians; or tan(x)=0, x=0.
Other answers exist: x=225°, 405°, which can be written x=45+180n where n is an integer.
Also x=180n which includes x=0. In radians: x=π/4+nπ or x=nπ.