x + (1/x) = 5
x^2 + (1/x^2) = (x + 1/x)^2 - 2 = 5^2-2 = 25-2 = 23
Vikram, I agree with your answer, but I'm not sure what steps you took to get there. It looks like you're taking x^2 + (1/x^2) and making that equal to (x + 1/x)^2 (although I'm not sure where the -2 is coming from).
But, (x+1/x)^2 really works out to x^2 + 2/x + 1/x^4.
Could you explain your methods?
Here's how I came up with the answer:
x + (1/x) = 5, so 1/x = 5-x
also, if you multiply both side of the first equation by x, you get:
x^2 + 1 = 5x
x^2 = 5x-1
Plug the value for 1/x into the second equation:
x^2 + (5-x)^2 = x^2 + 25 - 10x + x^2
=2x^2 - 10x + 25
Then, plug the value for x^2 = 5x-1 into this last equation:
2(5x-1) - 10x + 25
=10x -2 - 10x + 25
= -2 + 25
D'oh, I see the dumb mistake I made now. My method, while it works, is unnecessarily long. Thanks to both of you who provided the shorter explanation.