To solve the problem of finding the value of \( n \) given the volume of the parallelepiped formed by the vectors \( \vec{a} = \hat{i} + \hat{j} + n\hat{k} \), \( \vec{b} = 2\hat{i} + 4\hat{j} - n\hat{k} \), and \( \vec{c} = \hat{i} + n\hat{j} + 3\hat{k} \), we will use the formula for the volume of a parallelepiped, which is given by the absolute value of the scalar triple product of the vectors. This can be computed using the determinant of a matrix formed by the components of the vectors.
### Step-by-step Solution:
1. **Write the vectors in component form**:
\[
\vec{a} = (1, 1, n), \quad \vec{b} = (2, 4, -n), \quad \vec{c} = (1, n, 3)
\]
2. **Set up the determinant for the volume**:
The volume \( V \) of the parallelepiped is given by:
\[
V = |\vec{a} \cdot (\vec{b} \times \vec{c})| = \left| \begin{vmatrix}
1 & 1 & n \\
2 & 4 & -n \\
1 & n & 3
\end{vmatrix} \right|
\]
We know that this volume is equal to 158 cubic units.
3. **Calculate the determinant**:
Expanding the determinant:
\[
V = \begin{vmatrix}
1 & 1 & n \\
2 & 4 & -n \\
1 & n & 3
\end{vmatrix}
\]
Using the cofactor expansion along the first row:
\[
= 1 \cdot \begin{vmatrix}
4 & -n \\
n & 3
\end{vmatrix} - 1 \cdot \begin{vmatrix}
2 & -n \\
1 & 3
\end{vmatrix} + n \cdot \begin{vmatrix}
2 & 4 \\
1 & n
\end{vmatrix}
\]
Now, calculate each of these 2x2 determinants:
- First determinant:
\[
\begin{vmatrix}
4 & -n \\
n & 3
\end{vmatrix} = (4 \cdot 3) - (-n \cdot n) = 12 + n^2
\]
- Second determinant:
\[
\begin{vmatrix}
2 & -n \\
1 & 3
\end{vmatrix} = (2 \cdot 3) - (-n \cdot 1) = 6 + n
\]
- Third determinant:
\[
\begin{vmatrix}
2 & 4 \\
1 & n
\end{vmatrix} = (2 \cdot n) - (4 \cdot 1) = 2n - 4
\]
Substitute these back into the determinant:
\[
V = 1(12 + n^2) - 1(6 + n) + n(2n - 4)
\]
Simplifying this gives:
\[
V = 12 + n^2 - 6 - n + 2n^2 - 4n = 3n^2 - 5n + 6
\]
4. **Set the volume equal to 158**:
\[
3n^2 - 5n + 6 = 158
\]
Rearranging gives:
\[
3n^2 - 5n - 152 = 0
\]
5. **Solve the quadratic equation**:
Using the quadratic formula \( n = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \):
Here, \( a = 3 \), \( b = -5 \), and \( c = -152 \).
\[
n = \frac{5 \pm \sqrt{(-5)^2 - 4 \cdot 3 \cdot (-152)}}{2 \cdot 3}
\]
\[
= \frac{5 \pm \sqrt{25 + 1824}}{6}
\]
\[
= \frac{5 \pm \sqrt{1849}}{6}
\]
\[
= \frac{5 \pm 43}{6}
\]
This gives us two possible values for \( n \):
\[
n = \frac{48}{6} = 8 \quad \text{and} \quad n = \frac{-38}{6} \text{ (not valid since } n \text{ must be positive)}
\]
6. **Check the options**:
The only valid value for \( n \) is \( 8 \).
7. **Calculate \( \vec{a} \cdot \vec{c} \) and \( \vec{b} \cdot \vec{c} \)**:
- For \( \vec{a} \cdot \vec{c} \):
\[
\vec{a} = (1, 1, 8), \quad \vec{c} = (1, 8, 3)
\]
\[
\vec{a} \cdot \vec{c} = 1 \cdot 1 + 1 \cdot 8 + 8 \cdot 3 = 1 + 8 + 24 = 33
\]
- For \( \vec{b} \cdot \vec{c} \):
\[
\vec{b} = (2, 4, -8)
\]
\[
\vec{b} \cdot \vec{c} = 2 \cdot 1 + 4 \cdot 8 + (-8) \cdot 3 = 2 + 32 - 24 = 10
\]
### Final Results:
- The value of \( n \) is \( 8 \).
- \( \vec{b} \cdot \vec{c} = 10 \) (which is one of the options).