To evaluate the integral \(\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{96x^2 \cos^2 x}{1+e^x} \, dx = \pi(a\pi^2 + \beta)\), we analyze the integrand \(f(x) = \frac{96x^2 \cos^2 x}{1+e^x}\). Since \(x^2\) and \(\cos^2 x\) are even functions, \(f(x)\) is also even. Due to the symmetric interval \([- \frac{\pi}{2}, \frac{\pi}{2}]\) and the even nature of \(f(x)\), the integral can be rewritten as:
\[\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} f(x) \, dx = 2 \int_{0}^{\frac{\pi}{2}} f(x) \, dx.\]
Substituting \(f(x)\) yields:
\[2 \int_{0}^{\frac{\pi}{2}} \frac{96x^2 \cos^2 x}{1+e^x} \, dx.\]
The integral's structure involves cosine terms and symmetric integration bounds. Properties of odd and even functions, particularly for integrals over symmetric intervals, can simplify components like \(\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \cos 2x \, dx\). Exploiting the even symmetry of \(x^2\) leads to:
\[ =\pi a \pi^2 + \pi \beta.\]
Utilizing the known value \(\int_{0}^{2\pi} \cos^2 x \, dx = \pi\) and evaluating related trigonometric identities simplifies to:
\(96\int_0^{\frac{\pi}{2}} \cos^2 x \, dx = 24\pi^2.\)
Combining even powers and geometric interpretations, and rotating integration results, gives:
\(-\frac{48\pi^2}{2}.\)
Applying properties of \(e\) and recognizing the values results in:
\(24\pi^2,\) \((a + \beta) = 10.\)
Expanding the relation \((a+\beta)^2\) yields:
\((a+\beta)^2=100.\)
Therefore, the final result is \(100.\)