- #1
BobbyBear
- 162
- 1
I needed to evaluate the following integral (for constructing Chebyshev polynomials by an orthogonalisation process), but I just discovered that I'm having an issue with the change of variable technique:P The specific integral itself is unimportant as to the issue I'm having, but by means of an example this is the one I was solving when it arose:
[tex]
\int_{-1}^{1} \frac{1}{\sqrt{1 - x^2}} dx
[/tex]
And I believe this is done with the following change of variable:
[tex]
x = g(\theta) = cos (\theta); \ \ \rightarrow \ \ dx= g'(\theta) = -sin(\theta)d\theta
[/tex]
But since the transformation has to be bijective (or however you say:P), one would have to limit the range of [tex]\theta[/tex] otherwise the inverse relationship [tex]\theta = g^{-1}(x) [/tex] would not be a single valued function.
So for example, I can restrict [tex]\theta[/tex] as so: [tex]
0 \leq\theta \leq \pi
[/tex]
in which case [tex]g^{-1}(x=-1)=\pi ; \ \ \ g^{-1}(x=1)=0 [/tex]
and thus:
[tex]
\int_{-1}^{1} \frac{1}{\sqrt{1 - x^2}} dx = \int_{\pi}^{0} \frac{-sin(\theta)}{\sqrt{(sin(\theta)^2}} d\theta = \int_{\pi}^{0} -d\theta = \int_{0}^{\pi} d\theta = \pi
[/tex]
BUT! if for example I use the same transformation but restricting [tex]\theta[/tex] to: [tex]
\pi \leq\theta \leq 2\pi
[/tex]
then I have: [tex]g^{-1}(x=-1)=\pi ; \ \ \ g^{-1}(x=1)=2\pi [/tex]
and:
[tex]
\int_{-1}^{1} \frac{1}{\sqrt{1 - x^2}} dx = \int_{\pi}^{2\pi} \frac{-sin(\theta)}{\sqrt{(sin(\theta)^2}} d\theta = \int_{\pi}^{2\pi} -d\theta = -\pi
[/tex]
I know the answer has to be [tex]\pi[/tex] because the integrand in terms of the original variable is always positive for [tex]x\in (-1,1)[/tex], thus the integral has to be positive. And I know that different signs I'm getting is because in one case my transformation is such that [tex]\theta[/tex] is increasing with increasing x (ie. [tex]g'>0[/tex]) and in the other [tex]\theta[/tex] is decreasing with increasing x (ie. [tex]g'<0[/tex]), but . . . the sign of [tex]g'<0[/tex] should compensate the change in the order of the limits of integration and I shouldn't have to worry about that, no? I just can't see what I'm doing wrong in either case, although I'm certainly doing something wrong!:(
[tex]
\int_{-1}^{1} \frac{1}{\sqrt{1 - x^2}} dx
[/tex]
And I believe this is done with the following change of variable:
[tex]
x = g(\theta) = cos (\theta); \ \ \rightarrow \ \ dx= g'(\theta) = -sin(\theta)d\theta
[/tex]
But since the transformation has to be bijective (or however you say:P), one would have to limit the range of [tex]\theta[/tex] otherwise the inverse relationship [tex]\theta = g^{-1}(x) [/tex] would not be a single valued function.
So for example, I can restrict [tex]\theta[/tex] as so: [tex]
0 \leq\theta \leq \pi
[/tex]
in which case [tex]g^{-1}(x=-1)=\pi ; \ \ \ g^{-1}(x=1)=0 [/tex]
and thus:
[tex]
\int_{-1}^{1} \frac{1}{\sqrt{1 - x^2}} dx = \int_{\pi}^{0} \frac{-sin(\theta)}{\sqrt{(sin(\theta)^2}} d\theta = \int_{\pi}^{0} -d\theta = \int_{0}^{\pi} d\theta = \pi
[/tex]
BUT! if for example I use the same transformation but restricting [tex]\theta[/tex] to: [tex]
\pi \leq\theta \leq 2\pi
[/tex]
then I have: [tex]g^{-1}(x=-1)=\pi ; \ \ \ g^{-1}(x=1)=2\pi [/tex]
and:
[tex]
\int_{-1}^{1} \frac{1}{\sqrt{1 - x^2}} dx = \int_{\pi}^{2\pi} \frac{-sin(\theta)}{\sqrt{(sin(\theta)^2}} d\theta = \int_{\pi}^{2\pi} -d\theta = -\pi
[/tex]
I know the answer has to be [tex]\pi[/tex] because the integrand in terms of the original variable is always positive for [tex]x\in (-1,1)[/tex], thus the integral has to be positive. And I know that different signs I'm getting is because in one case my transformation is such that [tex]\theta[/tex] is increasing with increasing x (ie. [tex]g'>0[/tex]) and in the other [tex]\theta[/tex] is decreasing with increasing x (ie. [tex]g'<0[/tex]), but . . . the sign of [tex]g'<0[/tex] should compensate the change in the order of the limits of integration and I shouldn't have to worry about that, no? I just can't see what I'm doing wrong in either case, although I'm certainly doing something wrong!:(