Wolfram-alpha is disagreeing with me. I am wondering why: which of us is wrong?
I was writing a question to demonstrate why domains of functions matter. The question is:
Does there exist an angle $\theta$ such that $\sec\theta=\tan\theta$?
Then you get $\sin\theta=1$ and $\cos\theta\neq0$ (knowing to retain this inequality is the point of the question). These angles $\theta$ coincide (so $\theta=n\pi+\pi/2$ and also $\theta\neq n\pi+\pi/2$). We conclude that no such angle $\theta$ exists, so $\sec\theta\neq\tan\theta$ for all $\theta$.
However, WolframAlpha disagrees. Apparently, $\theta=2n\pi+\pi/2$ works (but not, for example, $3\pi+\pi/2$). What is going on here?
- Am I wrong?
- Does WolframAlpha use an odd definition for $\sec$?
- Do I use an odd definition for $\sec$? (I use $\sec=1/\cos$, which I believe is standard. I have never heard of any other definition.)
- None of the above.
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)orsec(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:vs
I invite you to try that. Note that all these WolframAlpha inputs correspond to Mathematica commands like the following: