#### Question

Solve for *x*

`x+1/x=3`, x ≠ 0

#### Solution

We have been given,

`x+1/x=3`, x ≠ 0

Now, we solve the equation as follows:

`(x^2+1)/x=3`

x^{2} + 1 = 3x

x^{2} - 3x + 1 = 0

Now we also know that for an equation ax^{2} + bx + c = 0, the discriminant is given by the following equation:

D = b^{2} - 4ac

Now, according to the equation given to us, we have,a = 1, b = -3 and c = 1.

Therefore, the discriminant is given as,

D = (-3)^{2} - 4(1)(1)

= 9 - 4

= 5

Now, the roots of an equation is given by the following equation,

`x=(-b+-sqrtD)/(2a)`

Therefore, the roots of the equation are given as follows,

`x=(-(-3)+-sqrt5)/(2(1))`

`=(3+-sqrt5)/2`

Now we solve both cases for the two values of *x*. So, we have,

`x=(3+sqrt5)/2`

Also,

`x=(3-sqrt5)/2`

Therefore, the value of `x=(3+sqrt5)/2`, `(3-sqrt5)/2`