# $\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?

-
What is your actual question? – lhf Jun 13 '11 at 12:40
@Ihf: Whether or not it is technically correct to write it in the form with upper limit $\tan{\frac{\pi}{2}}$ and furthermore, if it is reasonable to equate $\tan{\frac{\pi}{2}}$ with $\infty$ and substitute it on the upper limit. – amy Jun 13 '11 at 12:43
It is proper manners re-express the entire integral in $t$ when you change the variables of integration. – ncmathsadist Jun 13 '11 at 12:46
@ncmathsadist: I understand that the $x$ terms must be converted to $t$, but for the sake of simplicity, I didn't convert it, because the main intention of the question was to ask if the limits are technically correct within this context. – amy Jun 13 '11 at 12:49
Oops. Didn't read the question properly. Please ignore the close as dupe vote. – Aryabhata Jun 13 '11 at 16:10

Yes, and you can work with limits if you're uncomfortable with an unbounded integral :

Obviously, $\int_0^\pi f(x)dx = \lim_{a \to \pi} \int_0^a f(x)dx$.

By a change of variable, you get $\int_0^a f(x)dx = \int_0^{\tan \frac a2} g(t)dt$. Since $\lim_{a \to \pi} \tan \frac a2 = + \infty$, the limit $\lim_{b \to \infty} \int_0^b g(t)dt$ exists, and we call it $\int_0^\infty g(t)dt$.

Usually, we define $\int_0^\infty g(t)dt$ only when $\lim_{b \to \infty} \int_0^b |g(t)|dt$ exists, otherwise some strange things can happen. Here, $f$ and $g$ are positive so there is no difference.

-
Thanks, I particularly liked your manipulation of the limits. – amy Jun 13 '11 at 13:35
I would suggest writing this improper integral with one-sided limits, since $\displaystyle \lim_{a\to\pi^-}\tan(a/2)=\infty$ and $\displaystyle \lim_{a\to\pi^+}\tan(a/2)=-\infty$ – wckronholm Jun 13 '11 at 16:10

Continuing from my comment, you have $$\cos(t) = \cos^2(t/2) - \sin^2(t/2) = {1-t^2\over 1+ t^2}.$$

Restating the integral with the transformation gives $$\int_0^\infty {1\over 5 + 4\left({1-t^2 \over 1 + t^2}\right)}{2\, dt\over 1 + t^2} = 2\int_0^\infty {dt\over 9 + t^2}.$$

-
I apologize if my question wasn't stated clearly enough, but I was asking "whether or not it is technically correct to write it in the form with upper limit $\tan{\frac{\pi}{2}}$ and furthermore, if it is reasonable to equate $\tan{\frac{\pi}{2}}$ with $\infty$ and substitute it on the upper limit". – amy Jun 13 '11 at 13:00

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}$.

-

This standard substitution is used for finding integrals of rational functions of sine and cosine. Here's the Wikipedia article about it:

http://en.wikipedia.org/wiki/Weierstrass_substitution

-