Step 1: Simplify the expression inside the square root.
Given
\[
f(x) = (x^2 + 3x)(x^2 + 3x + 2).
\]
Let
\[
t = x^2 + 3x.
\]
Then
\[
f(x) = t(t+2) = t^2 + 2t,
\]
so
\[
f(x) + 1 = t^2 + 2t + 1 = (t+1)^2.
\]
The given equation is:
\[
\sqrt{f(x) + 1} = 9701 \quad \Rightarrow \quad \sqrt{(t+1)^2} = 9701.
\]
Since the square root is non-negative,
\[
|t+1| = 9701 \quad \Rightarrow \quad t+1 = 9701 \ \text{or}\ t+1 = -9701.
\]
Thus,
\[
t = 9700 \quad \text{or} \quad t = -9702.
\]
Recall that \(t = x^2 + 3x\), so we get two quadratic equations:
\[
x^2 + 3x = 9700 \quad \Rightarrow \quad x^2 + 3x - 9700 = 0,
\]
\[
x^2 + 3x = -9702 \quad \Rightarrow \quad x^2 + 3x + 9702 = 0.
\]
Step 2: Solve the first quadratic.
For
\[
x^2 + 3x - 9700 = 0,
\]
the discriminant is
\[
\Delta_1 = 3^2 + 4 \cdot 9700 = 9 + 38800 = 38809.
\]
\[
\sqrt{38809} = 197,
\]
so the roots are
\[
x = \frac{-3 \pm 197}{2}.
\]
Thus:
\[
x_1 = \frac{-3 + 197}{2} = \frac{194}{2} = 97,\quad
x_2 = \frac{-3 - 197}{2} = \frac{-200}{2} = -100.
\]
Step 3: Check the second quadratic for real roots.
For
\[
x^2 + 3x + 9702 = 0,
\]
the discriminant is
\[
\Delta_2 = 3^2 - 4 \cdot 9702 = 9 - 38808 = -38799<0,
\]
so this quadratic has \emph{no real roots}.
Therefore, the only real solutions are \(x = 97\) and \(x = -100\).
Step 4: Sum of all real roots.
\[
\text{Sum of real roots} = 97 + (-100) = -3.
\]
\[
\boxed{-3}
\]