8

I'm trying to find a way to have Mathematica always represent a numerical value as a self defined variable that I define using `lhs=rhs`

. For example, if I execute

```
In[1]:=Solve[x^3 - 1 == 0, x]
Out[1]:={{x -> 1}, {x -> -(-1)^(1/3)}, {x -> (-1)^(2/3)}}
```

What I'd like is to define a variable `rho=(-1)^(1/3)`

so that when I execute the above I get out something like

```
In[1]:=Solve[x^3 - 1 == 0, x]
Out[1]:={{x -> 1}, {x -> -rho}, {x -> rho^2}}
```

Is this possible? I'm basically trying to get mathematica to always represent an $n$th root of unity as a given symbol to clean up inputs and outputs.

2David, if you register and link your account with your math.se profile, you'll start with 101 rep and you'll have access to other basic functionalities of the site – rm -rf – 2012-05-11T23:41:47.990

@R.M Thanks for the tip! I didn't realize I had to do that. – David K. – 2012-05-11T23:42:49.080

Also, I assume you're looking for a general solution and not just for the cube roots, right? i.e., if you type

`Solve[x^n -1 == 0, x]`

, you get`{1, r, r^2, ..., r^n-1}`

? – rm -rf – 2012-05-11T23:43:08.160@R.M Well, a general solution would be kinda neat, that's a little more than I'd had in mind. I was just thinking I could define a symbol for say the primitive 3rd root of unity and have mathematica replace (-1)^{1/3} with that symbol whenever it appears. – David K. – 2012-05-11T23:48:47.060