1. ## Limit question

I have the integral of tanx dx integrating from 0 to pi. Because of the asymptote at pi/2 I split the integral up but when I work it all out i get infinity - infinity? which is undefined. How could I rewrite this to make it work?

2. Originally Posted by flatwhitecrx
I have the integral of tanx dx integrating from 0 to pi. Because of the asymptote at pi/2 I split the integral up but when I work it all out i get infinity - infinity? which is undefined. How could I rewrite this to make it work?
Use $\displaystyle \frac{sinx}{cosx}$ then do a u-substitution with u=cosx du=-sinx
Factor out the negative so you will have:

$\displaystyle - \int \frac{1}{u} du$

Then integrate.

3. Wait, so how exactly will i subsitule that in?
Will I not have to do a limit?

4. Originally Posted by flatwhitecrx
Wait, so how exactly will i subsitule that in?
Will I not have to do a limit?
Oops! Sorry I just noticed that you had limits in there, sorry. The easiest thing to do is to change your limits of integration so that you can lust evaluate them at u instead of having to replace u with the original substitution. Here is what you do:

So we have:

$\displaystyle \int^{\pi}_{0} tan(x) dx$

$\displaystyle = \int^{\pi}_{0} \frac{sinx}{cosx}$

Let $\displaystyle u = cosx$

$\displaystyle du = - sinx dx$

Then change your limits by plugging in the old limits into your equation for u:

$\displaystyle u = cos(\pi) = -1$

$\displaystyle u = cos(0) = 1$

$\displaystyle -\int^{-1}_{1} \frac{1}{u} du$

Integrate and just evaluate at those new limits. Just integrate 1/u the same way you would integrate 1/x

Does that help?

5. well, considering I can't remember ever doing that in class, I'm not sure he would accept me doing that. It says evaluate the integral or show that it diverges. I just confused because I can't think of any way to rewrite it so that the it doesn't come out to be undefined. You know?

6. Originally Posted by flatwhitecrx
well, considering I can't remember ever doing that in class, I'm not sure he would accept me doing that. It says evaluate the integral or show that it diverges. I just confused because I can't think of any way to rewrite it so that the it doesn't come out to be undefined. You know?
It should be clear that the integral diverges.

when you go to integrate $\displaystyle \int_0^{\pi}\tan x\,dx$, you apply the substitution $\displaystyle u=\cos x$ to end up with the integral $\displaystyle \int_{-1}^1\frac1u\,du$. But this gives us $\displaystyle \left.\left[\ln u\right]\right|_{-1}^1$. Since $\displaystyle \ln u$ is only defined over $\displaystyle u>0$, $\displaystyle \left.\left[\ln u\right]\right|_{-1}^1\rightarrow\lim_{a\to0^+}\left.\left[\ln u\right]\right|_{a}^1=\lim_{a\to0^+}-\ln a=+\infty$

Thus, the integral diverges.

7. Originally Posted by flatwhitecrx
well, considering I can't remember ever doing that in class, I'm not sure he would accept me doing that. It says evaluate the integral or show that it diverges. I just confused because I can't think of any way to rewrite it so that the it doesn't come out to be undefined. You know?
Just so you know, if you haven't learned u-substitution yet, you will very soon and you will use it all the time. There is no way around it...

The integral of tan(x) = -ln|cos(x)|which is defined for all x except where tan(x) itself is undefined.

If you plug in cos(x) back into your equation for u and then integrate, you get:

$\displaystyle - \int^{\pi}_{0} \frac{1}{cos(x)}dx$

$\displaystyle = - \left[ln \left|cos(x)\right|\right]$

*Note the absolute value of your cos function!

So, $\displaystyle |cos(\pi)| = 1$ and $\displaystyle |cos(0)| = 1$

So, $\displaystyle ln(1) - ln(1) = 0$

8. Originally Posted by mollymcf2009
The integral of tan(x) = -ln|cos(x)| which is defined for all x except where tan(x) itself is undefined.
Correct.

If you plug in cos(x) back into your equation for u and then integrate, you get:

$\displaystyle - \int^{\pi}_{0} \frac{1}{cos(x)}dx$

$\displaystyle = - \left[ln \left|cos(x)\right|\right]$

*Note the absolute value of your cos function!
$\displaystyle \int\frac{\,dx}{\cos x}=\int\sec x\,dx\neq-\ln\!\left|\cos x\right|$. $\displaystyle \int\sec x\,dx=\ln\left|\sec x+\tan x\right|+C$!!

So, $\displaystyle |cos(\pi)| = 1$ and $\displaystyle |cos(0)| = 1$

So, $\displaystyle ln(1) - ln(1) = 0$
This is "valid", but when you plot the tangent fuction on the interval $\displaystyle \left[0,\pi\right]$, you see that its area is infinite, but its net area is zero... ><

And then again, it comes down to whether or not we're looking for net area or area... XD

9. You can't integrate over a singularity

you have to integrate this from 0 to pi/2 and then pi/2 to pi

If either integral diverges the integral over the entire interval diverges.

You know inf -inf is indeterminate not necessarily 0
for eg lim (x-ln(x)) is inf

So there is no "net area" of 0-- the integral diverges period

10. Ok, I figured it out. Thank you guys.