Question: I encountered 2 questions regarding independence of 2 random variables.

1) A and B are i.i.d normal and independent, Let $X = 3A + 2B$ and $Y = 2A - 3B$, prove that they are independent

2) Will they still be independent if the normality condition is dropped?

---

1) I assume I should notice that linear combination of i.i.d normal variables forms a jointly normally distributed variables X and Y, which means, that if the covariance is 0, then the independence is proven. Covariance ends up being 0.

2) I'm really unsure about how to approach this one. I have a hunch that the answer is negative but I'm simply bad at coming up with some simple examples. 
I'd appreciate and insight into the approaches for such questions.

Answer: 
The theory about substitution actually states that when you want to use the substitution $t=g(\theta)$:

> 
> Suppose $f(\theta)=f^\*(t)$ and $g’(\theta)=g^\*(t)$, then $$\int^a\_b f(\theta)d\theta=\int^{g(b)}\_{g(a)} f^\*(t)g^\*(t)dt$$ **if $g$ is differentiable and injective on $[a,b]$**.
> 
> 
> 

This statement is not concise but it is rigorous.

You should be able to see your mistake in your treatment.

---

But this doesn’t mean that it is impossible to use the substitution $t=\tan(\theta/2)$. 

Simply break your integral into two parts:
$$\int^{\pi^-}\_0 \frac{d\theta}{a+\cos\theta}
+\int^{2\pi}\_{\pi^+} \frac{d\theta}{a+\cos\theta} $$
and then, you are allowed to do the substitution.

---

Since you have found the antiderivative, things get easier.

Let $F(\theta)$ be the antiderivative you found.

By fundamental theorem of calculus, your integral equals 
$$\begin{align}
&~~~~F(\pi^-)-F(0)+F(2\pi)-F(\pi^+) \\
&=\frac{2}{\sqrt{a^2-1}}\frac{\pi}2-0+0-\frac{2}{\sqrt{a^2-1}}\frac{-\pi}2 \\
&=\color{red}{\frac{2\pi}{\sqrt{a^2-1}}}
\end{align}
$$

as desired, by noting $\operatorname{arctan}(\infty)=\frac\pi2$ and $\operatorname{arctan}(-\infty)=-\frac\pi2$.
If you plot the function you will see a maximum $\frac{1}{a-1}$ at $\pi$, so we can consider the bound as $[\pi, 0]$ and double the resulted value:

$$2\times[\frac {2}{\sqrt{ a^2-1}}\tan^{-1}(\sqrt{\frac{a-1}{a+1}}\tan \frac{\theta}{2})]^{\pi}\_0=\frac{2\pi}{\sqrt {a^2-1}}$$