Step 1: Start with the given equation.
We are given the equation:
$x^2 - 5x + 1 = 0$
Step 2: Manipulate the equation to get terms involving $x + \frac{1{x}$.}
Since we are looking for $x + \frac{1}{x}$, we should try to divide the entire equation by $x$.
First, check that $x \neq 0$. If $x=0$, then $0^2 - 5(0) + 1 = 0$, which simplifies to $1=0$, which is false. Therefore, $x \neq 0$, and we can safely divide by $x$.
Divide every term in the equation by $x$:
$\frac{x^2}{x} - \frac{5x}{x} + \frac{1}{x} = \frac{0}{x}$
$x - 5 + \frac{1}{x} = 0$
Step 3: Isolate the term $(x + \frac{1}{x})$.
Add 5 to both sides of the equation:
$x + \frac{1}{x} = 5$
Step 4: Conclude the result.
The value of $\left(x+\frac{1}{x}\right)$ is 5.
Step 5: Compare with the given options.
The calculated value is 5, which matches option (4).
(4) 5