# Thread: Question of change of variables in definite integral.

1. ## Question of change of variables in definite integral.

I want to proof:
$\displaystyle \int_{-\pi}^0 e^{jz\cos \theta}\cos(m\theta) d\theta=\int_0^{\pi} e^{jz\cos \theta}\cos(m\theta) d\theta$

I did it in two different way as shown below:

(1) Let $\displaystyle \theta=-\theta\;\Rightarrow\; d\theta=-d\theta,\;\cos(-\theta)=\cos\theta,\;\cos[m(-\theta)]=\cos(m\theta)$

$\displaystyle \int_{-\pi}^0 e^{jz\cos \theta}\cos(m\theta) d\theta=-\int_{\pi}^0 e^{jz\cos \theta}\cos(m\theta) d\theta=\int_0^{\pi}e^{jz\cos \theta}\cos(m\theta) d\theta$

BUT

(2) Let $\displaystyle \theta=\pi+\theta\;\Rightarrow\; d\theta=d\theta,\;\cos(\pi+\theta)=-\cos\theta$

$\displaystyle \int_{-\pi}^0 e^{jz\cos \theta}\cos(m\theta) d\theta=\int_0^{\pi} e^{-jz\cos \theta}\cos(m\pi+m\theta) d\theta$

$\displaystyle \cos(m\pi+m\theta)=\cos(m\pi)\cos(m\theta)-\sin(m\pi)\sin(m\theta)=(-1)^m \cos(m\theta)$

$\displaystyle \Rightarrow\;\int_{-\pi}^0 e^{jz\cos \theta}\cos(m\theta) d\theta=\int_0^{\pi} \frac{1}{e^{jz\cos \theta}}(-1)^m \cos(m\theta) d\theta$

Obviously the two ways give different result. What happened?

Thanks

2. ## Re: Question of change of variables in definite integral.

Going from $\displaystyle -\pi$ to $\displaystyle \pi$ is adding $\displaystyle 2\pi$ NOT $\displaystyle \pi$.
$\displaystyle Cos(m(\theta+ 2\pi)= cos(m\theta+ 2m\pi)= cos(m\theta)cos(2m\pi)- sin(m\theta)sin(2m\pi)= cos(m\theta)$
because $\displaystyle cos(2m\pi)= 1$ and $\displaystyle sin(2m\pi)= 0$ for all m.

3. ## Re: Question of change of variables in definite integral.

Originally Posted by HallsofIvy
Going from $\displaystyle -\pi$ to $\displaystyle \pi$ is adding $\displaystyle 2\pi$ NOT $\displaystyle \pi$.
$\displaystyle Cos(m(\theta+ 2\pi)= cos(m\theta+ 2m\pi)= cos(m\theta)cos(2m\pi)- sin(m\theta)sin(2m\pi)= cos(m\theta)$
because $\displaystyle cos(2m\pi)= 1$ and $\displaystyle sin(2m\pi)= 0$ for all m.
This is not the case in (2). I am going from $\displaystyle \;\int_{-\pi}^{0}\;$ to $\displaystyle \;\int_{0}^{\pi}\;$. Nothing about 2$\displaystyle \pi$. This is done by $\displaystyle \;(\theta=\theta + \pi)\;$, not $\displaystyle \;(\theta=\theta + 2\pi)\;$

4. ## Re: Question of change of variables in definite integral.

The limits for the second transformation are wrong aren't they ?

If $\displaystyle \theta \rightarrow \pi + \theta,$

then

$\displaystyle (-\pi,0) \rightarrow (-2\pi,-\pi).$

Your problem, as I see it, is caused by your use of the same symbol for both the original and the transformed variable. What you have done, is to use the transformation $\displaystyle \theta \rightarrow \pi + \theta,$ for the integrand, but the transformation $\displaystyle \theta + \pi \rightarrow \theta$ for the limits.

5. ## Re: Question of change of variables in definite integral.

Originally Posted by BobP
The limits for the second transformation are wrong aren't they ?

If $\displaystyle \theta \rightarrow \pi + \theta,$

then

$\displaystyle (-\pi,0) \rightarrow (-2\pi,-\pi).$

Your problem, as I see it, is caused by your use of the same symbol for both the original and the transformed variable. What you have done, is to use the transformation $\displaystyle \theta \rightarrow \pi + \theta,$ for the integrand, but the transformation $\displaystyle \theta + \pi \rightarrow \theta$ for the limits.
You can use $\displaystyle \;u=\pi+\theta\;$ to make it less confusing if you like.

It is not right to say If $\displaystyle \theta \rightarrow \pi + \theta,$ $\displaystyle (-\pi,0) \rightarrow (-2\pi,-\pi).$

Lets make it clearer, Let $\displaystyle \; (u=\pi+\theta),\;[-\pi,0]\;\rightarrow\;[0,\pi]$

Then

(2) Let $\displaystyle u=\pi+\theta\;\Rightarrow\; du=d\theta,\;\cos(\pi+\theta)=-\cos\theta$

$\displaystyle \int_{-\pi}^0 e^{jz\cos u}\cos(mu) du=\int_0^{\pi} e^{-jz\cos \theta}\cos(m\pi+m\theta) d\theta$

$\displaystyle \cos(m\pi+m\theta)=\cos(m\pi)\cos(m\theta)-\sin(m\pi)\sin(m\theta)=(-1)^m \cos(m\theta)$

$\displaystyle \Rightarrow\;\int_{-\pi}^0 e^{jz\cos \theta}\cos(m\theta) d\theta=\int_0^{\pi} \frac{1}{e^{jz\cos \theta}}(-1)^m \cos(m\theta) d\theta$

Sorry about the confusion

Thanks

6. ## Re: Question of change of variables in definite integral.

You seem to be going out of your way to confuse yourself, and you're still making the same mistake.

For your last calculation, you are now using $\displaystyle u$ as the 'original' variable and $\displaystyle \theta$ as the 'transformed' variable and the relationship between them is $\displaystyle u=\pi + \theta.$

For the stuff to the right of the integral sign $\displaystyle u$ is being replaced by $\displaystyle \pi + \theta.$

If you use the same replacement method for the limits, as you must, then you have to say that,

when $\displaystyle u = -\pi,$ then $\displaystyle \theta$ is given by $\displaystyle -\pi = \pi + \theta.$ That is, $\displaystyle \theta = -2\pi.$

Similarly when $\displaystyle u = 0,\text{ } \theta = -\pi.$

The limits $\displaystyle (-\pi, 0) \text{ transform to } (-2\pi, -\pi).$