Group Abstract Group Abstract

Message Boards Message Boards

0
|
1.2K Views
|
6 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Why can't we find real and imaginary parts using Assuming?

Posted 8 months ago

Why don't I get a result based on the assumptions?

In[616]:= Assuming[{x \[Element] Reals, y \[Element] Reals}, 
 Re[x + \[ImaginaryJ] y - 1/(x + \[ImaginaryJ] y)]]

Out[616]= -Im[y] + Re[x - 1/(x + I y)]
POSTED BY: Ernst Huijer
6 Replies

Yes, it looks inconsistent. The output that we would expect

x - x/(x^2 + y^2)

has the same LeafCount as

x - Re[1/(x + I y)]

so that FullSimplify probably finds them equally simple, and I don't know how the choice is done. The task of rewriting an expression in exactly the form we wish is often tricky.

POSTED BY: Gianluca Gorni

Seems like a bug or deficiency. We often want to have purely real expressions. There should be a way to force that.

POSTED BY: Ernst Huijer
POSTED BY: Gianluca Gorni
Posted 8 months ago
POSTED BY: Eric Rimbey

It seems that Re does not use the assumptions:

In[57]:= Assuming[{x \[Element] Reals}, Re[x]]

Out[57]= Re[x]

For you purpose you can use ComplexExpand:

ComplexExpand[Re[x + I y - 1/(x + I y)]]

I am surprised by the output of the following:

Assuming[{x \[Element] Reals, y \[Element] Reals},
 FullSimplify[ReIm[x + I y - 1/(x + I y)]]]

It may be a matter of LeafCount.

POSTED BY: Gianluca Gorni
{x - Re[1/(x + I y)], y (1 + 1/(x^2 + y^2))}

is what I get. Not very consistent.

POSTED BY: Ernst Huijer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard