# Question of change of variables in definite integral.

• Jul 25th 2013, 08:53 AM
Alan0354
Question of change of variables in definite integral.
I want to proof:
$\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 $\theta=-\theta\;\Rightarrow\; d\theta=-d\theta,\;\cos(-\theta)=\cos\theta,\;\cos[m(-\theta)]=\cos(m\theta)$

$\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 $\theta=\pi+\theta\;\Rightarrow\; d\theta=d\theta,\;\cos(\pi+\theta)=-\cos\theta$

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

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

$\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
• Jul 25th 2013, 09:16 AM
HallsofIvy
Re: Question of change of variables in definite integral.
Going from $-\pi$ to $\pi$ is adding $2\pi$ NOT $\pi$.
$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 $cos(2m\pi)= 1$ and $sin(2m\pi)= 0$ for all m.
• Jul 25th 2013, 10:52 AM
Alan0354
Re: Question of change of variables in definite integral.
Quote:

Originally Posted by HallsofIvy
Going from $-\pi$ to $\pi$ is adding $2\pi$ NOT $\pi$.
$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 $cos(2m\pi)= 1$ and $sin(2m\pi)= 0$ for all m.

This is not the case in (2). I am going from $\;\int_{-\pi}^{0}\;$ to $\;\int_{0}^{\pi}\;$. Nothing about 2 $\pi$. This is done by $\;(\theta=\theta + \pi)\;$, not $\;(\theta=\theta + 2\pi)\;$
• Jul 25th 2013, 12:26 PM
BobP
Re: Question of change of variables in definite integral.
The limits for the second transformation are wrong aren't they ?

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

then

$(-\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 $\theta \rightarrow \pi + \theta,$ for the integrand, but the transformation $\theta + \pi \rightarrow \theta$ for the limits.
• Jul 25th 2013, 03:02 PM
Alan0354
Re: Question of change of variables in definite integral.
Quote:

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

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

then

$(-\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 $\theta \rightarrow \pi + \theta,$ for the integrand, but the transformation $\theta + \pi \rightarrow \theta$ for the limits.

You can use $\;u=\pi+\theta\;$ to make it less confusing if you like.

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

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

Then

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

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

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

$\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
• Jul 26th 2013, 02:38 PM
BobP
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 $u$ as the 'original' variable and $\theta$ as the 'transformed' variable and the relationship between them is $u=\pi + \theta.$

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

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

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

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

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