From this post (Solving $\frac{\cos^23t}{\tan t}+\frac{\cos^2t}{\tan3t}=0$), which is my post, I have tried solving the last equation. I have gotten a solution(s). Would like to see if I did correctly.
$$\bigl(\sin\left(x\right)-\cos\left(x\right)\bigr)^2+\tan\left(x\right)=2\sin^2\left(x\right)$$
Expanding: $$sin^2\left(x\right)-2sin\left(x\right)\cos\left(x\right)+\cos^2\left(x\right)+tan\left(x\right)=2\sin^2\left(x\right)$$ Using $\sin^2\left(x\right)+\cos^2\left(x\right)=1$, and bringing the RHS to the LHS, the expansion becomes: $$-2sin\left(x\right)\cos\left(x\right)-2\sin^2\left(x\right)+1+\tan\left(x\right)=0$$ Then using $\tan\left(x\right)=\frac{\sin\left(x\right)}{\cos\left(x\right)}$ and multiplying the LHS by cos(x), I get the following: $$\frac{-2\sin\left(x\right)\cos^2\left(x\right)-2\sin^2\left(x\right)\cos\left(x\right)+\cos\left(x\right)+\sin\left(x\right)}{\cos\left(x\right)}=0$$
Now strictly dealing with the numerator, making two separate terms, one being $-2\sin\left(x\right)\cos^2\left(x\right)-2\sin^2\left(x\right)\cos\left(x\right)$ and the other being $\cos\left(x\right)+\sin\left(x\right)$, then factoring out $-2\sin(x)\cos(x)$, I get
$$\color{blue}{-2\sin\left(x\right)\cos\left(x\right)+1}\color{red}{\bigl(\cos\left(x\right)+\sin\left(x\right)\bigr)}+\color{red}{\bigl(\cos\left(x\right)+\sin\left(x\right)\bigr)}=0$$
This makes two terms $$\biggl(\color{blue}{-2\sin\left(x\right)\cos\left(x\right)+1}\biggr)\biggl(\color{red}{\cos\left(x\right)+\sin\left(x\right)}\biggr)=0$$
For the first term, aka the red term, I got $$\tan(x)=-1$$ where $$x=\frac{3\pi}{4}+n\pi $$
and the second term, aka the blue term. using the identity $\sin\left(2x\right)=2\sin\left(x\right)\cos\left(x\right)$ $$\sin(2x)=1$$ where $$x=\frac{\pi}{4}+n\pi$$
Thanks for reading!
Alternatively
\begin{align} & (\sin x-\cos x)^2+\tan x-2\sin^2x\\ =& (1-\sin2x )+\tan x -(1-\cos 2x) \\ =&- \frac{2\tan x}{1+\tan^2 x}+ \tan x+\frac{1-\tan^2x}{1+\tan^2 x}\\ = &\frac1{1+\tan^2x}(\tan x-1)^2(\tan x+1)=0 \end{align} Thus, $\tan x= \pm1$, leading to the solutions $$x =\frac\pi4 +\frac{\pi n}2$$