# Mathematica is being silly

1. Aug 11, 2009

### daudaudaudau

Anyone have an explanation for this? It can simplify the first one but not the second...

#### Attached Files:

• ###### screen.jpg
File size:
17.5 KB
Views:
122
2. Aug 11, 2009

### daudaudaudau

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. Aug 19, 2009

### bpet

I had similar problems and asked tech support about it - they recommend as a workaround e.g.

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

4. Aug 19, 2009

### flatmaster

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. Aug 19, 2009

### flatmaster

For the top one, x and y could still be imaginary, giving a negative product. For division, a comlex number squared is real, making the Abs redundant.

i'm assuming that Mathematica's assumes all vars can be complex. See if you can convince mathematica that x,y belong to reals

Not quite what you wanted to do, but it's a starting place.

http://reference.wolfram.com/mathematica/tutorial/ExpressionsInvolvingComplexVariables.html

6. Aug 20, 2009

### CompuChip

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. Aug 20, 2009

### daudaudaudau

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]