$\sec\theta$ never equals $\tan\theta$. Or does it?!?

I think the other answers indicating that this is an error made by WolframAlpha are perfectly reasonable and I upvoted them all. I also think it's a good idea to push the feedback button as @AlexR suggests. However, we can place the query in a broader context that makes WolframAlpha's response reasonable and shows us how to fix it at the same time. I want to emphasize that I am not saying that I agree with WA's output; I'm simply trying to demonstrate how it might be reasonable from one point of view.

To see this, try entering just tan(pi/2) or sec(pi/2) into WolframAlpha. and you'll see that you get the same result, namely $\hat{\infty}$ or complex infinity. A reasonable interpretation is that WA is working on the Riemann Sphere and, indeed, Mathematica does exactly that in this context. This suggests that we might get different results from the following queries:

solve tan(x)=sec(x)

vs

solve tan(x)=sec(x) over the reals

I invite you to try that. Note that all these WolframAlpha inputs correspond to Mathematica commands like the following:

In[1]:= Tan[Pi/2]
(* Out[1]= ComplexInfinity *)

In[2]:= Sec[Pi/2]
(* Out[2]= ComplexInfinity *)

In[3]:= Reduce[Tan[x] == Sec[x], x]
(* Out[3]= Element[C[1], Integers] && x == Pi/2 + 2 Pi C[1] *)

In[4]:= Reduce[Tan[x] == Sec[x], x, Reals]
(* Out[4]= False *)

Suppose that $$\sec\theta = \tan\theta$$ then it follows, from the Pythagorean identity that $$\sec^2\theta=\tan^2\theta+1$$ $$\tan^2\theta=\tan^2\theta+1$$ $$0=1$$ which is a contradiction, therefore my original supposition (that $\sec\theta=\tan\theta$) was false.


$$\frac1{\cos\theta}=\frac{\sin\theta}{\cos\theta}\iff\begin{cases}\sin\theta=1\\{}\\and\\{}\\\cos\theta\neq0\end{cases}$$

and since the lower case always happens when the upper one happens, there is no solution.

If WA tells otherwise then it is, again, wrong.