<s>[INST] Calculate the definite integral: The integral was: $$\int_{-\frac{\pi}{6}}^{\frac{\pi}{6}}\frac{\pi + 4x^6}{1-\sin(|x|+\frac{\pi}{6})}$$
What I did was to identify that its an even function and write it as: $$2\int_{0}^{\frac{\pi}{6}}\frac{\pi + 4x^6}{1-\sin(x+\frac{\pi}{6})}$$
Then I wrote the denominator in terms of $\cos$ as $$\sin(x+\frac{\pi}{6})=\cos(\frac{\pi}{3}-x)$$ and then I applied the identity $1-\cos x=2\sin^2(\frac{x}{2})$ to finally get :
$$2\biggl[\biggl(\int_{0}^{\frac{\pi}{6}}\frac{\pi}{2\sin^2(\frac{\pi}{6}-\frac{x}{2})}dx\biggl)+\biggl(\int_{0}^{\frac{\pi}{6}}\frac{4x^6}{2\sin^2(\frac{\pi}{6}-\frac{x}{2})}dx\biggl)\biggl]$$
Now the first half is easy to get but how do I integrate the second one?
Can someone suggest any steps or perhaps an alternative way?
 [/INST] Looking at the monster given by Mathematica in comments, consider
$$I=\int_{0}^{\frac{\pi}{6}}\frac{\pi + 4x^6}{1-\sin(x+\frac{\pi}{6})}\,dx=\pi\int_{0}^{\frac{\pi}{6}}\frac{dx}{1-\sin(x+\frac{\pi}{6})}+4\int_{0}^{\frac{\pi}{6}}\frac{x^6}{1-\sin(x+\frac{\pi}{6})}\,dx$$ The first one is simple.
For the second one, why not to try series expansion around $x=0$
$$\frac{1}{1-\sin(x+\frac{\pi}{6})}=2+2 \sqrt{3} x+5 x^2+\frac{11 x^3}{\sqrt{3}}+\frac{91 x^4}{12}+\frac{301 x^5}{20
   \sqrt{3}}+O\left(x^6\right)$$ which, integrated termwise would give
$$\int_{0}^{\frac{\pi}{6}}\frac{x^6}{1-\sin(x+\frac{\pi}{6})}\,dx\approx 0.00902$$ while the numerical integration would give $\approx 0.00937$
</s>