Solution (source code)

= Solution

For real $x>0$, use <logarithmic differentiation>: $\log y=\tan x\log x$. The <product rule> gives $y'/y=\sec^2x\log x+\tan x/x$, hence
$$
\boxed{\frac{dy}{dx}=x^{\tan x}\left(\sec^2x\log x+\frac{\tan x}{x}\right).}
$$
Work on an interval where $\tan x$ is defined. The positive-base condition makes the variable real power unambiguous.