I am doing some calculations that end up popping out a lot of $-1$s to various fractional powers, and Mathematica doesn't seem to want to set them to $-1$. Is there an easy way to do this?
Asked
Active
Viewed 430 times
2
2 Answers
2
First Question:
(-1)^(1/3) is not equal to -1
(-1)^n is only equal to -1 for odd, integer values of n.
Second Question:
Try Assuming[L \[Element] Reals, FullSimplify[Sqrt[L^2] Sqrt[L]]]
Rudy Potter
- 2,553
- 8
- 20
ComplexExpand[(-1)^(1/3), TargetFunctions -> {Re, Im}]. – b.gates.you.know.what Feb 01 '19 at 17:39Surdinstead of fractional powers. – eyorble Feb 01 '19 at 17:43Simplifycan be given an optional second argument defining things to assume during the simplification process, thusSimplify[Sqrt[L^2]Sqrt[L],L>=0]returnsL^(3/2)– Bill Feb 01 '19 at 18:19$Assumptions = {L >= 0}then it is assumed automatically – MeMyselfI Feb 01 '19 at 18:27Simplifyis one of those. As you might have seen, if you type in some expression there is a default very lightweight quick simplification done to that, like 3+5 being replaced by 8, but that does not invoke all the power ofSimplifyor make use of all the power ofAssumptions. That means Mathematica works much more quickly if you choose when and where you want to have it spend time doingSimplifyand usingAssumptions– Bill Feb 01 '19 at 19:36CubeRootadded in V9 to handle this kind of problem. It accepts only real-valued arguments and returns only the real valued root. – m_goldberg Feb 02 '19 at 04:01