Why does FullSimplify not work with assumptions in Mathematica?

  • Thread starter daudaudaudau
  • Start date
  • Tags
    Mathematica
In summary, the conversation discusses a problem with using FullSimplify on expressions involving absolute values and complex variables. The first example shows that the result is not simplified, while the second example is successfully simplified using PiecewiseExpand. The conversation also mentions the use of the assumption "Reals" in FullSimplify, but notes that this does not work in every case.
  • #1
daudaudaudau
302
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: 343
Mathematics news on Phys.org
  • #2
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...
 
  • #3
I had similar problems and asked tech support about it - they recommend as a workaround e.g.

PiecewiseExpand[Abs[(x*y)]^2, Reals]
 
  • #4
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 >
 
  • #5
  • #6
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]"
 
  • #7
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]
 

FAQ: Why does FullSimplify not work with assumptions in Mathematica?

What does it mean when Mathematica is being silly?

When Mathematica is being silly, it means that the output it is providing does not make sense or is not what was expected. This could be due to an error in the code or a limitation of the software.

Why is Mathematica being silly?

There could be several reasons why Mathematica is being silly. It could be due to a mistake in the code, an incorrect or incomplete input, or a limitation of the software. It is important to carefully check the code and inputs to troubleshoot the issue.

How can I fix Mathematica when it is being silly?

If you have identified the cause of why Mathematica is being silly, you can fix the issue by correcting the mistake in the code or input. If you are unsure of the cause, you can try simplifying the code or seeking help from other Mathematica users or support resources.

Is Mathematica always reliable, or can it be silly at times?

Mathematica is a powerful software tool for mathematical and scientific computations, but like any software, it is not perfect. It may encounter errors or limitations in certain cases, resulting in it being silly. However, these instances are rare and can usually be resolved.

What can I do to prevent Mathematica from being silly in the future?

To prevent Mathematica from being silly, it is important to write code carefully and accurately. This includes checking for errors and using correct syntax. It is also helpful to understand the limitations of the software and how to work around them. Additionally, regularly updating to the latest version of Mathematica can help prevent issues.

Similar threads

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