Let:
\[ I = \int_0^{\frac{\pi}{2}} f(x) g(x) \, dx \]
Substituting \( f(x) = \sin^2(x) \) and \( g(x) = \pi x^2 - x^2 \), we get:
\[ I = \int_0^{\frac{\pi}{2}} \sin^2(x) \left( \pi x^2 - x^2 \right) \, dx \]
Using the trigonometric identity \( \sin^2(x) = 1 - \cos^2(x) \):
\[ I = \int_0^{\frac{\pi}{2}} \cos^2(x) \left( \pi x^2 - x^2 \right) \, dx \]
Combining integrals:
\[ 2I = \int_0^{\frac{\pi}{2}} \left( \sin^2(x) + \cos^2(x) \right) \left( \pi x^2 - x^2 \right) \, dx \]
This simplifies to:
\[ 2I = \int_0^{\frac{\pi}{2}} g(x) \, dx \]
Thus, we have:
\[ 2 \int_0^{\frac{\pi}{2}} f(x) g(x) \, dx - \int_0^{\frac{\pi}{2}} g(x) \, dx = 0 \]
We are given:
\[ f(x) = \sin^2(x), \quad g(x) = \pi x^2 - x^2 \]
And:
\[ I = \int_0^{\frac{\pi}{2}} \sin^2(x) \left( \pi x^2 - x^2 \right) \, dx \]
Using the identity \( \sin^2(x) + \cos^2(x) = 1 \), we write:
\[ I = \int_0^{\frac{\pi}{2}} \cos^2(x) \left( \pi x^2 - x^2 \right) \, dx \]
Adding the two integrals for \( \sin^2(x) \) and \( \cos^2(x) \), we get:
\[ 2I = \int_0^{\frac{\pi}{2}} \left( \sin^2(x) + \cos^2(x) \right) \left( \pi x^2 - x^2 \right) \, dx \]
Since \( \sin^2(x) + \cos^2(x) = 1 \), the integral simplifies to:
\[ 2I = \int_0^{\frac{\pi}{2}} \pi x^2 - x^2 \, dx \]
The integral \( \int_0^{\frac{\pi}{2}} \pi x^2 - x^2 \, dx \) is known to equal \( \frac{\pi^3}{32} \). Substituting this result:
\[ 2I = 16 \cdot \frac{\pi^3}{32} \]
Simplify:
\[ 2I = \frac{16}{32} = \frac{1}{2} \]
Divide both sides by 2:
\[ I = \frac{1}{4} \]