# There are a lot of pies here (My tenth integral problem)

**Calculus**Level 5

If you evaluate \( \displaystyle \int_{0}^{\pi/2} x^{2016} \sin x \, dx\), you'll get a sum of different powers of \(\pi\)'s multiplied by different coefficients.

What is the highest exponent of \( \pi \) you will encounter in the evaluation of the integral, assuming the evaluation you get is in exact form, and that you leave everything expanded with no factoring of any kind done? Enter this exponent as your answer.

**Bonus question**: How could this be generalized? What happens if you do this with cosine? Why does this work?