I'm trying to write an equation and I used left and right to adjust parentheses. Unfortunately, there is too much white space in the top of parentheses.
Is there any way to reduce the white space?
my equation is:
$$ a_n=\frac{1}{\pi}\int\limits_{-\pi}^{\pi}\left[\frac{1}{4}\cos(3x)+\frac{3}{4}\cos(x)\right]\cos(nx)\text{d}x=\frac{1}{4}\left[\underbrace{\frac{1}{\pi}\int\limits_{-\pi}^{\pi}\cos(3x)\cos(nx)\text{d}x}_{\text{By lemma: }=\begin{cases}0,& \ n\ne 3 \\ 1,& n=3 \end{cases}}+3\cdot{\underbrace{\frac{1}{\pi}\int\limits_{-\pi}^{\pi}\cos(x)\cos(nx)\text{d}x}_{\text{By lemma: }=\begin{cases}0,& n \ne 1 \\ 1,& n=1 \end{cases}}}\right]$$
Please help, thank you!


$$...$$. Use\[...\]– Oct 26 '15 at 09:22