To solve the given problem, we will follow these steps:
### Step 1: Find the roots of the equation
Given the quadratic equation \( x^2 + x - 1 = 0 \), we can find the roots \( \alpha \) and \( \beta \) using the quadratic formula:
\[
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\]
Here, \( a = 1, b = 1, c = -1 \):
\[
x = \frac{-1 \pm \sqrt{1^2 - 4 \cdot 1 \cdot (-1)}}{2 \cdot 1} = \frac{-1 \pm \sqrt{1 + 4}}{2} = \frac{-1 \pm \sqrt{5}}{2}
\]
Thus, the roots are:
\[
\alpha = \frac{-1 + \sqrt{5}}{2}, \quad \beta = \frac{-1 - \sqrt{5}}{2}
\]
### Step 2: Calculate \( S_n = \alpha^n + \beta^n \)
We will calculate \( S_1, S_2, S_3, \) and \( S_4 \).
#### For \( S_1 \):
\[
S_1 = \alpha + \beta = -1
\]
#### For \( S_2 \):
Using the identity \( S_2 = (\alpha + \beta)^2 - 2\alpha\beta \):
\[
S_2 = (-1)^2 - 2(-1) = 1 + 2 = 3
\]
#### For \( S_3 \):
Using the identity \( S_3 = (\alpha + \beta)S_2 - \alpha\beta S_1 \):
\[
S_3 = (-1)(3) - (-1)(-1) = -3 - 1 = -4
\]
#### For \( S_4 \):
Using the identity \( S_4 = (\alpha + \beta)S_3 - \alpha\beta S_2 \):
\[
S_4 = (-1)(-4) - (-1)(3) = 4 + 3 = 7
\]
### Step 3: Substitute values into the determinant
Now we substitute \( S_1, S_2, S_3, S_4 \) into the determinant:
\[
\begin{vmatrix}
3 & 1 + S_1 & 1 + S_2 \\
1 + S_1 & 1 + S_2 & 1 + S_3 \\
1 + S_2 & 1 + S_3 & 1 + S_4
\end{vmatrix}
\]
Substituting the values:
\[
S_1 = -1, S_2 = 3, S_3 = -4, S_4 = 7
\]
We get:
\[
\begin{vmatrix}
3 & 0 & 4 \\
0 & 4 & -3 \\
4 & -3 & 8
\end{vmatrix}
\]
### Step 4: Calculate the determinant
We can calculate the determinant using the formula for a 3x3 matrix:
\[
D = a(ei - fh) - b(di - fg) + c(dh - eg)
\]
Where:
- \( a = 3, b = 0, c = 4 \)
- \( d = 0, e = 4, f = -3 \)
- \( g = 4, h = -3, i = 8 \)
Calculating:
\[
D = 3(4 \cdot 8 - (-3)(-3)) - 0 + 4(0 \cdot -3 - 4 \cdot 4)
\]
\[
= 3(32 - 9) + 4(0 - 16)
\]
\[
= 3 \cdot 23 - 64
\]
\[
= 69 - 64 = 5
\]
### Final Answer
The value of the determinant is \( \boxed{5} \).