Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Is there any simple way to get only the real solutions of the eq. x^3-1=x?

I've tried:

Solve[x^3-1==x,x]

But it gives the complex ones, too.

I have Mathematica 5.2

share|improve this question

closed as off-topic by Mr.Wizard Aug 1 at 0:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Mr.Wizard
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

There is a third argument for Solve but you can use NSolve to get a numerical solution in the Reals:

 NSolve[x^3 - 1 == x, x, Reals]

{{x -> 1.32471796}}

OR Solve for exact Root solutions

Solve[x^3 - 1 == x, x, Reals]

{{x -> Root[-1 - #1 + #1^3 &, 1]}}

OR as Michael E2 noted in the comments, using ToRadicals will give you something more sensible.

Solve[x^3 - 1 == x, x, Reals] // ToRadicals

Mathematica graphics

share|improve this answer
    
And ... // ToRadicals if desired. –  Michael E2 Aug 1 at 1:30
    
@MichaelE2. Thanks, I'll add that. –  RunnyKine Aug 1 at 1:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.