TITLE: Can I Plug In Infinity to Verify the Equation: $\tan \left( \frac{\pi}{2} - x\right) = \cot x$
QUESTION [5 upvotes]: When working on the following equation for my pre-calculus class a couple nights ago
Verify that:
$$
\tan \left(\frac{\pi}{2} - x\right) = \cot x
$$
I decided to answer the question by using the fact that
$$
\tan \left(\frac{\pi}{2} - x\right) = \frac{\tan \frac{\pi}{2} - \tan x}{1 + \tan \frac{\pi}{2} \tan x}.
$$
I realized that using this formula, I would not help me answer the question for my math class, because, as we learned in class, $\tan \frac{\pi}{2}$ is undefined. However, I (knowingly erroneously) proceeded with this method, plugging in $\pm \infty$ for $\tan \frac{\pi}{2}$ yielding
$$
\frac{\pm \infty - \tan x}{1 + \pm \infty \tan x}
$$
which can be simplified down to
$$
\frac{1 - 0}{0 + \tan x} = \frac{1}{\tan x} = \cot x
$$
by dividing the numerator and the denominator by $\pm \infty$.
In an attempt to justify the fact that $\frac{\infty}{\infty}$ should be 1 and $\frac{1}{\infty}$ and $\frac{\tan x}{\infty}$ should be 0, I turned to limits. Whilst not knowing too much calculus, I learned last year in Algebra II that $\infty$ can be somewhat approximated with limits. As such, I defined a new constant $\beta$ as
$$
\beta = \lim_{x \rightarrow \infty} x
$$
and $\alpha$ as $\beta$'s reciprocal. From my understanding of limits, that just means $\beta$ is essentially some very large number, so I should still be able to do arithmetic with it ($\alpha \beta = 1$, $\beta - \beta = 0$, etc.).
So then my equation becomes:
$$
\frac{\beta - \tan x}{1 + \beta \tan x} = \frac{\beta - \tan x}{1 + \beta \tan x} \cdot \frac{\alpha}{\alpha} = \frac{1 - \alpha \tan x}{\alpha + \tan x}
$$
which is essentially $\cot x$ at the end, because $\alpha \approx 0$.
I have been constantly told not to use infinities in equations since elementary school, yet here it seems to yield the correct answer. Why is that, and when can these infinities be used in equations? If I got this wrong, where did I err?

REPLY [2 votes]: $$
\begin{aligned}
\tan \left(\frac{\pi}{2}-x\right) &=\frac{\sin \left(\frac{\pi}{2}-x\right)}{\cos \left(\frac{\pi}{2}-x\right)} \\
&=\frac{\cos x}{\sin x} \\
&=\cot x
\end{aligned}
$$