anyone has an idea on how to solve for this equation, (tan x)^2 = sin 2x

I know that sin 2x = 2sin xcos x and tan x = sin x/cos x, how ever i am having trouble simplifyng the equation into a single function so that I can solve for x.

thanks in advance

@sammys thanks for your advice on the other thread.