# Thread: [SOLVED] Integration by parts : existence ??

1. ## [SOLVED] Integration by parts : existence ??

Hi

Another question, not mine this time

--------------------------------------------------
Say we want to compute $\int \tan(x) ~dx=\int \frac{\sin(x)}{\cos(x)} ~dx$

Integration by parts :
$dv=\sin(x) \Rightarrow v=-\cos(x)$
$u=\frac{1}{\cos(x)} \Rightarrow du=\frac{\sin(x)}{\cos^2(x)}$

So $\int \frac{\sin(x)}{\cos(x)} ~dx=\left[\frac{-\cos(x)}{\cos(x)}\right]+\int \frac{\sin(x)}{\cos(x)} ~dx=-1+\int \frac{\sin(x)}{\cos(x)} ~dx$

$\boxed{0=1}$ ???

What went wrong ?
(I know we can recognize -ln(cos(x))

Now, there is the same problem with the integration by parts if we want to compute $\int_0^{\pi/4} \tan(x) ~dx$ (I mean for a definite integral)

-------------------------------------------------
Another integral :
$\int_0^{\pi/2} \frac{1}{1+\cos(x)} ~dx$
Apart from the Weierstrass substitution $t=\tan \tfrac x2$ or complex analysis...

Thaaaaaaaaank you

2. Originally Posted by Moo
Hi

Another question, not mine this time

--------------------------------------------------
Say we want to compute $\int \tan(x) ~dx=\int \frac{\sin(x)}{\cos(x)} ~dx$

Integration by parts :
$dv=\sin(x) \Rightarrow v=-\cos(x)$
$u=\frac{1}{\cos(x)} \Rightarrow du=\frac{\sin(x)}{\cos^2(x)}$

So $\int \frac{\sin(x)}{\cos(x)} ~dx=\left[\frac{-\cos(x)}{\cos(x)}\right]+\int \frac{\sin(x)}{\cos(x)} ~dx=-1+\int \frac{\sin(x)}{\cos(x)} ~dx$

$\boxed{0=1}$ ???

What went wrong ?
Nothing, because 0=1, up to a constant

The confusion comes for the "hooks" part: $\left[\frac{-\cos}{\cos}\right]=[-1]$. Either this is definite integration, and you substract using the bounds of the integrals, say $(-1)(b)-(-1)(a)=(-1)-(-1)=0$, or this is undefinite integration, and the result gives an antiderivative, which is unique "up to a constant".

3. Originally Posted by Laurent
Nothing, because 0=1, up to a constant

The confusion comes for the "hooks" part: $\left[\frac{-\cos}{\cos}\right]=[-1]$. Either this is definite integration, and you substract using the bounds of the integrals, say $(-1)(b)-(-1)(a)=(-1)-(-1)=0$, or this is undefinite integration, and the result gives an antiderivative, which is unique "up to a constant".
That was... hmmm simple lol ><

As for the second integral, I've though of the substitution t=pi/2-x
and then multiply by (1-sin(x))(1-sin(x))
however, there is a problem for the lower bound :s

4. Hello, Moo!

Ha! . . . Good one!

Say we want to compute $\int \tan(x)\,dx \;=\;\int \frac{\sin(x)}{\cos(x)}\,dx$

Integration by parts: . $\begin{array}{ccccccc}dv\:=\:\sin(x) &\Rightarrow& v\:=\:-\cos(x) \\

u\:=\:\frac{1}{\cos(x)}& \Rightarrow & du\:=\:\frac{\sin(x)}{\cos^2(x)} \end{array}$

So: . $\int \frac{\sin(x)}{\cos(x)}\,dx \;=\;\left[\frac{-\cos(x)}{\cos(x)}\right]+\int \frac{\sin(x)}{\cos(x)}\,dx\;=\;-1+\int \frac{\sin(x)}{\cos(x)}\,dx$

$\boxed{0=1}$ ???

What went wrong ? (Worried)

You forgot the "plus C" . . .

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

A classic proof that "1 = 0".

Integrate: . $\int\sin x\cos x\,dx$

(a) We have: . $\int\sin x(\cos x\,dx)$

Let $u \,=\,\sin x \quad\Rightarrow\quad du \,=\,\cos x\,dx$

Substitute: . $\int u\,du \;=\;\tfrac{1}{2}u^2$

Back-substitute: . $\tfrac{1}{2}\sin^2\!x$ .[1]

(b) We have: . $\int\cos x(\sin x\,dx)$

Let $u \,=\,\cos x\quad\Rightarrow\quad du \,=\,-\sin x\,dx$

Substitute: . $\int u(-du) \;=\;-\tfrac{1}{2}u^2$

Back-substitute: . $-\tfrac{1}{2}\cos^2\!x$ .[2]

Since [1] and [2] are equal, we have: . $\tfrac{1}{2}\sin^2\!x \:=\:-\tfrac{1}{2}\cos^2\!x$

Therefore: . $\sin^2\!x \:=\:-\cos^2\!x \quad\Rightarrow\quad\sin^2\!x + \cos^2\!x \:=\:0 \quad\Rightarrow\quad 1 \:=\:0$

5. $
\int_0^{{\raise0.5ex\hbox{\scriptstyle \pi }
\kern-0.1em/\kern-0.15em
\lower0.25ex\hbox{\scriptstyle 2}}} {{\textstyle{{dx} \over {1 + \cos \left( x \right)}}}} = \int_0^{{\raise0.5ex\hbox{\scriptstyle \pi }
\kern-0.1em/\kern-0.15em
\lower0.25ex\hbox{\scriptstyle 2}}} {{\textstyle{{1 - \cos \left( x \right)} \over {\sin ^2 \left( x \right)}}}dx}
$
$
= - \int_0^{{\raise0.5ex\hbox{\scriptstyle \pi }
\kern-0.1em/\kern-0.15em
\lower0.25ex\hbox{\scriptstyle 2}}} {\left( {1 - \cos \left( x \right)} \right) \cdot \left( {\cot \left( x \right)} \right)^\prime dx}
$

Now integrate by parts.

6. Originally Posted by Soroban
You forgot the "plus C" . . .
Yes, but I think I forgot it because the integral signs were kept... that was stupid

Originally Posted by PaulRS
$
\int_0^{{\raise0.5ex\hbox{\scriptstyle \pi }
\kern-0.1em/\kern-0.15em
\lower0.25ex\hbox{\scriptstyle 2}}} {{\textstyle{{dx} \over {1 + \cos \left( x \right)}}}} = \int_0^{{\raise0.5ex\hbox{\scriptstyle \pi }
\kern-0.1em/\kern-0.15em
\lower0.25ex\hbox{\scriptstyle 2}}} {{\textstyle{{1 - \cos \left( x \right)} \over {\sin ^2 \left( x \right)}}}dx}
$
$
= - \int_0^{{\raise0.5ex\hbox{\scriptstyle \pi }
\kern-0.1em/\kern-0.15em
\lower0.25ex\hbox{\scriptstyle 2}}} {\left( {1 - \cos \left( x \right)} \right) \cdot \left( {\cot \left( x \right)} \right)^\prime dx}
$

Now integrate by parts.
Looks like you've been playing with the latex

Oh yeah, and $\lim_{x \to 0} (1-\cos(x)) \cot(x)$ must be defined...

Here is the problem I've come up with ...
substitute $t=\pi/2-x$
then the integral is now :
$\int_0^{\pi/2} \frac{dx}{1+\sin(x)} ~dx=\int_0^{\pi/2} \frac{1}{\cos^2(x)}-\frac{\sin(x)}{\cos^2(x)} ~dx$
If we separate the difference and compute the two integrals independently, there is a problem because the limit $\frac{1}{\cos(x)}$ when x goes to pi/2 is not defined.
Is it wrong because since the two terms are not integrable, we can't separate the difference ?
So I guess it's an integration by parts exactly like in yours that we have to do here ^^'

7. Originally Posted by Moo
Yes, but I think I forgot it because the integral signs were kept... that was stupid

Looks like you've been playing with the latex

Oh yeah, and $\lim_{x \to 0} (1-\cos(x)) \cot(x)$ must be defined...
That limit is obviously 0

You cannot separate because the integrals are divergent, it'd be like writing $+\infty-\infty=\text{a real number}$.

Unless you change the integration limits, say to $\pi-\epsilon$ and $\epsilon$ with $0<\epsilon<1$ and then take $\epsilon\to 0$

8. $\int_0^{\pi/2} \frac{dx}{1+\cos(x)}$

Substitute $x=2t$ :

and using the identity $1+\cos 2t=2 \cos^2(t)$ :
$\int_0^{\pi/4} \frac{dt}{\cos^2(t)}=[\tan(t)]_0^{\pi/4}=1$