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.

In my expression, there appear terms of the form A^(B Sqrt[1/C] Sqrt[C]). Mathematica doesn't realize that this is just simply A^B. I tried telling it explicitly by some replacement rule. This works for simple cases, but somehow if the form above is embedded in a larger expression it does not do this replacement rule.

For example,

(9 + 9 E^((4 t Sqrt[Λ])/Sqrt[3]) - 
 12 y^2 Λ - 12 z^2 Λ + 
 6 y^2 Sqrt[1/Λ] Λ^(3/2) + 
 6 z^2 Sqrt[1/Λ] Λ^(3/2) + 
 x^4 Λ^2 + y^4 Λ^2 + 
 2 y^2 z^2 Λ^2 + z^4 Λ^2 + 
 2 x^2 Λ (-6 + 
    3 Sqrt[1/Λ]
      Sqrt[Λ] + (y^2 + z^2) Λ) + 
 6 E^((2 t Sqrt[Λ])/Sqrt[
  3]) (3 - 2 z^2 Λ + 
    x^2 (-2 + 
       Sqrt[1/Λ]
         Sqrt[Λ]) Λ + 
    y^2 (-2 + 
       Sqrt[1/Λ]
         Sqrt[Λ]) Λ + 
    z^2 Sqrt[1/Λ] Λ^(3/2)))/(9 + 
 9 E^((4 t Sqrt[Λ])/Sqrt[3]) - 
 12 y^2 Λ - 12 z^2 Λ + 
 6 y^2 Sqrt[1/Λ] Λ^(3/2) + 
 6 z^2 Sqrt[1/Λ] Λ^(3/2) + 
 x^4 Λ^2 + y^4 Λ^2 + 
 2 y^2 z^2 Λ^2 + z^4 Λ^2 + 
 2 x^2 Λ (-6 + 
    3 Sqrt[1/Λ]
      Sqrt[Λ] + (y^2 + z^2) Λ) - 
 6 E^((2 t Sqrt[Λ])/Sqrt[
  3]) (-3 + x^2 Sqrt[1/Λ] Λ^(3/2) + 
    y^2 Sqrt[1/Λ] Λ^(3/2) + 
    z^2 Sqrt[1/Λ] Λ^(3/2)))/. A_^(B_. Sqrt[1/Λ] Sqrt[Λ]) :> A^B

Could anyone help me?

share|improve this question
1  
is this what you mean? Assuming[x > 0, Simplify[Sqrt[1/x] Sqrt[x]]] !Mathematica graphics and Assuming[x > 0, Simplify[A^(B*Sqrt[1/x] Sqrt[x])]] gives $A^B$ –  Nasser Aug 20 '13 at 18:37
1  
PowerExpand[A^(B Sqrt[1/C] Sqrt[C])]..by default M takes in consideration Complex numbers too. On forcing assumption or PowerExpand it works without Complexes. –  Rorschach Aug 20 '13 at 18:38

1 Answer 1

That is only true if C (in your short example) is positive, therefore you must instruct Mathematica to make such assumptions:

FullSimplify[expr, Λ > 0]

1

You could also do this with $Assumptions:

$Assumptions = {Λ > 0};

FullSimplify[expr]

1

Blackbird suggests:

PowerExpand[expr] // FullSimplify

1

Where:

expr = (9 + 9 E^((4 t Sqrt[Λ])/Sqrt[3]) - 12 y^2 Λ - 
     12 z^2 Λ + 6 y^2 Sqrt[1/Λ] Λ^(3/2) + 
     6 z^2 Sqrt[1/Λ] Λ^(3/2) + x^4 Λ^2 + 
     y^4 Λ^2 + 2 y^2 z^2 Λ^2 + z^4 Λ^2 + 
     2 x^2 Λ (-6 + 
        3 Sqrt[1/Λ] Sqrt[Λ] + (y^2 + 
           z^2) Λ) + 
     6 E^((2 t Sqrt[Λ])/Sqrt[3]) (3 - 2 z^2 Λ + 
        x^2 (-2 + Sqrt[1/Λ] Sqrt[Λ]) Λ + 
        y^2 (-2 + Sqrt[1/Λ] Sqrt[Λ]) Λ + 
        z^2 Sqrt[1/Λ] Λ^(3/2)))/(9 + 
     9 E^((4 t Sqrt[Λ])/Sqrt[3]) - 12 y^2 Λ - 
     12 z^2 Λ + 6 y^2 Sqrt[1/Λ] Λ^(3/2) + 
     6 z^2 Sqrt[1/Λ] Λ^(3/2) + x^4 Λ^2 + 
     y^4 Λ^2 + 2 y^2 z^2 Λ^2 + z^4 Λ^2 + 
     2 x^2 Λ (-6 + 
        3 Sqrt[1/Λ] Sqrt[Λ] + (y^2 + 
           z^2) Λ) - 
     6 E^((2 t Sqrt[Λ])/Sqrt[3]) (-3 + 
        x^2 Sqrt[1/Λ] Λ^(3/2) + 
        y^2 Sqrt[1/Λ] Λ^(3/2) + 
        z^2 Sqrt[1/Λ] Λ^(3/2)));
share|improve this answer
    
Thanks! Can I also define $Lambda$ globally to be positive? –  user25477 Aug 20 '13 at 18:51
    
@user25477: question is..shall you ? –  Rorschach Aug 20 '13 at 18:52
    
I want to... but how? –  user25477 Aug 20 '13 at 18:56
    
@user25477 See my update; use $Assumptions –  Mr.Wizard Aug 20 '13 at 19:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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