Skip to main content
Tweeted twitter.com/#!/StackMma/status/507765493479247872
added 45 characters in body
Source Link
xslittlegrass
  • 27.8k
  • 9
  • 102
  • 187

Consider this simple example:

mytrans[expr_] := 
 expr /. Ω1^2 + Δ^2 :> Ω^2

f = 
  FullSimplify[Sqrt[-Δ^2 - Ω1^2], 
   TransformationFunctions -> {Automatic, mytrans}, Assumptions -> #] &;

f /@ {{Δ > 0, Ω1 > 0, Ω > 0}, 
     {Δ > 0, Ω1 < 0, Ω > 0}, 
     {Δ < 0, Ω1 > 0, Ω > 0}, 
     {Δ < 0, Ω1 < 0, Ω > 0},
     {Δ ∈ Reals, Ω1 ∈ Reals, Ω > 0}}


(* {I Ω, I Ω, I Ω, I Ω, Sqrt[-Δ^2 - Ω1^2]} *)

Isn't the last assumption equivalent to the first four? Why doesn't it work? Or why does it work in the first four cases?

Consider this simple example:

mytrans[expr_] := 
 expr /. Ω1^2 + Δ^2 :> Ω^2

f = 
  FullSimplify[Sqrt[-Δ^2 - Ω1^2], 
   TransformationFunctions -> {Automatic, mytrans}, Assumptions -> #] &;

f /@ {{Δ > 0, Ω1 > 0, Ω > 0}, 
     {Δ > 0, Ω1 < 0, Ω > 0}, 
     {Δ < 0, Ω1 > 0, Ω > 0}, 
     {Δ < 0, Ω1 < 0, Ω > 0},
     {Δ ∈ Reals, Ω1 ∈ Reals, Ω > 0}}


(* {I Ω, I Ω, I Ω, I Ω, Sqrt[-Δ^2 - Ω1^2]} *)

Isn't the last assumption equivalent to the first four? Why doesn't it work?

Consider this simple example:

mytrans[expr_] := 
 expr /. Ω1^2 + Δ^2 :> Ω^2

f = 
  FullSimplify[Sqrt[-Δ^2 - Ω1^2], 
   TransformationFunctions -> {Automatic, mytrans}, Assumptions -> #] &;

f /@ {{Δ > 0, Ω1 > 0, Ω > 0}, 
     {Δ > 0, Ω1 < 0, Ω > 0}, 
     {Δ < 0, Ω1 > 0, Ω > 0}, 
     {Δ < 0, Ω1 < 0, Ω > 0},
     {Δ ∈ Reals, Ω1 ∈ Reals, Ω > 0}}


(* {I Ω, I Ω, I Ω, I Ω, Sqrt[-Δ^2 - Ω1^2]} *)

Isn't the last assumption equivalent to the first four? Why doesn't it work? Or why does it work in the first four cases?

Source Link
xslittlegrass
  • 27.8k
  • 9
  • 102
  • 187

Why does Mathematica not simplify this expression?

Consider this simple example:

mytrans[expr_] := 
 expr /. Ω1^2 + Δ^2 :> Ω^2

f = 
  FullSimplify[Sqrt[-Δ^2 - Ω1^2], 
   TransformationFunctions -> {Automatic, mytrans}, Assumptions -> #] &;

f /@ {{Δ > 0, Ω1 > 0, Ω > 0}, 
     {Δ > 0, Ω1 < 0, Ω > 0}, 
     {Δ < 0, Ω1 > 0, Ω > 0}, 
     {Δ < 0, Ω1 < 0, Ω > 0},
     {Δ ∈ Reals, Ω1 ∈ Reals, Ω > 0}}


(* {I Ω, I Ω, I Ω, I Ω, Sqrt[-Δ^2 - Ω1^2]} *)

Isn't the last assumption equivalent to the first four? Why doesn't it work?