How to approach this Integral with nested exponents? I've reduced a problem down to:
$$\int_0^{\frac{\pi}{4}} (x^2 - 1)^n ~dx$$
$n$ can be any natural number. How to proceed?  I already did a Trig Sub to get here, so not imagining I need to do another one..  Maybe I do though?  This is supposed to be an Integration by Parts problem, though not sure.

For any specific $n\in\mathbb{N}$ you can expand and get an elementary integral, and if you want a general formula that works for all $n\in\mathbb{N}$ so again expanding with the binomial theorem $(a+b)^n = \sum_{k=0}^n {n \choose k} a^k b^{n-k}$ we get
$$(x^2-1)^n = \sum_{k=0}^n {n \choose k} x^{2k} (-1)^{n-k}$$
so that by linearity of the integral
$$\int_0^{\frac{\pi}{4}} \sum_{k=0}^n {n \choose k} x^{2k} (-1)^{n-k} dx = \sum_{k=0}^n {n \choose k} (-1)^{n-k} \int_0^{\frac{\pi}{4}} x^{2k}  dx =\sum_{k=0}^n {n \choose k} (-1)^{n-k} \frac{\left(\frac{\pi }{4}\right)^{2k+1}}{2k+1}$$
