1
$\begingroup$

Why Mathematica doesn't simplify CubeRoot of meter cubes to meters?

r = Quantity[10, "Meters"];
v = 4/3 r^3 Pi;
CubeRoot[% * 3/4 / Pi]

returns

Surd[Quantity[1000, ("Meters")^3], 3]

instead of 10m, which was what I would expect. I think this has something to do with the fact that a the root could be a complex number. I searched the web and found some hints about using assumptions, but it didn't work for me. Please, could anybody help me to understand what I'm doing wrong?

Thank you, L-

$\endgroup$

1 Answer 1

3
$\begingroup$

It appears Surd is not integrated into Quantity (and it probably should be). This auto simplifies:

r = Quantity[10, "Meters"];
v = 4/3 r^3 Pi;
(%*3/4/Pi)^(1/3)
Quantity[10, "Meters"]
$\endgroup$
3
  • $\begingroup$ Thank you Chip for your answer. I didn't realize I could use ^ operator! Anyway I think it doesn't work with Power[] function too. $\endgroup$
    – Luca
    Mar 11, 2015 at 20:49
  • $\begingroup$ @Luca x^y is shorthand for Power[x, y], so both should work. $\endgroup$
    – Greg Hurst
    Mar 12, 2015 at 21:46
  • $\begingroup$ Yes, you are right, it works also with Power[] function. Thank you Chip. $\endgroup$
    – Luca
    Mar 17, 2015 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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