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