We are given the following expression for \( f_n \):
\[
f_n = \int_0^{\frac{\pi}{2}} \left( \sum_{k=1}^{n} \sin^{k-1} x \right) \left( \sum_{k=1}^{n} (2k-1) \sin^{k-1} x \right) \cos x \, dx.
\]
Let \( \sin x = t \), so that \( \cos x \, dx = dt \), and the integral becomes:
\[
f_n = \int_0^1 \left( \sum_{k=1}^{n} t^{k-1} \right) \left( \sum_{k=1}^{n} (2k-1) t^{k-1} \right) dt.
\]
Now, expand the sums and compute the integrals for each case. For \( f_{n+1} - f_n \), we get:
\[
f_{n+1} - f_n = \int_0^1 \left( 1 + t + t^2 + \cdots + t^n \right) \left( 1 + 3t + 5t^2 + \cdots + (2n+1)t^n \right) dt.
\]
Putting \( n = 20 \), we find:
\[
f_{21} - f_{20} = \int_0^1 (1 + 3t + 5t^2 + \cdots + 41t^{20}) dt.
\]
Simplify the expression:
\[
f_{21} - f_{20} = \left( \frac{1}{21} + \frac{3}{22} + \frac{5}{23} + \cdots + \frac{41}{40} \right).
\]
The sum simplifies to \( 40 + 1 = 41 \).