Find the remainder upon division by $x^2-1$ of the determinant

$$\begin{vmatrix} 
x^3+3x & 2 & 1 & 0
\\ x^2+5x & 3 & 0 & 2
\\x^4 +x^2+1 & 2  & 1 & 3
\\x^5 +1 & 1 & 2  & 3
\\ \end{vmatrix}$$
1. First, we need to find the remainder of each element in the matrix when divided by \(x^2 - 1\). We know that \(x^2 \equiv 1 \mod{(x^2-1)}\), which implies:
   \[
   x^3 \equiv x \mod{(x^2-1)}, \quad x^4 \equiv 1 \mod{(x^2-1)}, \quad x^5 \equiv x \mod{(x^2-1)}
   \]

2. Using these equivalences, we can reduce each element of the matrix modulo \(x^2 - 1\):
   \[
   \begin{vmatrix} 
   x^3 + 3x & 2 & 1 & 0 \\
   x^2 + 5x & 3 & 0 & 2 \\
   x^4 + x^2 + 1 & 2 & 1 & 3 \\
   x^5 + 1 & 1 & 2 & 3 
   \end{vmatrix}
   \equiv
   \begin{vmatrix} 
   x + 3x & 2 & 1 & 0 \\
   1 + 5x & 3 & 0 & 2 \\
   1 + 1 + 1 & 2 & 1 & 3 \\
   x + 1 & 1 & 2 & 3 
   \end{vmatrix}
   \mod{(x^2-1)}
   \]
   Simplifying the elements:
   \[
   \begin{vmatrix} 
   4x & 2 & 1 & 0 \\
   5x + 1 & 3 & 0 & 2 \\
   3 & 2 & 1 & 3 \\
   x + 1 & 1 & 2 & 3 
   \end{vmatrix}
   \]

3. Next, we expand the determinant using cofactor expansion along the first row:
   \[
   \begin{vmatrix} 
   4x & 2 & 1 & 0 \\
   5x + 1 & 3 & 0 & 2 \\
   3 & 2 & 1 & 3 \\
   x + 1 & 1 & 2 & 3 
   \end{vmatrix}
   = 4x \begin{vmatrix} 
   3 & 0 & 2 \\
   2 & 1 & 3 \\
   1 & 2 & 3 
   \end{vmatrix}
   - 2 \begin{vmatrix} 
   5x + 1 & 0 & 2 \\
   3 & 1 & 3 \\
   x + 1 & 2 & 3 
   \end{vmatrix}
   + 1 \begin{vmatrix} 
   5x + 1 & 3 & 2 \\
   3 & 2 & 3 \\
   x + 1 & 1 & 3 
   \end{vmatrix}
   \]

4. Calculate each of the 3x3 determinants:
   \[
   \begin{vmatrix} 
   3 & 0 & 2 \\
   2 & 1 & 3 \\
   1 & 2 & 3 
   \end{vmatrix}
   = 3 \left( \begin{vmatrix} 1 & 3 \\ 2 & 3 \end{vmatrix} \right) - 0 + 2 \left( \begin{vmatrix} 2 & 1 \\ 1 & 2 \end{vmatrix} \right)
   = 3(1) + 2(3) = 3 + 6 = 9
   \]

   \[
   \begin{vmatrix} 
   5x + 1 & 0 & 2 \\
   3 & 1 & 3 \\
   x + 1 & 2 & 3 
   \end{vmatrix}
   = (5x + 1) \left( \begin{vmatrix} 1 & 3 \\ 2 & 3 \end{vmatrix} \right) - 0 + 2 \left( \begin{vmatrix} 3 & 1 \\ x + 1 & 2 \end{vmatrix} \right)
   = (5x + 1)(-3) + 2(3 - (x + 1)) = -15x - 3 + 2(2 - x) = -15x - 3 + 4 - 2x = -17x + 1
   \]

   \[
   \begin{vmatrix} 
   5x + 1 & 3 & 2 \\
   3 & 2 & 3 \\
   x + 1 & 1 & 3 
   \end{vmatrix}
   = (5x + 1) \left( \begin{vmatrix} 2 & 3 \\ 1 & 3 \end{vmatrix} \right) - 3 \left( \begin{vmatrix} 3 & 3 \\ x + 1 & 3 \end{vmatrix} \right) + 2 \left( \begin{vmatrix} 3 & 2 \\ x + 1 & 1 \end{vmatrix} \right)
   = (5x + 1)(3 - 3) - 3(9 - 3(x + 1)) + 2(3 - 2(x + 1))
   = 0 - 3(9 - 3x - 3) + 2(3 - 2x - 2)
   = -3(6 - 3x) + 2(1 - 2x)
   = -18 + 9x + 2 - 4x
   = 5x - 16
   \]

5. Substitute back into the determinant expansion:
   \[
   4x \cdot 9 - 2(-17x + 1) + 1(5x - 16)
   = 36x + 34x - 2 + 5x - 16
   = 75x - 18
   \]

6. The remainder when \(75x - 18\) is divided by \(x^2 - 1\) is simply \(75x - 18\) since it is already in the form \(ax + b\).

The final answer is \(\boxed{75x - 18}\)