# Thread: Integration by change of variable

1. ## Integration by change of variable

I've been trying to show that
$\displaystyle I = \int^1_{-1}{\frac{\sqrt{1-x^2}}{1+x^2}dx} = -\pi + \int^\pi_{-\pi}{\frac{1}{1+\cos^2{\theta}}d\theta}$

(I've not had any problems with the integration though)

I've tried $\displaystyle x = \sin{\frac{\theta}{2}}$ and $\displaystyle x = \tan{\frac{\theta}{4}}$ as substitutions, but I can only get so far before I get stuck.

The most progress I've made is with $\displaystyle x = \sin{\frac{\theta}{2}}$ as the substitution, where I get $\displaystyle I = -\pi + \int^\pi_{-\pi}{\frac{2}{3-\cos{\theta}}d\theta}$ but then I can't see how to proceed further.

Incidentally, I noticed that the graphs for $\displaystyle \frac{1}{1+\cos^2{\theta}}$ and $\displaystyle \frac{2}{3-\cos{\theta}}$ are different, so I think I'm probably using the wrong substitution.

Can anyone point me in the right direction?
(this is part of a question in complex analysis)

2. Originally Posted by peterje
I've been trying to show that
$\displaystyle I = \int^1_{-1}{\frac{\sqrt{1-x^2}}{1+x^2}dx} = -\pi + \int^\pi_{-\pi}{\frac{1}{1+\cos^2{\theta}}d\theta}$

(I've not had any problems with the integration though)

I've tried $\displaystyle x = \sin{\frac{\theta}{2}}$ and $\displaystyle x = \tan{\frac{\theta}{4}}$ as substitutions, but I can only get so far before I get stuck.

The most progress I've made is with $\displaystyle x = \sin{\frac{\theta}{2}}$ as the substitution, where I get $\displaystyle I = -\pi + \int^\pi_{-\pi}{\frac{2}{3-\cos{\theta}}d\theta}$ but then I can't see how to proceed further.

Incidentally, I noticed that the graphs for $\displaystyle \frac{1}{1+\cos^2{\theta}}$ and $\displaystyle \frac{2}{3-\cos{\theta}}$ are different, so I think I'm probably using the wrong substitution.

Can anyone point me in the right direction?
(this is part of a question in complex analysis)
Hint:

$\displaystyle \int\limits_{ - 1}^1 {\frac{{\sqrt {1 - {x^2}} }} {{1 + {x^2}}}dx} = \int\limits_{ - 1}^1 {\frac{{1 - {x^2}}} {{\left( {1 + {x^2}} \right)\sqrt {1 - {x^2}} }}dx} = \int\limits_{ - 1}^1 {\frac{{2 - \left( {1 + {x^2}} \right)}} {{\left( {1 + {x^2}} \right)\sqrt {1 - {x^2}} }}dx} =$

$\displaystyle = - \int\limits_{ - 1}^1 {\frac{{dx}}{{\sqrt {1 - {x^2}} }}} + 2\int\limits_{ - 1}^1 {\frac{{dx}}{{\left( {1 + {x^2}} \right)\sqrt {1 - {x^2}} }}} = - \pi + 2\int\limits_{ - 1}^1 {\frac{{dx}}{{\left( {1 + {x^2}} \right)\sqrt {1 - {x^2}} }}} .$

Now try to use this substitution $\displaystyle x = \cos \theta, \, dx = - \sin \theta \, d\theta$

$\displaystyle 2\int\limits_{ - 1}^1 {\frac{{dx}} {{\left( {1 + {x^2}} \right)\sqrt {1 - {x^2}} }}} = \left\{ \begin{gathered} x = \cos \theta, \hfill \\ dx = - \sin \theta\,d\theta \hfill \\ \end{gathered} \right\} = - 2\int\limits_\pi ^0 {\frac{{d\theta}} {{1 + {{\cos }^2}\theta}}} = \int\limits_{ - \pi }^\pi {\frac{{d\theta}} {{1 + {{\cos }^2}\theta}}} .$

3. If you know the residue theorem from complex analysis, it is easy to solve integrals like $\displaystyle I = -\pi + \int^\pi_{-\pi}{\frac{2}{3-\cos{\theta}}d\theta}$. If you want I can do it.

4. Originally Posted by Bruno J.
If you know the residue theorem from complex analysis, it is easy to solve integrals like $\displaystyle I = -\pi + \int^\pi_{-\pi}{\frac{2}{3-\cos{\theta}}d\theta}$. If you want I can do it.
Also, the substitution $\displaystyle \theta=2\arctan\vartheta$ may be useful...as an alternative to CA.

5. DeMath: Thanks a lot. I didn't think to use the fact it's an even function.

Bruno J.: I've had no problems solving the integral, but thanks for the offer of help anyway.

6. Originally Posted by peterje
Incidentally, I noticed that the graphs for $\displaystyle \frac{1}{1+\cos^2{\theta}}$ and $\displaystyle \frac{2}{3-\cos{\theta}}$ are different, so I think I'm probably using the wrong substitution.
Just a point:

$\displaystyle \int_0^1 x\text{ }dx=\int_0^1\frac{\pi\sin(\pi x)}{2}\text{ }dx$

7. Originally Posted by DeMath
Hint:

$\displaystyle \int\limits_{ - 1}^1 {\frac{{\sqrt {1 - {x^2}} }} {{1 + {x^2}}}dx} = \int\limits_{ - 1}^1 {\frac{{1 - {x^2}}} {{\left( {1 + {x^2}} \right)\sqrt {1 - {x^2}} }}dx} = \int\limits_{ - 1}^1 {\frac{{2 - \left( {1 + {x^2}} \right)}} {{\left( {1 + {x^2}} \right)\sqrt {1 - {x^2}} }}dx} =$

$\displaystyle = - \int\limits_{ - 1}^1 {\frac{{dx}}{{\sqrt {1 - {x^2}} }}} + 2\int\limits_{ - 1}^1 {\frac{{dx}}{{\left( {1 + {x^2}} \right)\sqrt {1 - {x^2}} }}} = - \pi + 2\int\limits_{ - 1}^1 {\frac{{dx}}{{\left( {1 + {x^2}} \right)\sqrt {1 - {x^2}} }}} .$

Now try to use this substitution $\displaystyle x = \cos \theta, \, dx = - \sin \theta \, d\theta$

$\displaystyle 2\int\limits_{ - 1}^1 {\frac{{dx}} {{\left( {1 + {x^2}} \right)\sqrt {1 - {x^2}} }}} = \left\{ \begin{gathered} x = \cos \theta, \hfill \\ dx = - \sin \theta\,d\theta \hfill \\ \end{gathered} \right\} = - 2\int\limits_\pi ^0 {\frac{{d\theta}} {{1 + {{\cos }^2}\theta}}} = \int\limits_{ - \pi }^\pi {\frac{{d\theta}} {{1 + {{\cos }^2}\theta}}} .$
Can you please explain

I don't understand how the "2" disappears, and how the limits change.

8. Originally Posted by signature
Can you please explain

I don't understand how the "2" disappears, and how the limits change.
$\displaystyle \frac{1}{1 + \cos^2{\theta}}$ is an even function, so it is symmetric about the $\displaystyle f(\theta)$ axis.

That is, $\displaystyle \int^0_{-\pi}{\frac{1}{1 + \cos^2{\theta}} d\theta} = \int^\pi_0{\frac{1}{1 + \cos^2{\theta}} d\theta}$

So I hope it's clear that $\displaystyle -2\int^0_{\pi}{\frac{1}{1 + \cos^2{\theta}} d\theta} = \int^\pi_{-\pi}{\frac{1}{1 + \cos^2{\theta}} d\theta}$