Why does FullSimplify not work with assumptions in Mathematica?

  • Thread starter Thread starter daudaudaudau
  • Start date Start date
  • Tags Tags
    Mathematica
AI Thread Summary
FullSimplify in Mathematica struggles with certain expressions involving absolute values and assumptions, particularly when simplifying Abs[(x*y)]^2 under the condition x > 0 && y > 0, which returns Abs[x*y]^2 instead of a simplified form. In contrast, FullSimplify successfully simplifies Abs[(x/y)]^2 to x^2/y^2 under the same conditions. Users noted that Mathematica may treat variables as complex unless explicitly stated otherwise, leading to unexpected results. A suggested workaround involves using PiecewiseExpand to handle such cases more effectively. Understanding how Mathematica interprets assumptions is crucial for achieving the desired simplifications.
daudaudaudau
Messages
297
Reaction score
0
Anyone have an explanation for this? It can simplify the first one but not the second...
 

Attachments

  • screen.jpg
    screen.jpg
    17.5 KB · Views: 366
Mathematics news on Phys.org
And what about this:

FullSimplify[Abs[(x*y)]^2, x > 0 && y > 0]

the result is still Abs[x*y]^2

But there is no trouble doing this one

FullSimplify[Abs[(x/y)]^2, x > 0 && y > 0]

is simply returns x^2/y^2...
 
I had similar problems and asked tech support about it - they recommend as a workaround e.g.

PiecewiseExpand[Abs[(x*y)]^2, Reals]
 
daudaudaudau said:
And what about this:

FullSimplify[Abs[(x*y)]^2, x > 0 && y > 0]

the result is still Abs[x*y]^2

But there is no trouble doing this one

FullSimplify[Abs[(x/y)]^2, x > 0 && y > 0]

is simply returns x^2/y^2...

x > 0 && y > 0
Well, if this was an equals sign rather than >, it would need to be a double equqals "==". Not sure what the expression would be for >
 
flatmaster, I don't understand your remarks about "==" ... it clearly says > doesn't it?

Also, AFAIK Mathematica automatically assumes they are real when you use a comparison operator, i.e. "x > 0" implies "Element[x, Reals]"
 
bpet said:
I had similar problems and asked tech support about it - they recommend as a workaround e.g.

PiecewiseExpand[Abs[(x*y)]^2, Reals]

I see. When you want to assume that both x and y are real, you simply write ", Reals" ? Because this doesn't work for FullSimplify, e.g.

FullSimplify[Abs[x/y]^2, Reals]

is not the same as

FullSimplify[Abs[x/y]^2, _ \[Element] Reals]
 

Similar threads

Replies
1
Views
1K
Replies
1
Views
2K
Replies
2
Views
2K
Replies
3
Views
2K
Replies
5
Views
2K
Back
Top