# Thread: Integration by change of variable

1. ## Integration by change of variable

I've been trying to show that
$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 $x = \sin{\frac{\theta}{2}}$ and $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 $x = \sin{\frac{\theta}{2}}$ as the substitution, where I get $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 $\frac{1}{1+\cos^2{\theta}}$ and $\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
$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 $x = \sin{\frac{\theta}{2}}$ and $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 $x = \sin{\frac{\theta}{2}}$ as the substitution, where I get $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 $\frac{1}{1+\cos^2{\theta}}$ and $\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:

$\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} =$

$= - \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 $x = \cos \theta, \, dx = - \sin \theta \, d\theta$

$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 $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 $I = -\pi + \int^\pi_{-\pi}{\frac{2}{3-\cos{\theta}}d\theta}$. If you want I can do it.
Also, the substitution $\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 $\frac{1}{1+\cos^2{\theta}}$ and $\frac{2}{3-\cos{\theta}}$ are different, so I think I'm probably using the wrong substitution.
Just a point:

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

7. Originally Posted by DeMath
Hint:

$\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} =$

$= - \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 $x = \cos \theta, \, dx = - \sin \theta \, d\theta$

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

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

8. Originally Posted by signature
$\frac{1}{1 + \cos^2{\theta}}$ is an even function, so it is symmetric about the $f(\theta)$ axis.
That is, $\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 $-2\int^0_{\pi}{\frac{1}{1 + \cos^2{\theta}} d\theta} = \int^\pi_{-\pi}{\frac{1}{1 + \cos^2{\theta}} d\theta}$