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?
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$
So your new integral is:
$\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?
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.
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 $
Correct.
$\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$!!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!
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... ><So, $\displaystyle |cos(\pi)| = 1$ and $\displaystyle |cos(0)| = 1$
So, $\displaystyle ln(1) - ln(1) = 0 $
And then again, it comes down to whether or not we're looking for net area or area... XD
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