Step 1: Use the identity for inverse tangent addition.
The given expression involves a sum of two inverse tangent functions. We can apply the following identity for the sum of inverse tangents:
\[
\tan^{-1} a + \tan^{-1} b = \tan^{-1} \left( \frac{a + b}{1 - ab} \right)
\]
We will apply this identity to simplify the sum of \( \tan^{-1} \left( \frac{x}{x+1} \right) \) and \( \tan^{-1} \left( \frac{x+1}{x} \right) \).
Step 2: Apply the identity.
Let \( a = \frac{x}{x+1} \) and \( b = \frac{x+1}{x} \). Then,
\[
\tan^{-1} \left( \frac{x}{x+1} \right) + \tan^{-1} \left( \frac{x+1}{x} \right) = \tan^{-1} \left( \frac{\frac{x}{x+1} + \frac{x+1}{x}}{1 - \frac{x}{x+1} \cdot \frac{x+1}{x}} \right)
\]
Step 3: Simplify the numerator.
Simplify the numerator of the fraction inside the inverse tangent:
\[
\frac{x}{x+1} + \frac{x+1}{x} = \frac{x^2 + (x+1)^2}{x(x+1)} = \frac{x^2 + x^2 + 2x + 1}{x(x+1)} = \frac{2x^2 + 2x + 1}{x(x+1)}
\]
Step 4: Simplify the denominator.
Now simplify the denominator:
\[
1 - \frac{x}{x+1} \cdot \frac{x+1}{x} = 1 - 1 = 0
\]
Step 5: Analyze the result.
So the expression inside the inverse tangent function simplifies to infinity. Therefore, the sum of the two inverse tangents is equal to \( \frac{\pi}{2} \).
Step 6: Integrate the result.
Now, we need to integrate the result over the limits from \( -1 \) to \( 1 \). Since the result is \( \pi \), the integral becomes:
\[
\int_{-1}^1 \pi \, dx = \pi \times \left[ x \right]_{-1}^1 = \pi \times (1 - (-1)) = 2\pi
\]
Thus, the value of the integral is \( \boxed{\pi} \).