$\tan(\frac{\pi}{2}) = \infty~$? 
Evaluate $\displaystyle \int\nolimits^{\pi}_{0} \frac{dx}{5 + 4\cos{x}}$ by using the substitution $t = \tan{\frac{x}{2}}$

For the question above, by changing variables, the integral can be rewritten as $\displaystyle \int \frac{\frac{2dt}{1+t^2}}{5 + 4\cos{x}}$, ignoring the upper and lower limits. 
However, after changing variables from $dx$ to $dt$, when $x = 0~$,$~t = \tan{0} = 0~$ but when $ x = \frac{\pi}{2}~$, $~t = \tan{\frac{\pi}{2}}~$, so can the integral technically be written as $\displaystyle \int^{\tan{\frac{\pi}{2}}}_{0} \frac{\frac{2dt}{1+t^2}}{5 + 4\cos{x}}~$, and if so, is it also reasonable to write it as $\displaystyle \int^{\infty}_{0} \frac{\frac{2dt}{1+t^2}}{5 + 4\cos{x}}$
EDIT: In response to confusion, my question is: Is it technically correct to write the above integral in the form with an upper limit of $\tan{\frac{\pi}{2}}$ and furthermore, is it is reasonable to equate $\tan{\frac{\pi}{2}}$ with $\infty$ and substitute it on the upper limit?

Well, In my opinion it is correct to write what you have stated. But for the sake of convenience we don't actually write in that way. For example if your integral had some substitution in which the limit's after substitution changes to $t = \sin\frac{\pi}{3} = \frac{\sqrt{3}}{2}$, it is better we write the limit as it's value instead of writing $\sin\frac{\pi}{3}$. 
